I have got two audio tracks on me that I combine with one another like this:
AVMutableComposition *composition = [[AVMutableComposition alloc] init]; AVMutableC
On the Gaurav response you should change this line: audioDuration = CMTimeSubtract(totalDuration,videoDuration);
audioDuration = CMTimeSubtract(totalDuration,videoDuration);
to: audioDuration = CMTimeSubtract(videoDuration,currentTime);
audioDuration = CMTimeSubtract(videoDuration,currentTime);
Otherwise the audiotrack will be longer than the video ( that will be just black )