Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Qt 6
  4. [QtQuick, Multimedia, GStreamer] Can't play video stream
Forum Updated to NodeBB v4.3 + New Features

[QtQuick, Multimedia, GStreamer] Can't play video stream

Scheduled Pinned Locked Moved Solved Qt 6
5 Posts 2 Posters 1.1k 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.
  • 0 Offline
    0 Offline
    0x5FB5
    wrote on last edited by 0x5FB5
    #1

    I've used QtQuick's Multimedia and VideoOutput objects and everything works good on Qt 5.12.x. On Qt 6.3.1 video doesn't playing and I have only one string in console: qt.multimedia.player: Unable to set the pipeline to the paused state.

    Code:

    import QtQuick 2.0
    import QtMultimedia
    
    Item
    {
    	id: root
    
        MediaPlayer {
            id: player
            source: "gst-pipeline: udpsrc port=10001 ! application/x-rtp, media=video, clock-rate=90000, encoding-name=H264, payload=96 ! rtph264depay ! decodebin ! autovideosink";
            videoOutput: video
        }
    
        VideoOutput {
            id: video
            anchors.fill: parent
            fillMode: VideoOutput.PreserveAspectCrop
        }
    
    }
    
    
    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      The Qt Multimedia module has seen a big rewrite for Qt 6 and things like custom GStreamer pipeline have been removed.

      If memory serves well, support for networked media stream should work out of the box.

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

      0 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        The Qt Multimedia module has seen a big rewrite for Qt 6 and things like custom GStreamer pipeline have been removed.

        If memory serves well, support for networked media stream should work out of the box.

        0 Offline
        0 Offline
        0x5FB5
        wrote on last edited by
        #3

        @SGaist so, should it means that I need to change the pipeline or like that?

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

          If memory serves well, you should use the URL for the stream 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
          • 0 Offline
            0 Offline
            0x5FB5
            wrote on last edited by
            #5

            Yes, it works!
            For test I send a videotestsrc via console:
            gst-launch-1.0 videotestsrc ! "video/x-raw,width=640,height=480" ! x264enc ! mpegtsmux name=mux ! udpsink host=127.0.0.1 port=8080

            In QML:

            ...
                MediaPlayer {
                    id: player
                    source: "udp://@127.0.0.1:8080"
                    videoOutput: video
                }
            
                VideoOutput {
                    id: video
                    anchors.fill: parent
                    fillMode: VideoOutput.PreserveAspectCrop
                }
            
                Component.onCompleted:
                {
                    player.play()
                }
            
            1 Reply Last reply
            1

            • Login

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