create video from array of UIImages and save the video to iPhone library. AVAssetLibrary +AVFoundation

后端 未结 4 460
陌清茗
陌清茗 2021-01-31 00:14

Problem in saving video to iPhone Library. i have an array of UIImages,and two buttons ,\"convertToVideo\"&\"saveToiPhoneLib\"


-(IBAction) convertToVideo
{
  NS         


        
4条回答
  •  我在风中等你
    2021-01-31 01:00

    That’s simply too much code to check for errors. Make sure you can start the export session, that you really get pixel buffers for your images, that the writer is ready for receiving more data, that the buffer gets appended without errors, that the export session finishes with success and that the output movie file exists and actually contains some data. Only then you can try and save it to the system photo album. Check all the available error information along the way so that you know where the thing breaks for the first time. (Another thing is that you are simply taking code from the web and pasting it together, which is simply not going to work for AV programming.)

提交回复
热议问题