[QWebView] HTML5 video with Hardware Decoding
-
Hi,
i'm not sure but try this:
@view->settings()->setAttribute(QWebSettings::PluginsEnabled, true);@ -
Thanks Vovasty, but after adding this, the video is still lag...
-
"video lag"? Your project is compiled in "DEBUG mode"?
Try compile in RELEASE.
-
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. -
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 :)
-
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~
-
Hi birdca,
Just a comment:
Note, VLC and Chrome no using native codecs, but QT use native codec installed in your machine.
-
Hi birdca,
Just a comment:
Note, VLC and Chrome no using native codecs, but QT use native codec installed in your machine.
-
Noted, thank you Guilherme~
-
Noted, thank you Guilherme~