<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Unable to play mp3&#x2F;mp4 with Qt 5.15.10 on Rapsberry Pi 3 B+]]></title><description><![CDATA[<p dir="auto">I set up a Buildroot environment, so I have a working cross-compiler toolchain with Qt/QML 5.15.10 that runs on a Raspberry Pi 3 B+.<br />
It works fine, but I cannot play any multimedia file.</p>
<p dir="auto">I installed gstreamer-1.0 with some plugins along with gst1-libav.<br />
I'm aware there are tons of plugins, but I just need to play mp3 and mp4 H264 files.</p>
<p dir="auto">Enabling <code>QT_DEBUG_PLUGINS</code> I get:</p>
<pre><code>13:41:01: Starting /opt/foo-qml/bin/foo-qml on test-project...
QML debugging is enabled. Only use this in a safe environment.
QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/qt/plugins/platforms" ...
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/qt/plugins/platforms/libqeglfs.so"
Found metadata in lib /usr/lib/qt/plugins/platforms/libqeglfs.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "eglfs"
        ]
    },
    "archreq": 0,
    "className": "QEglFSIntegrationPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("eglfs")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/qt/plugins/platforms/libqminimal.so"
Found metadata in lib /usr/lib/qt/plugins/platforms/libqminimal.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "minimal"
        ]
    },
    "archreq": 0,
    "className": "QMinimalIntegrationPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("minimal")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/qt/plugins/platforms/libqminimalegl.so"
Found metadata in lib /usr/lib/qt/plugins/platforms/libqminimalegl.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "minimalegl"
        ]
    },
    "archreq": 0,
    "className": "QMinimalEglIntegrationPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("minimalegl")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/qt/plugins/platforms/libqoffscreen.so"
Found metadata in lib /usr/lib/qt/plugins/platforms/libqoffscreen.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "offscreen"
        ]
    },
    "archreq": 0,
    "className": "QOffscreenIntegrationPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("offscreen")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/qt/plugins/platforms/libqvnc.so"
Found metadata in lib /usr/lib/qt/plugins/platforms/libqvnc.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "vnc"
        ]
    },
    "archreq": 0,
    "className": "QVncIntegrationPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("vnc")
