Responding to MonsieurDart's answer: I have not tried AVEditDemo
, but I do not have this problem on iOS 8, and I did not have it on iOS 7.
I use AVMutableVideoComposition
and set it as AVAssetExportSession's
video AVAssetExportSession's
.
. . AVMutableVideoCompositionInstruction * instruction = [AVMutableVideoCompositionInstruction videoCompositionInstruction]; AVMutableVideoCompositionLayerInstruction *layerInstruction = [AVMutableVideoCompositionLayerInstruction videoCompositionLayerInstructionWithAssetTrack:videoTrack]; AVMutableVideoComposition *compositionInstruction = [AVMutableVideoComposition videoComposition]; compositionInstruction.instructions = @[instruction]; compositionInstruction.frameDuration = CMTimeMake(1, 30); . . AVAssetExportSession *exporter = [[AVAssetExportSession alloc] initWithAsset:composition AVAssetExportPresetHighestQuality]; exporter.videoComposition = compositionInstruction;
where videoTrack is an AVMutableCompositionTrack
created from an asset
Oferm source share