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

前端 未结 3 1031
悲哀的现实
悲哀的现实 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:22

    I had to add the times as floats so:

    NSNumber *time1 = [NSNumber numberWithFloat:1.f];
    
    0 讨论(0)
  • 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.

    0 讨论(0)
  • 2021-01-18 04:43

    I do that using the library iFrameExtractor https://github.com/lajos/iFrameExtractor

    Hope this help Good luck

    0 讨论(0)
提交回复
热议问题