Can't get multiple images from video using MPMoviePlayerController. OSStatus -12433

前端 未结 3 1052
悲哀的现实
悲哀的现实 2021-01-18 04:19

I\'m trying to extract multiple images from a selected video file using MPMoviePlayerController. Below is the code I have written.

movie = [[MPMoviePlayerCon         


        
3条回答
  •  情书的邮戳
    2021-01-18 04:33

    I was getting the exact same error OSStatus -12433 and I am using AVAssetImageGenerator

    Turns out my issue was caused by the times I was requesting for the thumbnail. The following is an example of the time that works and a time that gave the error.

    CMTime timeGivesError = CMTimeMakeWithSeconds(0.0, 0.0);
    CMTime timeWorks = CMTimeMakeWithSeconds(0.0, 1.0);
    CGImageRef image = [gen copyCGImageAtTime:timeWorks actualTime:&actualTime error:&error];
    

    I would try adjusting your times and see if there is another option which will work.

提交回复
热议问题