I have successfully created an AVMutableComposition with several videos and can view it and export it, and I would like to be able to switch between them using cross fading, so I want to use AVMutableVideoComposition. I can’t find examples of how to organize and play several AVAsset videos in a row. Does anyone have an example of how to add tracks to AVMutableVideoComposition with the equivalent of AVMutableComposition insertTimeRange or how to set up crossfade?
[self.composition insertTimeRange:CMTimeRangeMake(kCMTimeZero,asset.avAsset.duration)
ofAsset:asset.avAsset
atTime:self.composition.frameDuration
error:nil]
source
share