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. QMediaPlayer and two seperate Streams

QMediaPlayer and two seperate Streams

Scheduled Pinned Locked Moved Unsolved General and Desktop
qt5qmediaplayer
6 Posts 2 Posters 2.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.
  • M Offline
    M Offline
    masterofeye
    wrote on last edited by masterofeye
    #1

    Hi at all,
    i have two seperates byte streams, one for audio and one for video. Now i want to use the QMediaPlayer for playback. Do i need to use two instances of the player? Because QMediaPlayer::setMedia suppors only one stream. And if i need to do this, how can I ensure that both streams are sync together?
    Thx

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

      Hi,

      AFAIK, you should do the "mixing" before you try to use QMediaPlayer.

      By the way, what OS are you running on ?

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

      M 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        AFAIK, you should do the "mixing" before you try to use QMediaPlayer.

        By the way, what OS are you running on ?

        M Offline
        M Offline
        masterofeye
        wrote on last edited by
        #3

        @SGaist thx for the fast answer,

        my OS is superficial Windows, but a further port or usage on Linux is possible.

        Ok so my usecase isn't practical ? Then i add a muxing "block" in my video processing line. Thank you

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

          Are you writing a QtMultiMedia backend or "just" a media object ?

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

          M 1 Reply Last reply
          0
          • SGaistS SGaist

            Are you writing a QtMultiMedia backend or "just" a media object ?

            M Offline
            M Offline
            masterofeye
            wrote on last edited by
            #5

            @SGaist Thx again,

            let me give you some more details:

            there are two programms:
            server and client

            Die client request the server for a "stream" or multiple streams.
            The server grab the information from different devices and creates one or multiple video streams. But only one audio stream. There also some image processing and encoding (h264/h265) in the server pipeline. The client receive this streams ... decode them and should display them. Maybe there is also some image processing after the decoding. So that the "Qt part" get the decoded and processed frames and audio signals.

            Following picture is showing from Qt side:

            • Videostream 1
            • Audiostream 1
            • Videostream 2
            • Videostream N
              ...

            Videostream 1 and Audiostream1 should be play together. The following streams has no audio input. The idea was to play each videostream in a dockwidget to seperate the window on a other monitor and each videostream has it's own QMediaPlayer.
            Your submission with the mix of audio and video before the playback ist useful, for that reason alone of sync these both.

            i hope that help you to understand my problem.

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

              Yes it's clearer.

              Then you should indeed do the synchronization at the source, it will be cleaner and easier.

              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