Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt WebKit
  4. [QWebView] HTML5 video with Hardware Decoding
Forum Updated to NodeBB v4.3 + New Features

[QWebView] HTML5 video with Hardware Decoding

Scheduled Pinned Locked Moved Qt WebKit
11 Posts 3 Posters 6.3k Views 2 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.
  • V Offline
    V Offline
    Vovasty
    wrote on last edited by
    #2

    Hi,
    i'm not sure but try this:
    @view->settings()->setAttribute(QWebSettings::PluginsEnabled, true);@

    1 Reply Last reply
    0
    • B Offline
      B Offline
      birdca
      wrote on last edited by
      #3

      Thanks Vovasty, but after adding this, the video is still lag...

      1 Reply Last reply
      0
      • B Offline
        B Offline
        brcontainer
        wrote on last edited by
        #4

        "video lag"? Your project is compiled in "DEBUG mode"?

        Try compile in RELEASE.

        QT project: https://github.com/brcontainer/qt-helper

        1 Reply Last reply
        0
        • B Offline
          B Offline
          birdca
          wrote on last edited by
          #5

          Hi Guilherme, same in RELEASE mode.

          I think it's a codec problem, it's a H.264 video. If you use CPU to decode, it may be not that efficient, and it'll drop some frames, to cause video lag.
          That's why I want to use GPU to decode.

          1 Reply Last reply
          0
          • B Offline
            B Offline
            brcontainer
            wrote on last edited by
            #6

            I believe the "QT" use the defined "codecs" of your operating system, you may not be the question you set the "QT" but set the "CODEC" software installed on your machine, so even if you redistribute your project, the user will be required to configure the "codec" manually.

            In other words, perhaps the only way of doing this is as "GoogleChrome" does: it has the own "codec" that accompanies the browser.

            Unfortunately I do not know how to use a "codec" in itself "QtWebKit" (I really wanted to know if this is possible).

            Alternative (improved perfomance of "webView"):
            If Windows: You use "openGL"? Tried enable "webGL"?

            Note: I do not know if it will work, but it's a try.

            Try this:
            @QWebSettings *settings = QWebSettings::globalSettings();

            settings->setAttribute(QWebSettings::AcceleratedCompositingEnabled, true);
            settings->setAttribute(QWebSettings::WebGLEnabled, true);@

            Note: Maybe QT5.4 use Chromium, see codec details: http://www.chromium.org/audio-video :)

            QT project: https://github.com/brcontainer/qt-helper

            1 Reply Last reply
            0
            • B Offline
              B Offline
              birdca
              wrote on last edited by
              #7

              oh, I played the same video in VLC and in Chrome in the same machine, both of them works fine! The video are smooth. So, I think, maybe I could do something in QtWebView to make it work.

              Hmmm.. still got video lag. Thank you, Guilherme!

              Interesting! :D

              Thanks, Guilherme~

              1 Reply Last reply
              0
              • B Offline
                B Offline
                brcontainer
                wrote on last edited by
                #8

                Hi birdca,

                Just a comment:

                Note, VLC and Chrome no using native codecs, but QT use native codec installed in your machine.

                QT project: https://github.com/brcontainer/qt-helper

                1 Reply Last reply
                0
                • B Offline
                  B Offline
                  brcontainer
                  wrote on last edited by
                  #9

                  Hi birdca,

                  Just a comment:

                  Note, VLC and Chrome no using native codecs, but QT use native codec installed in your machine.

                  QT project: https://github.com/brcontainer/qt-helper

                  1 Reply Last reply
                  0
                  • B Offline
                    B Offline
                    birdca
                    wrote on last edited by
                    #10

                    Noted, thank you Guilherme~

                    1 Reply Last reply
                    0
                    • B Offline
                      B Offline
                      birdca
                      wrote on last edited by
                      #11

                      Noted, thank you Guilherme~

                      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