×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Jan 2010
    Location
    Suffolk, UK
    Posts
    18

    Question Convert video frame to QPixmap

    Hello!

    I've been looking around for a while but couldn't find anything simple enough...

    Is there a (preferably) simple way to extract and convert a video's frame to a QPixmap (or QImage) for display? I would like to present the user a frame (the first?) from a video to have a preview...

    Ideally, I would like something like:

    Code:
    	
    QPixmap *pic;
    QMovie movie(myFile);
    if(movie.isValid())
    {
     movie.jumpToFrame(0);
     pic = new QPixmap(movie.currentPixmap());
    }
    Of course, the code above works only with animated GIF... I would like something similar with real movies (mp4, 3gp, etc.).

    Any idea? Or any document I should read?

    Many thanks in advance!

  2. #2
    Registered User
    Join Date
    Jan 2010
    Location
    Suffolk, UK
    Posts
    18

    Re: Convert video frame to QPixmap

    No idea anybody? No suggestions either?

  3. #3
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: Convert video frame to QPixmap


  4. #4
    Registered User
    Join Date
    Jan 2010
    Location
    Suffolk, UK
    Posts
    18

    Re: Convert video frame to QPixmap

    Quote Originally Posted by divanov View Post
    Yes, I did check it but was wondering, before starting to implement my own class, if there is some example available anywhere to study?

    Many thanks!

  5. #5
    Super Contributor
    Join Date
    Mar 2009
    Posts
    1,024

    Re: Convert video frame to QPixmap

    Did you check already the Video Widget example?
    http://qt.gitorious.org/qt/qt/trees/...ia/videowidget

  6. #6
    Registered User
    Join Date
    Jan 2010
    Location
    Suffolk, UK
    Posts
    18

    Re: Convert video frame to QPixmap

    Yes, I did... the problem is that the video widget example uses a QMovie:
    Code:
    QMovie movie;
    that, as I understand, works only with animated pictures (GIF) rather than real movies

    Any other idea, anybody???

Similar Threads

  1. how to convert every EColor16MU frame to EGray256 frame correctly?
    By freesui1984 in forum Symbian Media (Closed)
    Replies: 2
    Last Post: 2008-12-12, 07:23
  2. H.263 video frame size with MediaRecorderAPI on N95
    By tischd in forum Streaming and Video
    Replies: 0
    Last Post: 2008-04-09, 11:08
  3. how can i move in the video player frame by frame forward & reverse
    By nitwalssn@gmail.com in forum Mobile Java Media (Graphics & Sounds)
    Replies: 1
    Last Post: 2007-05-09, 09:46

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×