Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

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

    Mobile and Embedded
    qt5.4.2 qtwebkit webview linux video webview webkit i.mx6
    1
    1
    1695
    Loading More Posts
    • 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.
    • N
      njozwiak last edited by

      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?

      Thanks

      main.cpp

      int main(int argc, char* argv[])
      {
          QApplication app(argc, argv);
          QWebView view;
          view.load(QUrl("file:///home/root/content/page.html"));
          view.show();
          return app.exec();
       }
      

      page.html

      <html>
      <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.
      </video>
      </body>
      </html>
      
      1 Reply Last reply Reply Quote 0
      • First post
        Last post