Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Using Video from QtMultimedia on RPi4



  • I am using a RPi4 and running QML nativly. In the past I used to cross-compile QT but I don't think it is really needed on the RPi4.

    I am on the following version:

    $ uname -a
    Linux raspberrypi 4.19.97-v7l+ #1294 SMP Thu Jan 30 13:21:14 GMT 2020 armv7l GNU/Linux
    

    After installing needed QT modules, I gave the Video element a test and nothing shows up, no error messages either.

    Here is the basic code:

    import QtQuick 2.9
    import QtQuick.Window 2.2
    import QtMultimedia 5.5
    
    Window {
        visible: true
        color: "orange"
        width: 800
        height: 600
    
        Video {
            id: video
            source: "file:///home/pi/test.mp4"
            anchors.fill: parent
            autoLoad: true
            autoPlay: true
        }
        MouseArea {
            anchors.fill: parent
            onClicked: {
                console.log("xxx")
                video.play()
            }
        }
    }
    

    I have pretty much installed whatever gstreamer packages I could find and still nothing. The window shows but nothing is playing.


Log in to reply