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. Is it possible to produce compressed Video/Audio streams using Qt6 Multimedia

Is it possible to produce compressed Video/Audio streams using Qt6 Multimedia

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 449 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.
  • goldenhawkingG Offline
    goldenhawkingG Offline
    goldenhawking
    wrote on last edited by goldenhawking
    #1

    It took me some days for learning new Qt6 classes such as QVideoSink and QAudioSink. With these classes, raw media frames can be mapped into memory bytes. How ever, for the next step , raw bytes may need to be compressed first , just before pushing them to QTcpSocket. Low network bandwidth can not support multi users streaming uncompressed frames together.

    Is it possible to redirect QMediaRecorder's QUrl location to a TCP socket or an SDP/RTP stream ? Such as "rtp://192.168.1.100:12345"

    Or any method to call low-level compress algs in QVideoSink ? openCV or ffpmeg may be good, but using pure Qt6 is more elegant.

    Thanks a lot !

    Qt is the best C++ framework I've ever met.

    1 Reply Last reply
    0
    • goldenhawkingG Offline
      goldenhawkingG Offline
      goldenhawking
      wrote on last edited by
      #2

      Oh,I think I solved this problem temporarily through ffmpeg.

      user@localhost$ ffmpeg -re -i /dev/video2 -f v4l2 -framerate 30 -video_size 1280x768 -c:v libx264  -f rtp  rtp://192.168.1.100:10000
      

      In this way, I can start ffpmeg in QProcess and then push the video frames to another machine. VLC player can open .sdp file (Text file ^V from ffmpeg stderr output ) and handle the RTP stream correctly.

      However, is there any purer method just using Qt C++ interface?

      Qt is the best C++ framework I've ever met.

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

        Hi,

        I don't know it will be part of its capabilities but there's a new ffmpeg based backed for QtMultimedia that you should take a look at.

        Otherwise, ffmpeg is also a set of libraries that you can use directly.

        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