Unable to play videos on QML Qt6.4 on embedded platform
-
@imahgin which gstreamer version? check it out
gst-launch-1.0 --versionqml6 sink is available in the later versions of gstreamer. You can build it as well.
Take a look at qgroundcontrol source code. For Android, qml5sink is built from gstreamer source code. You can do the same thing for qml6sink. -
According to this information seems that Qt6 support for rendering video inside a QML scene is available only from version 1.22.0, and according to this NXP document (I'm using this MPU) this version is included in Rev. LF6.1.36_2.1.0 (page 9)
My distribution is previous to that revision and gstreamer version is 1.20.3.
As I'm not an experienced user in Yocto, I'll try to get some assistance to see if there is an 'easy' way to include this -or latest version- on my current Yocto compilation, without breaking other packages. -
@imahgin This is what I posted in gstreamer forum before. The latest gstreamer version is 1.22.6. Make sure that your video card is not too old if you use the latest gstreamer.
Get Source get source: git clone ​https://gitlab.freedesktop.org/gstreamer/gstreamer.git git tag -l <==== to list all tags git checkout tags/1.22.5 <==== for example Build and install cd gstreamer meson setup --prefix=/opt/thirdParties/gstreamer1-22-5 -Dlibdir=lib builddir ninja -C builddir sudo ninja install -C builddir
Do not install it in the default dir or under /usr/... because your new installation may mess up with the old installation. And it is hard for you to clean it up. If you purge the old installation, some of video tools installed may not work anymore. Set the proper paths for bin, libs and drivers of the newly installed gstreamer.
meson version may not match. Get the latest meson source and build it. -
Today I've successfully built a Yocto image with Qt 6.5 and gstreamer 1.22.0 but the problem remains :-(
Audio works fine, but I get blank image when playing videos on QML..
No errors are displayed and running gstreamer from CLI can play videos without issues.
Tried with both 'Video' and 'MediaPlayer' QML components with the same result. -
@imahgin make sure qml6sink in gstreamer is built and available. if your default Qt is 5, gstreamer build may not include qml6sink. Check the configure info to see if Qt6 is applied to gstreamer build.
FFMpeg is the backend in Qt6. I am not familiar with FFMpeg and do not know if you need qml6 sink in qml when you use Qt multimedia module.
-