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 video files on the gui
Forum Updated to NodeBB v4.3 + New Features

Playing video files on the gui

Scheduled Pinned Locked Moved General and Desktop
5 Posts 3 Posters 2.6k Views 1 Watching
  • 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.
  • A Offline
    A Offline
    anics
    wrote on last edited by
    #1

    How can I load and play yuv files on the GUI ?

    1 Reply Last reply
    0
    • G Offline
      G Offline
      Guigui
      wrote on last edited by
      #2

      I'm also looking for a better way to do this.

      As far as I know, the YUV format is not supported by Qt. Until now, we've been using OpenCV to load video sequences and convert them to RGB, placed them in a QImage and display them in a QLabel.

      I haven't tried the Qt Multimedia classes yet. They should give you more control over playback (with a label, you'll have to "manually" time when each frame should be displayed), but might still not support YUV.

      1 Reply Last reply
      0
      • A Offline
        A Offline
        anics
        wrote on last edited by
        #3

        Thanks ! @Gulgul for your reply.....but can you plz elaborate a bit on this( i m familiar with opencv 2.4 library so no problem in that regard).......also i am planning to use the qt multimedia framework as a second option....

        1 Reply Last reply
        0
        • G Offline
          G Offline
          Guigui
          wrote on last edited by
          #4

          I apologize, it seems I was wrong and was reading RGB data all the time. I verified the OpenCV doc and YUV is not supported. From what I understand, ffmpeg is used as the OpenCV backend for reading different video formats and ffmpeg doesn't decode YUV data by default. My bad... :(

          1 Reply Last reply
          0
          • E Offline
            E Offline
            ecripes
            wrote on last edited by
            #5

            You could display individual YUV frames in an OpenGL context with a texture, using shaders to convert from YUV (or maybe there's an extension to do this?)... or convert each YUV frame to RBGA in C++ and load that into a texture.

            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