使mp4 / h264视频在Windows上的QtWebEngine中运行 [英] Make mp4/h264 video work in QtWebEngine on Windows

查看:2199
本文介绍了使mp4 / h264视频在Windows上的QtWebEngine中运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我将QtWebEngine实例指向html5测试页面时( http:// www .quirksmode.org / html5 / tests / video.html )我看到了WebM视频,Theora视频,但没有看到H.264 / MP4。

When I point the QtWebEngine instance at a html5 test page (http://www.quirksmode.org/html5/tests/video.html) I see the WebM video, the Theora video, but not H.264/MP4.

在Linux上为Qt5 WebEngine启用mp4 / mpeg4 / avc支持说要从源代码构建qtwebengine,所以我正在构建所有内容。

Enabling mp4/mpeg4/avc support for Qt5 WebEngine on Linux said to build qtwebengine from source, so I'm building everything.

我下载了这个源代码包:
http://download.qt.io /official_releases/qt/5.5/5.5.0/single/qt-everywhere-opensource-src-5.5.0.zip

I downloaded this source package: http://download.qt.io/official_releases/qt/5.5/5.5.0/single/qt-everywhere-opensource-src-5.5.0.zip

我按照指示其他依赖项,然后尝试使用这些命令构建:

I followed the directions for other dependencies, and then tried building with these commands:

configure -prefix %QT_ROOT%\build -opengl dynamic -release -nomake examples -opensource -confirm-license  -qt-libpng -qt-libjpeg -openssl -qt-pcre -no-cups -no-dbus -skip qtwebkit -skip qtconnectivity -skip qtdoc -skip qtgraphicaleffects -skip qtsensors -skip qtserialport -skip qtwebkit-examples -skip qtquick1 -skip qt3d -skip qtwebengine
nmake
nmake install
cd qtwebengine
..\build\bin\qmake WEBENGINE_CONFIG+=use_proprietary_codecs qtwebengine.pro
nmake
nmake install

然后当我构建针对我的新构建的Web浏览器示例,我得到与以前相同的结果。当我试图寻找它构建或不构建编解码器的证据时,我看到ffmpegsumo.dll已经创建。我在javascript控制台中看到没有关于此的错误。我已经测试了除quicksmode之外的其他测试网页,也没有结果。

Then when I build the web browser example against my new build, I get the same results as before. When I try to look for evidence that it did or didn't build the codecs, I see that ffmpegsumo.dll was created. I see no errors in the javascript console about this. I've tested with other test web pages beyond quicksmode and no results there either.

推荐答案

我的解决方案是升级到Qt 5.6 0.1。否则,我按照原始问题中的指示,这次得到了一个工作结果。最值得注意的是, qmake WEBENGINE_CONFIG + = use_proprietary_codecs 确实确认它正在检查和配置h264和mp3。

My solution was to upgrade to Qt 5.6.1. Otherwise, I followed the directions in the original question and this time got a working result. Most notable, the qmake WEBENGINE_CONFIG+=use_proprietary_codecs did confirm it was checking and configuring h264 and mp3.

这篇关于使mp4 / h264视频在Windows上的QtWebEngine中运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