AVAssetExportSession using AVAssetExportPresetPassthrough breaking output

前端 未结 3 828
攒了一身酷
攒了一身酷 2021-01-28 03:16

I\'m using AVAssetExportSession in combination with AVAssetExportPresetPassthrough to stitch multiple videos together. Everything works quite fine, except after my first sub-cli

3条回答
  •  北恋
    北恋 (楼主)
    2021-01-28 04:02

    I guess it is because you are using a AVMutableComposition to insert 2 of your video clips by insertTimeRange:ofAsset:atTime:error:. This will result 2 video track on the composition, and when there're 2 video track and no composition layer instruction, only the first video track will be displayed. Try to alloc a video track yourself and insert the assets' video track to these video track using insertTimeRange:ofTrack:atTime:kCMTimeZero error:&error will probably fix these issue.

提交回复
热议问题