AVAssetExportSession export fails non-deterministically with error: “Operation Stopped, NSLocalizedFailureReason=The video could not be composed.”

后端 未结 5 597
误落风尘
误落风尘 2020-12-13 19:45

We add subtitles to a video recorded by the user, but the export by our AVAssetExportSession object fails non-deterministically: sometimes it works, and sometimes it doesn\'

5条回答
  •  感动是毒
    2020-12-13 20:20

    I'm guessing that some of your videos' sourceVideoTracks are either:

    • tracks that are non contiguous
    • tracks with time range shorter than the video's whole time range

    The mutable track videoTrack, on the other hand, is guaranteed the correct time range (as instructed by the AVMutableVideoCompositionInstruction) so it always works.

提交回复
热议问题