Hi I am facing an issue with AVAssetEXport. I am trying to combine many videos one after another, let's say 20 - 30, adding each asset as a track of VideoMutableCompositon with insertTimeFrame:
|video1|video2| ... |videoi| ... |videoN|
If I exceed 15 - 16 videos and I export,I get the following error:
failed: Error Domain=AVFoundationErrorDomain Code=-11839 "Cannot Decode" UserInfo={NSLocalizedDescription=Cannot Decode, NSUnderlyingError=0x1c8044620 {Error Domain=NSOSStatusErrorDomain Code=-12913 "(null)"}, NSLocalizedRecoverySuggestion=Stop any other actions that decode media and try again., NSLocalizedFailureReason=The decoder required for this media is busy.}
I am sure that this is not a RAM issue since I am using iphone8 plus and also xcode show a low RAM activity. If I reduce the number of videos to 5 - 8 everything works great...
Is there a limit on adding video tracks? Can anyone help me to achieve this goal?