无法使用QtWebEngine获得mp3支持 [英] Unable to get mp3 support with QtWebEngine
问题描述
我写了WEBENGINE_CONFIG + = use_proprietary_codecs到qtwebengine.pro。 qmake正在配置该项目时,我看到日志表示启用了MP3 et H264编解码器。
我花了一天时间,在32位和32位中使用msvc2015完整编译了QtWebEngine。 .. mp3支持仍然无法运行!
我使用html5test.com快速浏览webbrowser功能。
我搜索了一下,我发现一个没有构建的ffmpegsumo.dll。我试图通过互联网获得一个32位副本,我不知道真的在哪里放,我尝试了不同的地方,仍然没有工作。最后我的东西不是好主意。
QtWebEngine如何使用mp3编解码器?我有点迷路了...
我终于找到了解决方案。简而言之,不要尝试使用Qt Creator来编译Qt SDK或其任何部分...
只需使用 qmake 和 nmake 在一个简单的 cmd.exe shell中。以下是我如何执行步骤:
首先,我通过维护工具将Qt SDK(5.7.1)的源文件下载到
然后,我下载了额外的工具:
- Python 2.7.13 from https://www.python.org/downloads/windows/
- Perl(Strawberry vesion)来自 http://strawberryperl.com/
- Bison and flex from < a href =https://sourceforge.net/projects/winflexbison/ =nofollow noreferrer> https://sourceforge.net/projects/winflexbison/ (将win-bison.exe重命名为bison。 exe和win-flex.exe到flex.exe)
- Gperf来自 http://gnuwin32.sourceforge.net/packages/gperf.htm
请确保添加每个.exe到系统路径,然后重新启动计算机。
假设Qt SDK安装在c:\Qt中,版本是5.7.1编译与MSVC2015,您启动cmd.exe,您键入:
c code code $ C $ \\ use_proprietary_codecs
*等待基本配置... *
nmake
*等待编译... *
nmake安装
*等待文件复制到SDK ... *
然后你可以正常使用SDK,就好像你刚刚下载了。
I built QtWebEngine 5.7.1 from git sources to get support of proprietary codecs.
I wrote "WEBENGINE_CONFIG+=use_proprietary_codecs" to the qtwebengine.pro. While qmake was configuring the project, I saw the log saying that MP3 et H264 codecs were enabled.
I spent one day to get QtWebEngine fully compiled with msvc2015 in 32bit and ... The mp3 support still not working !
I use html5test.com to get a quick look of webbrowser capabilities.
I searched a bit and I found out about a ffmpegsumo.dll that wasn't built. I tried to get a 32bits copy over the internet, I don't know really where to put it, I tried different places, that still not working. Finally I thing that's not the good idea.
How QtWebEngine uses mp3 codec ? I'm a bit lost ...
I finally found the solution. In brief, do not try to compile Qt SDK or any part of it using Qt Creator ...
Just use qmake and nmake in a simple cmd.exe shell. Here is how I did steps :
First, I downloaded the source along the Qt SDK (5.7.1) with MaintenanceTools.
Then, I downloaded extra tools :
- Python 2.7.13 from https://www.python.org/downloads/windows/
- Perl (Strawberry vesion) from http://strawberryperl.com/
- Bison and flex from https://sourceforge.net/projects/winflexbison/ (Rename win-bison.exe to bison.exe and win-flex.exe to flex.exe)
- Gperf from http://gnuwin32.sourceforge.net/packages/gperf.htm
Be sure to add every .exe to System path, and restart the computer.
Assuming Qt SDK is installed in c:\Qt, and the version is 5.7.1 compiled with MSVC2015, you start cmd.exe and you type :
cd C:\Qt\5.7\Src\qtwebengine\
C:\Qt\5.7\msvc2015\bin\qmake WEBENGINE_CONFIG+=use_proprietary_codecs
* Wait for basic configuration ... *
nmake
* Wait for compilation ... *
nmake install
* Wait for files copy into SDK ... *
Then you can use the SDK normally as if you just had downloaded it.
这篇关于无法使用QtWebEngine获得mp3支持的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!