Yocto Qt multimedia QML plugins missing
-
wrote on 15 Jul 2019, 19:10 last edited by
Hello
I am working on Linux embedded board with iMX6ULL and Yocto.
I want to use QML multimedia elements in my application, but QML multimedia plugins are not generated during bitbake build process.
I have following QT elements added to my Linux image:qtbase \ qtbase-plugins \ qtserialport \ qt5-env \ libxkbcommon \ qtquickcontrols \ qtquickcontrols2 \ qtmultimedia \ qtmultimedia-plugins \ qtmultimedia-qmlplugins \ gstreamer1.0 \ gstreamer1.0-libav \ gstreamer1.0-plugins-good \ gstreamer1.0-plugins-bad \ gstreamer1.0-plugins-imx \
qtbase is build with config(framebuffer output, no X11/wayland):
PACKAGECONFIG_append = " no-opengl accessibility fontconfig linuxfb libinput xkbcommon" PACKAGECONFIG_remove = " examples tests gbm eglfs gl gles2 kms"
And qt multimedia with gstreamer backend:
PACKAGECONFIG_append = "gstreamer"
Qt QML modules like qtquickcontrols2 works. I can run gallery demo, but any other QML example with multimedia module returns:
QQmlApplicationEngine failed to load component qrc:/main.qml:3 module "QtMultimedia" is not installed
By the way camera example with standard qtwidgets - no QML works.
Maybe I am doing something wrong, maybe it's a bug. How to get QML multimedia plugins on Linux embedded with Yocto?
-
Hello
I am working on Linux embedded board with iMX6ULL and Yocto.
I want to use QML multimedia elements in my application, but QML multimedia plugins are not generated during bitbake build process.
I have following QT elements added to my Linux image:qtbase \ qtbase-plugins \ qtserialport \ qt5-env \ libxkbcommon \ qtquickcontrols \ qtquickcontrols2 \ qtmultimedia \ qtmultimedia-plugins \ qtmultimedia-qmlplugins \ gstreamer1.0 \ gstreamer1.0-libav \ gstreamer1.0-plugins-good \ gstreamer1.0-plugins-bad \ gstreamer1.0-plugins-imx \
qtbase is build with config(framebuffer output, no X11/wayland):
PACKAGECONFIG_append = " no-opengl accessibility fontconfig linuxfb libinput xkbcommon" PACKAGECONFIG_remove = " examples tests gbm eglfs gl gles2 kms"
And qt multimedia with gstreamer backend:
PACKAGECONFIG_append = "gstreamer"
Qt QML modules like qtquickcontrols2 works. I can run gallery demo, but any other QML example with multimedia module returns:
QQmlApplicationEngine failed to load component qrc:/main.qml:3 module "QtMultimedia" is not installed
By the way camera example with standard qtwidgets - no QML works.
Maybe I am doing something wrong, maybe it's a bug. How to get QML multimedia plugins on Linux embedded with Yocto?
-
wrote on 16 Jul 2019, 12:44 last edited by
Yes, i have
QT += multimedia
in my.pro
file. I am trying to run programs from QT examples, but I haven't QML multimedia plugins inside my Linux embedded system. In /usr/lib/qml there is no QtMultimedia directory with multimedia plugins needed to use QML multimedia elements like Camera or MediaPlayerroot# opkg files qtmultimedia-qmlplugins
Package qtmultimedia-qmlplugins (5.12.3+git0+64981aee3b-r0) is installed on root and has the following files:Doesn't return any installed file.
-
wrote on 13 Aug 2019, 01:23 last edited by
Hi,
are you sure that, you have installed qtmultimedia? it is not included inside default packages.sudo apt-get install qtmultimedia5-* qml-module-qtmultimedia
-
wrote on 22 Aug 2019, 05:55 last edited by
@David_001 Yes, qt multimedia examples works with qtwidgets, but not with QML because of QML plugins are missing.
It is custom Linux distro generated using Yocto. There is no sudo and apt-get.
The reason why there is no qml plugiuns is probably that iMX6ULL doesn't have GPU and not support OpenGL which seems to be required to build qtmultimedia QML plugins -
wrote on 23 Aug 2019, 10:24 last edited by VaL Doroshchuk
Do you see something there usr/lib/qml/QtMultimedia ?
upd: ok, I see, it is -no-openglyes, QML MediaPlayer requires to have opengl,
so you use linuxfb?
There is still possible to use Qt Multimedia, (but using gstreamer and custom video sinks or pipeline).
qtmultimediaquicktools module is not built without opengl, it contains qml renderers, but also not for opengl.And qml imports are also not built because missing qtmultimediaquicktools.
So if you really want to use MediaPlayer in QML, either enable opengl (and do not use it, if it is not needed) or expose cpp objects to QML manually and use QMediaPlayer to set custom video sinks/pipeline to render to default overlay, not a QML item.
-
wrote on 23 Aug 2019, 12:38 last edited by tomasz3dk
You forgot space in
PACKAGECONFIG_append = "gstreamer"
it should be:
PACKAGECONFIG_append = " gstreamer"
And as @VaL-Doroshchuk mentioned, opengl should be enabled, another thing is that you should better switch to eglfs plugin instead linuxfb, AFAIK imx6ULL have support for it.