Important: Please read the Qt Code of Conduct -

How to play HTML5 video file on i.MX6 with QtWebKit

  • Hi all,

    I have cross built Qt 5.4.2 for the i.MX6 with QtWebKit and I am trying to get video files to play using HTML5. I have a very simple demo application that uses WebView to display an HTML page. That page uses an HTML5 video tag to reference a local video file. When the page is displayed, the video controls appear on the screen fine and even show the proper duration for the sample video file. I can press play and the timeline slider moves like the video is playing, but I never see any video frames on the screen.

    I validated that I can play this video file manually using gstreamer-1.0 that is built into the root file system. So it's not an issue with GStreamer or the video file itself. I understand Qt must interface with GStreamer somehow for playing these video files. Clearly it's not happening automatically. How do I troubleshoot this? Any ideas on what could be going wrong?



    int main(int argc, char* argv[])
        QApplication app(argc, argv);
        QWebView view;
        return app.exec();


    <body bgcolor="white" marginwidth="0" marginheight="0">
    Hello, world!
    <video src="file:///home/root/sample_mpeg4.mp4" controls>
        Your browser does not support HTML5 video.