Karan Patel
Karan Patel

Reputation: 66

Multiple Image to Video with AVAsset Requires high memory

I have seen the most of the questions(asked on the stackoverflow) on how to create video when input images are more than 500.I tried with all the answers provided to create video from Images (more than 500 images), but they give high memory usage and hence my app crashed due to high memory usage.

I tried this link but,did not get satisfactory result. iOS5 AVFoundation image to video

iOS- CVPixelBufferCreate memory cannot release correctly when making image to video

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

Apart from this i had tried one more link. Please help me to create video from when there are more than 500 images. Thanks.

Upvotes: 3

Views: 916

Answers (1)

SheffieldKevin
SheffieldKevin

Reputation: 271

Don't generate the movie on the main thread as is being done with the iOS- CVPixelBufferCreate memory cannot release correctly ... example.

Secondly add a @autoreleasepool within your loop that processes the individual movie frames.

Upvotes: 1

Related Questions