Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved Playing QImages in QVideoWidget

    General and Desktop
    3
    6
    1265
    Loading More Posts
    • 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.
    • jtremolo
      jtremolo last edited by

      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 Reply Quote 0
      • M
        michelson last edited by

        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 Reply Quote 0
        • jtremolo
          jtremolo last edited by

          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 Reply Quote 0
          • SGaist
            SGaist Lifetime Qt Champion last edited by

            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 Reply Quote 0
            • jtremolo
              jtremolo last edited by jtremolo

              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 Reply Quote 0
              • SGaist
                SGaist Lifetime Qt Champion last edited by

                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 Reply Quote 0
                • First post
                  Last post