1

I have a custom button in my application on click of which I present a UIImagePickerControllerSourceTypeCamera to take a video.

Now, after capturing the video I want to set a thumbnail of it to this custom button.

How to take 1st frame of that video to set thumbnail ?

Parth Bhatt
  • 19,235
  • 28
  • 132
  • 216
Developer
  • 1,425
  • 2
  • 22
  • 48

2 Answers2

3

refer the following links. You can get some ideas regarding creating thumbnails for videos.

  1. Getting a thumbnail from a video url or data in iPhone SDK

  2. stackoverflow.com/questions/1259316/iphone-sdk-3-0-video-thumbnail

Community
  • 1
  • 1
iOS
  • 3,370
  • 3
  • 35
  • 76
1

Check This.

NSString *videoLink=[info objectForKey:@"UIImagePickerControllerMediaURL"];   
MPMoviePlayerController *player = [[MPMoviePlayerController alloc] initWithContentURL:(NSURL*)videoLink];
UIImage *imageSel = [player thumbnailImageAtTime:1.0 timeOption:MPMovieTimeOptionNearestKeyFrame];
[player stop];
[player release];
Justin
  • 82,493
  • 48
  • 216
  • 356
boopathi
  • 137
  • 2
  • 9