MergeVideos icon indicating copy to clipboard operation
MergeVideos copied to clipboard

merge 15 to 20 images

Open parvendraintigate opened this issue 6 years ago • 5 comments

i have used MergeVideos library making 15 to 20 images from video but issue come

Domain = AVFoundationErrorDomain Code=-11839 "Cannot Decode" UserInfo={NSLocalizedDescription=Cannot Decode, NSUnderlyingError=0x10e16d6c0 {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.}

parvendraintigate avatar Apr 27 '18 08:04 parvendraintigate

Hey @parvendraintigate did you find any solution for this? I also faced the same issue on my side.

harjeetk avatar May 10 '18 04:05 harjeetk

I have test it takes maximum 16 images to merge so you can create the different video of different images set and them merge according to them.

harjeetk avatar May 10 '18 05:05 harjeetk

But have to make final video of more than 16 selected images and video to combine at a time

parvendraintigate avatar May 10 '18 05:05 parvendraintigate

Finally I found out the cause and was my bad! The problem was that I was looping through AVMutableCompositionTrack. So that each video was on a different track and probably that caused a lack of resources. Right now I created only 2 tracks: 1 for video and 1 for audio. All my videos are stitched with time ranges.

Just put this following code top of the loop

let videoCompositionTrack = mixComposition.addMutableTrack(withMediaType: AVMediaType.video, preferredTrackID: Int32(kCMPersistentTrackID_Invalid))

swami303 avatar Jun 02 '18 12:06 swami303

thx @swami303 . I'm very happy find your answer! thx so much! I megra so many image about 120 ---200.....no probolem!

qiter avatar Nov 14 '18 03:11 qiter