Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Custom streamer pipeline in QML
QtWS25 Last Chance

Custom streamer pipeline in QML

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
qmlgstreamergstreamer videovideoudp stream
15 Posts 3 Posters 3.6k 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.
  • V Offline
    V Offline
    vicky_mac
    wrote on 7 May 2022, 19:03 last edited by
    #1

    Hi,

    I want to use custom Gstreamer pipeline to play UDP/TCP streams.

    There will be multiple streams available and i need to switch from one stream to another as required and that will need change in pipeline as well .

    Please suggest how it can be done and if there is any example code i can follow?

    Thank you...

    @SGaist @jsulm @J-Hilk

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 7 May 2022, 20:00 last edited by
      #2

      Hi,

      Are you going to show multiple streams ?
      Are the URLs known in advance ?

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

      V 1 Reply Last reply 11 May 2022, 10:02
      0
      • S SGaist
        7 May 2022, 20:00

        Hi,

        Are you going to show multiple streams ?
        Are the URLs known in advance ?

        V Offline
        V Offline
        vicky_mac
        wrote on 11 May 2022, 10:02 last edited by
        #3

        @SGaist Yes i know the source from where the data will be coming . IT will have multiple cameras which will send feed to my system. So basically in pipeline only port number will change or in worst case scenario the whole pipeline ,,, But source is known in all cases

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 11 May 2022, 19:43 last edited by
          #4

          Then you can set the stream as described here.

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

          V 1 Reply Last reply 15 May 2022, 09:04
          0
          • S SGaist
            11 May 2022, 19:43

            Then you can set the stream as described here.

            V Offline
            V Offline
            vicky_mac
            wrote on 15 May 2022, 09:04 last edited by
            #5

            @SGaist thanx for the info. Now pipeline works , but i have another issue.
            I am using ZynqMPSoC board which has hardware acceleration for encoding and decoding. When i run simple pipeline from command line using gst-launch and kmssink it works fine. But when i use inside QML Mediaplayer it;s very slow and not useful at all.

            I read some post where user said it's because of using videoconvert ! qtvideosink , because videoconvert is using processor of color conversion. Is there any way we can avoid videoconvert , because without this pipeline doesn't work.

            1 Reply Last reply
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 15 May 2022, 19:08 last edited by
              #6

              I just remembered, GStreamer now provides a sink for QML. You should check it.

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

              V 1 Reply Last reply 7 Jun 2022, 08:32
              0
              • S SGaist
                15 May 2022, 19:08

                I just remembered, GStreamer now provides a sink for QML. You should check it.

                V Offline
                V Offline
                vicky_mac
                wrote on 7 Jun 2022, 08:32 last edited by
                #7

                @SGaist do you have any example where qmlsink have been used inside gstreamer pipeline in qml file.

                Actually my decoder is doesn't gibe RGB output its interleaved YUV format, which i am converting to RGB and that's causing too much delay.

                Is there any way we can directly play interleaved YUV format in QML.

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on 7 Jun 2022, 18:26 last edited by
                  #8

                  Did you already check that GStreamer example ?

                  Interleaved YUV is a bit vague as there are many variants. Which one are you using ?

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

                  V 1 Reply Last reply 8 Jun 2022, 06:33
                  0
                  • S SGaist
                    7 Jun 2022, 18:26

                    Did you already check that GStreamer example ?

                    Interleaved YUV is a bit vague as there are many variants. Which one are you using ?

                    V Offline
                    V Offline
                    vicky_mac
                    wrote on 8 Jun 2022, 06:33 last edited by
                    #9

                    @SGaist Output is of YUV 422 format. Yes i saw similar example but i get error module "org.freedesktop.gstreamer.GLVideoItem" is not installed.

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on 8 Jun 2022, 06:48 last edited by
                      #10

                      From memory that one is supported directly by Qt Quick.

                      Which version of Gstreamer are you using ?
                      Did you instal all the plugin packages ?

                      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
                      • V Offline
                        V Offline
                        vicky_mac
                        wrote on 8 Jun 2022, 07:10 last edited by
                        #11

                        @SGaist said in Custom streamer pipeline in QML:

                        of Gstreamer are you using ?

                        I am using GStreamer 1.16.1. and Qt 5.13.2.
                        while running gst-inpect i don't find gmlglsink. I have installed all the plugins but dont know from which plugin this package will be available.

                        I am using this pipeline:
                        MediaPlayer{
                        id: mediaplayer
                        source: "gst-pipeline: udpsrc port=11000 ! video/mpegts ! tsdemux ! h264parse ! omxh264dec ! videoconvert ! qtvideosink sync=false"

                        It runs fine but very slow due to videoconvert . I want to avoid videoconvert and trying to find out alternatives. Because its being done in my embedded processor and its very slow.

                        1 Reply Last reply
                        0
                        • S Offline
                          S Offline
                          SGaist
                          Lifetime Qt Champion
                          wrote on 8 Jun 2022, 15:18 last edited by
                          #12

                          It shall be available through the "good-plugins" package. See here.

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

                          V 1 Reply Last reply 10 Jun 2022, 05:51
                          0
                          • S SGaist
                            8 Jun 2022, 15:18

                            It shall be available through the "good-plugins" package. See here.

                            V Offline
                            V Offline
                            vicky_mac
                            wrote on 10 Jun 2022, 05:51 last edited by
                            #13

                            @SGaist gstreamer-plugin-good in enabled still error module org.freedesktop.gstreamer.GLVideoItem is not installed comes

                            1 Reply Last reply
                            0
                            • S Offline
                              S Offline
                              SGaist
                              Lifetime Qt Champion
                              wrote on 10 Jun 2022, 20:28 last edited by
                              #14

                              Can you show the GStreamer packages that you have in your installation ?

                              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
                              • JoeCFDJ Offline
                                JoeCFDJ Offline
                                JoeCFD
                                wrote on 10 Jun 2022, 20:56 last edited by JoeCFD 6 Oct 2022, 20:56
                                #15

                                @vicky_mac said in Custom streamer pipeline in QML:

                                module org.freedesktop.gstreamer.GLVideoItem

                                if vaapi is used in the pipeline on linux, install libva-dev

                                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