Extending an AVMutableComposition
问题 I would like to render some graphics to the end of my AVMutableComposition, like credits at the end of a movie. How can I create a blank asset that would extend the composition time to give me some blank space I can render to? 回答1: I found the answer. It lies in the insertEmptyTimeRange method. An example: //comp is an AVMutableComposition float secondsToExtend = 5.0f; long long timescale = comp.duration.timescale; CMTime endTime = CMTimeMake(comp.duration.value - 1, timescale); CMTime