AVFoundation + AssetWriter: Generate Movie With Images and Audio

I ended up exporting the video separately using the above code and added the audio files separately using AVComposition & AVExportSession. Here is the code -(void) addAudioToFileAtPath:(NSString *) filePath toPath:(NSString *)outFilePath { NSError * error = nil; AVMutableComposition * composition = [AVMutableComposition composition]; AVURLAsset * videoAsset = [AVURLAsset URLAssetWithURL:[NSURL fileURLWithPath:filePath] options:nil]; AVAssetTrack * videoAssetTrack = … Read more

Make movie file with picture Array and song file, using AVAsset

I finally found how make movie with a picture array and an audio file. So if you want do the same thing I put my code here (be careful to memory): First make a movie file with your picture array use zoul’s post here: -(void) writeImagesToMovieAtPath:(NSString *) path withSize:(CGSize) size { NSString *documentsDirectoryPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, … Read more