I am using the below code to try and merge two m4v files stored in the documents folder :
CMTime insertionPoint = kCMTimeZero;
NSError * error = nil;
AVMutableC
You havent set the composition to the exportSession.
After the line:
AVAssetExportSession *exportSession = [[AVAssetExportSession alloc] initWithAsset:composition presetName:AVAssetExportPresetHighestQuality];
Add this line
exportSession.videoComposition = composition;
This should solve your problem.
Ok - so I eventually got this working by using individual AVMutableComposition tracks and then setting a mutablecomposition for audio and one for video.