Important: Please read the Qt Code of Conduct -

QMediaPlayer not showing Video on Raspberry Pi, works fine on Windows

  • Hello,
    I'm trying to play a video in a qt application, running on a raspberry pi 4. The application compiles and I can run it, but the window is blanc. Also no errors.

    When I compile and run the same project on Windows on the other hand, the video plays.

    My code inside of the MainWindow-Constructor is:

        QMediaPlayer *player = new QMediaPlayer;
        QVideoWidget *videoWidget = new QVideoWidget;

    The video file is in the project folder, but also on the pi, in the same directory as the executable. Am I missing some linux Packages on the Pi?

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Can you play that file with GStreamer on your Pi ?
    Which version of Qt are you using ?
    Are you cross-compiling ?

Log in to reply