QFactoryLoader::QFactoryLoader() checking directory path "/opt/foo-qml/bin/platforms" ...
loaded library "/usr/lib/qt/plugins/platforms/libqeglfs.so"
QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/qt/plugins/egldeviceintegrations" ...
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/qt/plugins/egldeviceintegrations/libqeglfs-emu-integration.so"
Found metadata in lib /usr/lib/qt/plugins/egldeviceintegrations/libqeglfs-emu-integration.so, metadata=
{
    "IID": "org.qt-project.qt.qpa.egl.QEglFSDeviceIntegrationFactoryInterface.5.5",
    "MetaData": {
        "Keys": [
            "eglfs_emu"
        ]
    },
    "archreq": 0,
    "className": "QEglFSEmulatorIntegrationPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("eglfs_emu")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/qt/plugins/egldeviceintegrations/libqeglfs-kms-egldevice-integration.so"
Found metadata in lib /usr/lib/qt/plugins/egldeviceintegrations/libqeglfs-kms-egldevice-integration.so, metadata=
{
    "IID": "org.qt-project.qt.qpa.egl.QEglFSDeviceIntegrationFactoryInterface.5.5",
    "MetaData": {
        "Keys": [
            "eglfs_kms_egldevice"
        ]
    },
    "archreq": 0,
    "className": "QEglFSKmsEglDeviceIntegrationPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("eglfs_kms_egldevice")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/qt/plugins/egldeviceintegrations/libqeglfs-kms-integration.so"
Found metadata in lib /usr/lib/qt/plugins/egldeviceintegrations/libqeglfs-kms-integration.so, metadata=
{
    "IID": "org.qt-project.qt.qpa.egl.QEglFSDeviceIntegrationFactoryInterface.5.5",
    "MetaData": {
        "Keys": [
            "eglfs_kms"
        ]
    },
    "archreq": 0,
    "className": "QEglFSKmsGbmIntegrationPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("eglfs_kms")
QFactoryLoader::QFactoryLoader() checking directory path "/opt/foo-qml/bin/egldeviceintegrations" ...
loaded library "/usr/lib/qt/plugins/egldeviceintegrations/libqeglfs-kms-integration.so"
QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/qt/plugins/imageformats" ...
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/qt/plugins/imageformats/libqico.so"
Found metadata in lib /usr/lib/qt/plugins/imageformats/libqico.so, metadata=
{
    "IID": "org.qt-project.Qt.QImageIOHandlerFactoryInterface",
    "MetaData": {
        "Keys": [
            "ico",
            "cur"
        ],
        "MimeTypes": [
            "image/vnd.microsoft.icon",
            "image/vnd.microsoft.icon"
        ]
    },
    "archreq": 0,
    "className": "QICOPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("ico", "cur")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/qt/plugins/imageformats/libqjpeg.so"
Found metadata in lib /usr/lib/qt/plugins/imageformats/libqjpeg.so, metadata=
{
    "IID": "org.qt-project.Qt.QImageIOHandlerFactoryInterface",
    "MetaData": {
        "Keys": [
            "jpg",
            "jpeg"
        ],
        "MimeTypes": [
            "image/jpeg",
            "image/jpeg"
        ]
    },
    "archreq": 0,
    "className": "QJpegPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("jpg", "jpeg")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/qt/plugins/imageformats/libqsvg.so"
Found metadata in lib /usr/lib/qt/plugins/imageformats/libqsvg.so, metadata=
{
    "IID": "org.qt-project.Qt.QImageIOHandlerFactoryInterface",
    "MetaData": {
        "Keys": [
            "svg",
            "svgz"
        ],
        "MimeTypes": [
            "image/svg+xml",
            "image/svg+xml-compressed"
        ]
    },
    "archreq": 0,
    "className": "QSvgPlugin",
    "debug": false,
    "version": 331520
}


Got keys from plugin meta data ("svg", "svgz")
QFactoryLoader::QFactoryLoader() checking directory path "/opt/foo-qml/bin/imageformats" ...
loaded library "/usr/lib/qt/plugins/imageformats/libqico.so"
loaded library "/usr/lib/qt/plugins/imageformats/libqjpeg.so"
loaded library "/usr/lib/qt/plugins/imageformats/libqsvg.so"
*** INFO *** ()
Found metadata in lib /usr/qml/QtQuick.2/libqtquick2plugin.so, metadata=
{
    "IID": "org.qt-project.Qt.QQmlExtensionInterface/1.0",
    "archreq": 0,
    "className": "QtQuick2Plugin",
    "debug": false,
    "uri": [
        "QtQuick.2"
    ],
    "version": 331520
}


loaded library "/usr/qml/QtQuick.2/libqtquick2plugin.so"
Found metadata in lib /usr/qml/QtQuick/Window.2/libwindowplugin.so, metadata=
{
    "IID": "org.qt-project.Qt.QQmlEngineExtensionInterface",
    "archreq": 0,
    "className": "QtQuick2WindowPlugin",
    "debug": false,
    "uri": [
        "QtQuick.Window.2"
    ],
    "version": 331520
}


loaded library "/usr/qml/QtQuick/Window.2/libwindowplugin.so"
Found metadata in lib /usr/qml/QtMultimedia/libdeclarative_multimedia.so, metadata=
{
    "IID": "org.qt-project.Qt.QQmlExtensionInterface/1.0",
    "archreq": 0,
    "className": "QMultimediaDeclarativeModule",
    "debug": false,
    "uri": [
        "QtMultimedia"
    ],
    "version": 331520
}
</code></pre>
<p dir="auto">Key points:</p>
<pre><code>QAudioDeviceInfo info;
qDebug() &lt;&lt; info.supportedCodecs();
</code></pre>
<p dir="auto">returns an empty list.</p>
<pre><code>Audio {
    source: "file:///root/test.mp3"
    autoLoad: true
    autoPlay: true

    onError: console.log(errorString)
}
</code></pre>
<p dir="auto">returns:</p>
<pre><code>Got keys from plugin meta data ("gstreamermediaplayer")
QFactoryLoader::QFactoryLoader() checking directory path "/opt/foo-qml/bin/mediaservice" ...
loaded library "/usr/lib/qt/plugins/mediaservice/libgstmediaplayer.so"
QMediaPluginLoader: loaded plugins for key "org.qt-project.qt.mediaplayer" : ("gstreamermediaplayer")
QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/qt/plugins/resourcepolicy" ...
QFactoryLoader::QFactoryLoader() checking directory path "/opt/foo-qml/bin/resourcepolicy" ...
qml: play
QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/qt/plugins/accessible" ...
QFactoryLoader::QFactoryLoader() checking directory path "/opt/foo-qml/bin/accessible" ...
QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/qt/plugins/accessiblebridge" ...
QFactoryLoader::QFactoryLoader() checking directory path "/opt/foo-qml/bin/accessiblebridge" ...
qml: Internal data stream error.
Error: "Internal data stream error."
</code></pre>
<p dir="auto">while:</p>
<pre><code>Video {
        source: "file:///root/sample.mp4"
        autoLoad: true
        autoPlay: true

        onErrorStringChanged: console.log(errorString)
        onPlaying: console.log("play")
}
</code></pre>
<p dir="auto">returns:</p>
<pre><code>loaded library "/usr/qml/QtMultimedia/libdeclarative_multimedia.so"
13:41:02: /opt/foo-qml/bin/foo-qml on test-project exited with code 255
</code></pre>
<p dir="auto">and it exits the program.</p>
<p dir="auto">What specific plugins I need to add in order to play those files?</p>
]]></description><link>https://forum.qt.io/topic/148934/unable-to-play-mp3-mp4-with-qt-5-15-10-on-rapsberry-pi-3-b</link><generator>RSS for Node</generator><lastBuildDate>Thu, 05 Nov 2026 02:10:30 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/148934.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 03 Sep 2023 11:51:36 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Unable to play mp3&#x2F;mp4 with Qt 5.15.10 on Rapsberry Pi 3 B+ on Sun, 03 Sep 2023 12:49:15 GMT]]></title><description><![CDATA[<p dir="auto">Sorry, another update. This snippet:</p>
<pre><code>MediaPlayer {
    id: mediaplayer
    source: "file:///root/sample.mp4"
    autoPlay: true
}

VideoOutput {
    anchors.fill: parent
    source: mediaplayer
}
</code></pre>
<p dir="auto">works fine.<br />
So it's only the <code>Video</code> object that does not work.<br />
I can live with <code>MediaPlayer</code> + <code>VideoOutput</code> but I'd like to understand why the first option does not work.</p>
]]></description><link>https://forum.qt.io/post/771364</link><guid isPermaLink="true">https://forum.qt.io/post/771364</guid><dc:creator><![CDATA[Mark81]]></dc:creator><pubDate>Sun, 03 Sep 2023 12:49:15 GMT</pubDate></item><item><title><![CDATA[Reply to Unable to play mp3&#x2F;mp4 with Qt 5.15.10 on Rapsberry Pi 3 B+ on Sun, 03 Sep 2023 12:39:52 GMT]]></title><description><![CDATA[<p dir="auto">After making a clean build of Buildroot, the mp3 file plays fine, even if <code>QAudioDeviceInfo::supportedCodecs()</code> still returns an empty list.</p>
<p dir="auto">Instead, enabling the <code>Video</code> section in QML leads to the same "crash" with error -255.</p>
]]></description><link>https://forum.qt.io/post/771363</link><guid isPermaLink="true">https://forum.qt.io/post/771363</guid><dc:creator><![CDATA[Mark81]]></dc:creator><pubDate>Sun, 03 Sep 2023 12:39:52 GMT</pubDate></item></channel></rss>