QtMultimedia not compatible with EGLFS, only XCB

  • Long story short - it does not seem that QtMultimedia can play video if using the eglfs QPA. It only works using xcb and there is no mention of this in the docs! It was a painstaking process to figure this out. There are multiple reports of people that cannot get the plugin working if using eglfs. I'm using Qt 5.4.2 and Yocto to build the imx6 target sysroot. I've verified that the gstreamer 0.10 plugins are installed properly by running the embedded board using XCB with video working and then switching to EGLFS and video not working.

    If using anything but XCB, the following code will always return an error: No m_videoSink available!

    Code extract from qtmultimedia/src/gsttols/qgstreamervideowindow.cpp line 59:

    if (elementName) {
         m_videoSink = gst_element_factory_make(elementName, NULL);
    } else if (QGuiApplication::platformName().compare(QLatin1String("xcb"), Qt::CaseInsensitive) == 0) {
    // We need a native X window handle to be able to use xvimagesink.
    // Bail out if Qt is not using xcb (the control will then be ignored by the plugin)
    m_videoSink = gst_element_factory_make("xvimagesink", NULL);
     if (m_videoSink) {
    qDebug() << "No m_videoSink available!";

    Are there any plans to have QtMultimedia support EGLFS? If not, are there alternatives to getting video play inside of QML?

    Other people with same problem and no resolution:
    1: http://lists.qt-project.org/pipermail/development/2015-July/022236.html
    2: https://forum.qt.io/topic/60508/gstreamer-critical-after-loading-qmediaplayer-s-libs-and-plugins/9
    3: http://gstreamer-devel.966125.n4.nabble.com/Qt-Gstreamer-crashes-with-eglfs-platform-td4673420.html
    4.link 4

  • It would be nice if somebody who is saying that this is not a QPA platform issue could somehow prove it (e.g. youtube video of QtMultimedia playing video in EGLFS). More links:

  • @Andrei

    I agree. It Looks like the bug report went cold unfortunately and I haven't seen anyone comment as to when this issue will be solved. Is there no way to play video inside of QML without using XCB? I would at least like to see the QtMultimedia documentation to reflect the fact that it ONLY works for X11 systems.

  • Have you seen any issues with playing audio files?

    I am having issues where the state of the QMediaPlayer remains "StoppedState" and Volume at "0" after attempting play() and seting Volume to "100".
    The palylist is loaded correctly and shows size > 0, but player->currentMedia() returns null. This only happens on the embedded board. The app works fine on desktop running Ubuntu.

    I'm using EGLFS on imx6 board running linux.

  • Come on, I've played video from camera on Qt 5.5 on eglfs. Is it different for videos?

  • @marcin100 I haven't tried the audio example inside of QML, but I was able to get gstreamer to play the audio of the video fine outside of Qt.

    @devel Not sure, but since you have a working camera on eglfs, can you try playing a video via the qml video player example and letting us know?

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.