Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to get mp3 support with QtWebEngine

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 ...

like image 641
Sébastien Bémelmans Avatar asked Nov 22 '25 08:11

Sébastien Bémelmans


2 Answers

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 steppes :

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.

like image 93
Sébastien Bémelmans Avatar answered Nov 24 '25 23:11

Sébastien Bémelmans


I created a new topic on stackoverflow with step by step on how to do this (I lost 5 days to find these so I wanted to save others people time):

How to compile Qt webengine (5.11) on Windows with proprietary codecs

like image 33
Dardan Iljazi Avatar answered Nov 24 '25 22:11

Dardan Iljazi