AVAssetExportSession crashes when rendering more than 7 clips. No matter how long the clips are, it always crashes. I am sure this is a memory leak, because it tells you that the phone disconnected from xcode when it works.
AVAssetExportSession *exporter = [[AVAssetExportSession alloc] initWithAsset:composition presetName:AVAssetExportPresetHighestQuality]; [exporter setOutputURL:outputURL]; [exporter setOutputFileType:AVFileTypeQuickTimeMovie]; [exporter setVideoComposition:output]; [exporter setAudioMix:mix]; [exporter setShouldOptimizeForNetworkUse:YES]; [exporter exportAsynchronouslyWithCompletionHandler:^{
We do not use SCRecorder. We use AVAssetExportSession directly. We do a bunch of custom materials with music, so we cannot integrate SCRecorder into what we have already created. We use AVMutableComposition to stitch clips and render them through AVAssetExportSession.
Is there something we are doing wrong or maybe working?
source share