Results 1 to 8 of 8

Thread: Playing Image Sequence using Qt

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2016
    Location
    Venice, California
    Posts
    87
    Thanks
    7
    Qt products
    Qt4
    Platforms
    Windows

    Default Playing Image Sequence using Qt

    Hello All,
    I'm trying to build a simple player that plays a image sequence. I'm having a lot of trouble finding examples of this in Qt forum. I'm using PyQt, and I'm reading my way through QLabel .
    What I would like to know is,

    How do I read in a image sequence?
    How would I go about playing it in QLabel? (I assume QLabel is what I want to use?)
    How do I make a simple timeline so I can pause, start, stop and scrub the image sequence?

    Any help would be greatly appreciated!

    Thx

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Playing Image Sequence using Qt

    In what way do you have access to the images?
    Are they in a directory on disk?
    Do you need to just show a single image at any given time, replacing one with the next at regular intervals?

    Cheers,
    _

  3. #3
    Join Date
    Feb 2016
    Location
    Venice, California
    Posts
    87
    Thanks
    7
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Playing Image Sequence using Qt

    I have a folder on my local drive.

    D:\ElementLibrary\Fire\Fire01\Fire01.001.jpeg
    D:\ElementLibrary\Fire\Fire01\Fire01.002.jpeg
    .....
    Here is a mockup of what I want to make. So...there's a viewer where the car is. Under that is a little timeline that can be used to play oR change frames. When I click on a image in the file browser I want it to automatically start playing.
    http://i67.tinypic.com/5347k3.jpg

    The interface is not an issue...yet...just playing the files. A few people have suggest using Phonon.VideoPlayer. But how do I get it to play image sequence.

    Here is a vid of what someone made. The is the main idea...
    https://vimeo.com/41345071


    Cheers!
    Last edited by Nfrancisj; 12th February 2016 at 18:44.

  4. #4
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Playing Image Sequence using Qt

    You don't have a video so don't bother with a video player.

    1) List the directory. QDir::entryInfoList(), and store it the result in a class member

    2) Create a QTimeLine object and connect a local slot to its frameChanged() signal

    3) Set the timeline's frame range form 0 to the number of items in your file list

    4) Start the time line

    5) In the slot connected to frameChanged() get the respective entry from the file list, load into a QPixmap and put that onto the label.

    Cheers,
    _

  5. #5
    Join Date
    Feb 2016
    Location
    Venice, California
    Posts
    87
    Thanks
    7
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Playing Image Sequence using Qt

    Oh my! I think that just went over my head. Hahaha! Might be too advance for me I think.
    I have to read up on qtimeline and pixmap.

    Thank you very much for the direction. I appreciate it. Are there any example code somewhere you can adjust?

Similar Threads

  1. Image sequence Questions...
    By Deep Thought in forum Qt Programming
    Replies: 5
    Last Post: 12th February 2016, 10:23
  2. Run QML files one after another in sequence
    By mvbhavsar in forum Newbie
    Replies: 4
    Last Post: 28th October 2013, 04:00
  3. every possible sequence
    By timmu in forum Qt Programming
    Replies: 3
    Last Post: 10th August 2012, 13:36
  4. Replies: 2
    Last Post: 18th June 2011, 07:57
  5. Frame sequence
    By bmn in forum Qt Programming
    Replies: 7
    Last Post: 22nd May 2008, 21:57

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.