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. Qt6 QML QtMultimedia : using custom gstreamer pipeline
Forum Updated to NodeBB v4.3 + New Features

Qt6 QML QtMultimedia : using custom gstreamer pipeline

Scheduled Pinned Locked Moved Unsolved Qt 6
8 Posts 3 Posters 2.7k Views 3 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.
  • malikcisM Offline
    malikcisM Offline
    malikcis
    wrote on last edited by
    #1

    Re: Qt6 QtMultimedia : using custom gstreamer pipeline

    Hi,
    I have hard time upgrading my QT5 code to QT6 because of lack of gstreamer native support in QM Multimedia.
    I am using native gstreamer code in the C++ backend and this QML code to render the video:
    MediaPlayer {
    id: mediaplayer
    autoPlay: true
    source: "gst-pipeline: interpipesrc is-live=true listen-to=src_1 ! queue ! qtvideosink sync=false async=false"
    videoOutput: videoOutput
    }

    QT6 Mediaplayer does not support gst-pipeline mechanism anymore.
    SGaist suggested using QML sink but QT6 binding is only available in gstreamer v1.22

    On my embedded system I am using v1.20 and it is not easy to update because this is within yocto framework.

    I am also exploring QVideosink but this involves memory copy of image buffer in Qvideoframe which costs too much CPU.

    Did anyone had same issue?

    JoeCFDJ 1 Reply Last reply
    1
    • malikcisM malikcis

      Re: Qt6 QtMultimedia : using custom gstreamer pipeline

      Hi,
      I have hard time upgrading my QT5 code to QT6 because of lack of gstreamer native support in QM Multimedia.
      I am using native gstreamer code in the C++ backend and this QML code to render the video:
      MediaPlayer {
      id: mediaplayer
      autoPlay: true
      source: "gst-pipeline: interpipesrc is-live=true listen-to=src_1 ! queue ! qtvideosink sync=false async=false"
      videoOutput: videoOutput
      }

      QT6 Mediaplayer does not support gst-pipeline mechanism anymore.
      SGaist suggested using QML sink but QT6 binding is only available in gstreamer v1.22

      On my embedded system I am using v1.20 and it is not easy to update because this is within yocto framework.

      I am also exploring QVideosink but this involves memory copy of image buffer in Qvideoframe which costs too much CPU.

      Did anyone had same issue?

      JoeCFDJ Offline
      JoeCFDJ Offline
      JoeCFD
      wrote on last edited by JoeCFD
      #2

      @malikcis you may try qt gstreamer. The widget sink does not use qml sink. You have to build it with Qt6 because it was made for Qt4/5. Note that it is not maintained anymore. It has a few memory leaks. Also a few changes have to be made.

      Strongly recommend to use higher versions of gstreamer because they have less memory leak. I am currently using 1.22.3. In order to use it, you have to build it and build is messy.

      malikcisM 1 Reply Last reply
      0
      • JoeCFDJ JoeCFD

        @malikcis you may try qt gstreamer. The widget sink does not use qml sink. You have to build it with Qt6 because it was made for Qt4/5. Note that it is not maintained anymore. It has a few memory leaks. Also a few changes have to be made.

        Strongly recommend to use higher versions of gstreamer because they have less memory leak. I am currently using 1.22.3. In order to use it, you have to build it and build is messy.

        malikcisM Offline
        malikcisM Offline
        malikcis
        wrote on last edited by
        #3

        @JoeCFD, Thank you Joe,
        I have seen the QT Gstreamer project and thought maintenance was stopped quite a long time ago.
        God to hear that it can still work.
        I will definitely check this also.

        JoeCFDJ 1 Reply Last reply
        0
        • malikcisM malikcis

          @JoeCFD, Thank you Joe,
          I have seen the QT Gstreamer project and thought maintenance was stopped quite a long time ago.
          God to hear that it can still work.
          I will definitely check this also.

          JoeCFDJ Offline
          JoeCFDJ Offline
          JoeCFD
          wrote on last edited by JoeCFD
          #4

          @malikcis You may also try to use FFmpeg to replace gstreamer. I guess Qt6 MediaPlayer supports it. You have to check the doc and examples. This may be easier.

          malikcisM 1 Reply Last reply
          0
          • JoeCFDJ JoeCFD

            @malikcis You may also try to use FFmpeg to replace gstreamer. I guess Qt6 MediaPlayer supports it. You have to check the doc and examples. This may be easier.

            malikcisM Offline
            malikcisM Offline
            malikcis
            wrote on last edited by
            #5

            @JoeCFD I Already built a complex pipeline with Gstreamer and it would be hard to switch.
            Embedded systems have their GPU support already integrated to Gstreamer.

            T 1 Reply Last reply
            1
            • malikcisM malikcis

              @JoeCFD I Already built a complex pipeline with Gstreamer and it would be hard to switch.
              Embedded systems have their GPU support already integrated to Gstreamer.

              T Offline
              T Offline
              talksik
              wrote on last edited by
              #6

              @malikcis I have the same problem. It is surprising that multi-media for embedded is on the backburner for Qt6.

              I am sticking to Qt5 so that I can use Qml MediaPlayer because Raspberrypi and Jetson Nano both already have gstreamer with hardware accelerated plugins.

              Were you able to find any other resolution to this? Has anyone tried building gstreamer-1.22, including qt6qmlglsink, and then copying the plugin files (.so I believe) to a version of gstreamer-1.20 or lower?

              JoeCFDJ 1 Reply Last reply
              0
              • T talksik

                @malikcis I have the same problem. It is surprising that multi-media for embedded is on the backburner for Qt6.

                I am sticking to Qt5 so that I can use Qml MediaPlayer because Raspberrypi and Jetson Nano both already have gstreamer with hardware accelerated plugins.

                Were you able to find any other resolution to this? Has anyone tried building gstreamer-1.22, including qt6qmlglsink, and then copying the plugin files (.so I believe) to a version of gstreamer-1.20 or lower?

                JoeCFDJ Offline
                JoeCFDJ Offline
                JoeCFD
                wrote on last edited by JoeCFD
                #7

                @talksik I built gstreamer 1.22.5 and have not tested qt6qmlglsink. I am still using qt5qmlglsink. I can test qt6qmlglsink this weekend and will let you know.

                JoeCFDJ 1 Reply Last reply
                0
                • JoeCFDJ JoeCFD

                  @talksik I built gstreamer 1.22.5 and have not tested qt6qmlglsink. I am still using qt5qmlglsink. I can test qt6qmlglsink this weekend and will let you know.

                  JoeCFDJ Offline
                  JoeCFDJ Offline
                  JoeCFD
                  wrote on last edited by
                  #8

                  @JoeCFD You can simply build qml6sink. Its source code is under /gstreamer/subprojects/gst-plugins-good/ext/qt6. Only a few files.

                  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