Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Playing QImages in QVideoWidget
QtWS25 Last Chance

Playing QImages in QVideoWidget

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 3 Posters 1.5k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • jtremoloJ Offline
    jtremoloJ Offline
    jtremolo
    wrote on last edited by
    #1

    Hello,
    I have a series of QImages that I want to put together and play in a QVideoWidget. I found were I can convert the QImages to QVideFrames but I don't know how to play the frames. I do not want to write the video out to a file, I simply want to take internally generated images and animate them. Any help would be greatly appreciated!

    Thanks

    1 Reply Last reply
    0
    • M Offline
      M Offline
      michelson
      wrote on last edited by
      #2

      Have you looked at http://doc.qt.io/qt-5/videooverview.html ? I think you can find answer to your question there.

      1 Reply Last reply
      0
      • jtremoloJ Offline
        jtremoloJ Offline
        jtremolo
        wrote on last edited by
        #3

        Yes I have looked at that webpage. In the "Working with Low Level Frames" section, the first part seems to talk about if you need to process the frames. This doesn't seem applicable to my situation. The second part describes how to display a single frame. I can see how this would be applied. Since I have a static list of frames, would I use a QTimer or something of that nature to display each frame? Is a QTimer going to be accurate enough or is there a better option?

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi and welcome to devnet,

          It will depend on the accuracy you need. Which frame rate are you targeting ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • jtremoloJ Offline
            jtremoloJ Offline
            jtremolo
            wrote on last edited by jtremolo
            #5

            Hi, Thank you!
            I'd like to target at 30 FPS at most. I will probably have a user selectable playback rate. My goal is, given a list of QImages, to have a playback capability like what is available in http://doc.qt.io/qt-5/qtmultimedia-multimediawidgets-videowidget-example.html with the "Open" button replaced with a framerate seletor from 1 to 30FPS. RIght now I'm just trying to get it to work with a hard coded framerate.

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              In that case QTimer should be enough for your needs.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved