AVAssetExportSession using AVAssetExportPresetPassthrough break output

I use AVAssetExportSession in combination with AVAssetExportPresetPassthrough to stitch several videos together. Everything works fine, except that my first sub-clip should have finished, this image freezes in the last frame, but the second will not play. I made sure that the opacity of the layer is 0.0f after the end of each clip, if I use a different Preset-Type, everything works ... Any tips?

0
source share
3 answers

I contacted Apple, they told me that this is a bug, please find bugreport here: https://bugreport.apple.com/cgi-bin/WebObjects/RadarWeb.woa/3/wo/zpx0I9jVzf8090ZICwg1GM/5.83.28.0.9

+3
source

While you can use AVAssetExportPresetPassthrough to concatenate a video, the resulting video is not the most compatible, as each segment ends on its own track. It should play on iOS / OSX, but it is unlikely to play well with YouTube or Facebook.

So, something is wrong with your implementation, but you should probably consider using another preset (which will smooth your videos in one track) or use AVAssetWriter .

+2
source

I think this is because you are using AVMutableComposition to insert 2 of your videos on insertTimeRange:ofAsset:atTime:error: This will display 2 video tracks in the composition, and when there are 2 video tracks and there is no composition layer composition, only the first video track will be displayed. Try placing the video track on your own and pasting the asset video track onto this video track using insertTimeRange:ofTrack:atTime:kCMTimeZero error:&error , probably fix this problem.

0
source

All Articles