vks
vks

Reputation: 7071

Split videos to frames/images

I have a requirement to split a 5 sec video to images /frames from my iphone.

Is it possible using objective C.Any libraries available for this?

Help is highly appreciable.

Thanks,

Upvotes: 0

Views: 1029

Answers (1)

Nikhil Bansal
Nikhil Bansal

Reputation: 1545

there are many ways by which you can get images from a video. Some of them are :-

NSURL *videoURL = [NSURL fileURLWithPath:url];

MPMoviePlayerController *player = [[MPMoviePlayerController alloc] initWithContentURL:videoURL];

UIImage *thumbnail = [player thumbnailImageAtTime:1.0 timeOption:MPMovieTimeOptionNearestKeyFrame];

//Player autoplays audio on init
[player stop];
[player release];

You can also check these links:-

Is there any way other than thumbnail method to take a screenshot of an video in Iphone?

How to take a screenshot from an video playing through MPMediaPlayerController in iPhone?

It may help you :)

Thanks :)

Upvotes: 1

Related Questions