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,381
  • 28
  • 133
  • 216
Developer
  • 1,435
  • 2
  • 23
  • 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,526
  • 3
  • 37
  • 82
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
  • 84,773
  • 49
  • 224
  • 367
boopathi
  • 137
  • 2
  • 9