NSURL *youTubeURL = [NSURL URLWithString:@"http://www.youtube.com/watch?v=HPwyVw_6vsQ&feature=youtu.be"]; // URL is a string which needs to be placed in @"" and close method call with ].
MPMoviePlayerController *player = [[MPMoviePlayerController alloc] initWithContentURL:youTubeURL];
imageSel = [player thumbnailImageAtTime:1.0 timeOption:MPMovieTimeOptionNearestKeyFrame];
I am using this code for getting thumbnail from the video and this return null value in the imagesel.can anybody help me to solve this problem I am using YouTube URL .when I am using this code for the video that is in the main bundle then it is working fine.