Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. How to play HTML5 video file on i.MX6 with QtWebKit
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved Mobile and Embedded
qt5.4.2qtwebkitwebviewlinuxvideowebview webkiti.mx6
1 Posts 1 Posters 1.9k 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.
  • N Offline
    N Offline
    njozwiak
    wrote on last edited by
    #1

    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
    0

    • Login

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