Merging two m4v Movie Files Using AVMutableComposition - Videos Will Not Merge

前端 未结 2 1348
暖寄归人
暖寄归人 2021-01-21 11:46

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         


        
2条回答
  •  南方客
    南方客 (楼主)
    2021-01-21 12:13

    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.

提交回复
热议问题