Qt6 QML QtMultimedia : using custom gstreamer pipeline
-
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.22On 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?
-
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.22On 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?
@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.
-
@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.
-
@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. -
@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.
-
@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.@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?
-
@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?
-
@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.