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?
-
@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 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?