We can get the thumbnail of any time. The following example is at time 0
MPMoviePlayerController *moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL fileURLWithPath:filePath]];
moviePlayer.shouldAutoplay = NO;
UIImage *thumbnail = [moviePlayer thumbnailImageAtTime:0 timeOption:MPMovieTimeOptionNearestKeyFrame];
[moviePlayer stop];
[moviePlayer release];
Another way to get the frame - http://stackoverflow.com/a/4330647
MPMoviePlayerController *moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL fileURLWithPath:filePath]];
moviePlayer.shouldAutoplay = NO;
UIImage *thumbnail = [moviePlayer thumbnailImageAtTime:0 timeOption:MPMovieTimeOptionNearestKeyFrame];
[moviePlayer stop];
[moviePlayer release];
Another way to get the frame - http://stackoverflow.com/a/4330647
No comments:
Post a Comment