Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7569063
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T15:04:46+00:00 2026-05-30T15:04:46+00:00

every one i am trying to get the video frame or thumbnail from a

  • 0

every one i am trying to get the video frame or thumbnail from a video url but not succeeding in it, here is my code

- (void)viewDidLoad {
    thumbnailimg = [[UIImageView alloc]init];
    movie = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL URLWithString:@"http://www.youtube.com/watch?v=ec9KXrpYvzk"]];
    //UIImage *singleFrameImage = [movie thumbnailImageAtTime:10 
                                                 //timeOption:MPMovieTimeOptionExact];
    //thumbnailimg.image = singleFrameImage;

    NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
    [nc addObserver:self selector:@selector(handleThumbnailImageRequestFinishNotification:) 
               name:MPMoviePlayerThumbnailImageRequestDidFinishNotification
             object:movie];
    NSNumber * time =[NSNumber numberWithInt:10];


    NSArray *times = [NSArray arrayWithObjects:time,nil];
    [movie requestThumbnailImagesAtTimes:times timeOption:MPMovieTimeOptionExact];



    [super viewDidLoad];
}


-(void)handleThumbnailImageRequestFinishNotification:(NSNotification*)note
{

        NSDictionary *userinfo = [note userInfo];
        NSMutableDictionary *event = [NSMutableDictionary dictionary];
        NSError* value = [userinfo objectForKey:MPMoviePlayerThumbnailErrorKey];
        if (value!=nil)
        {

            [event setObject:[value description] forKey:@"error"];
        }
        else 
        {

            UIImage *image = [userinfo valueForKey:MPMoviePlayerThumbnailImageKey];
            thumbnailimg.image = image;

        }
        [event setObject:[userinfo valueForKey:MPMoviePlayerThumbnailTimeKey] forKey:@"time"];


}

even the handleThumbnailImageRequestFinishNotification is not firing, plz. tell me what i am doing wrong and how to correct it, thanx in advance, Regards Saad

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T15:04:47+00:00Added an answer on May 30, 2026 at 3:04 pm

    It’s not possible to read videos from YouTube with a MPMoviePlayerController try to use an other video (from a m3u8 playlist or MP4 file).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to get one part of a URL to insert into another.
I am trying to execute a small piece of code on every single frame
I'm trying to add a space before every capital letter, except the first one.
I am trying to encode series of images to one video file. I am
I'd like to do several things to a MP4 video, but I am not
I've been trying to get into emacs lately, and one of the things I
I am trying to get a handle on using URL hashes in jQuery to
I'm trying to get the not confirmed warning to go away when using Yahoo!
Me and my friend are trying to manage a project with subversion, but every
I'm trying to get started using git, but I'm having some troubles right away.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.