I am trying to create video from png images which has no audio file.
I have implemented following code but my images are not running smoothly.
totalImages = 121;
// Do any additional setup after loading the view, typically from a nib.
levelTimer = [NSTimer scheduledTimerWithTimeInterval:0.40 target: self selector: @selector(levelTimerCallback:) userInfo: nil repeats: YES];
- (void)levelTimerCallback:(NSTimer *)timer
if(counter <= totalImages)
NSString *fileName = [NSString stringWithFormat:@"image_iphone_%d",counter];
NSString *fileLocation = [[NSBundle mainBundle] pathForResource:fileName ofType:@"png"];
UIImage *imageName = [[UIImage alloc] initWithContentsOfFile:fileLocation];
imgV.image = imageName;
You can have a look on this topic
It will be a bit confusing if you haven't try AVFoundation before.
It's concept is like:
1. Set up a assetwriter (helper for writing the video out).
2. Tell the writer what track you wanna input (adding the video and audio writerInput)
3. If everything is okay, try to put your image to the video track
4. Ask the writer to encode.