Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
qtws26_logo

The Qt Event of the Year: Qt World Summit 2026

Save Your Spot >
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Unable to play mp3/mp4 with Qt 5.15.10 on Rapsberry Pi 3 B+
Qt 6.12 LTS is out! See what's new in the release blog

Unable to play mp3/mp4 with Qt 5.15.10 on Rapsberry Pi 3 B+

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
3 Posts 1 Posters 1.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mark81
    wrote on last edited by Mark81
    #1

    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+.
    It works fine, but I cannot play any multimedia file.

    I installed gstreamer-1.0 with some plugins along with gst1-libav.
    I'm aware there are tons of plugins, but I just need to play mp3 and mp4 H264 files.

    Enabling QT_DEBUG_PLUGINS I get:

    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
    }
    

    Key points:

    QAudioDeviceInfo info;
    qDebug() << info.supportedCodecs();
    

    returns an empty list.

    Audio {
        source: "file:///root/test.mp3"
        autoLoad: true
        autoPlay: true
    
        onError: console.log(errorString)
    }
    

    returns:

    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."
    

    while:

    Video {
            source: "file:///root/sample.mp4"
            autoLoad: true
            autoPlay: true
    
            onErrorStringChanged: console.log(errorString)
            onPlaying: console.log("play")
    }
    

    returns:

    loaded library "/usr/qml/QtMultimedia/libdeclarative_multimedia.so"
    13:41:02: /opt/foo-qml/bin/foo-qml on test-project exited with code 255
    

    and it exits the program.

    What specific plugins I need to add in order to play those files?

    1 Reply Last reply
    0
    • M Offline
      M Offline
      Mark81
      wrote on last edited by Mark81
      #2

      After making a clean build of Buildroot, the mp3 file plays fine, even if QAudioDeviceInfo::supportedCodecs() still returns an empty list.

      Instead, enabling the Video section in QML leads to the same "crash" with error -255.

      1 Reply Last reply
      0
      • M Offline
        M Offline
        Mark81
        wrote on last edited by
        #3

        Sorry, another update. This snippet:

        MediaPlayer {
            id: mediaplayer
            source: "file:///root/sample.mp4"
            autoPlay: true
        }
        
        VideoOutput {
            anchors.fill: parent
            source: mediaplayer
        }
        

        works fine.
        So it's only the Video object that does not work.
        I can live with MediaPlayer + VideoOutput but I'd like to understand why the first option does not work.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt
        • Unsolved