3

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

demonplus
  • 5,613
  • 12
  • 49
  • 68
  • For those wo are interested, I posted on Qt forum too (no responses at this time) : https://forum.qt.io/topic/75179/qtwebengine-compilation-with-proprietary-codecs-doesn-t-work – Sébastien Bémelmans Jan 16 '17 at 12:43

4 Answers4

4

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 :

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.

  • 1
    I wanted to add a little problem I had when doing this: C:\Qt\5.7\msvc2015\bin\qmake WEBENGINE_CONFIG+=use_proprietary_codecs I had a problem telling me that the command `'cl' couldn't execute`. I fixed this by uninstalling Msvc 2015 with MaintenanceTool.exe and reinstall it again. It worked then. – Dardan Iljazi May 19 '18 at 16:48
2

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

Dardan Iljazi
  • 747
  • 1
  • 9
  • 16
0

In the chromium GYP build parameters file, I can read :

['proprietary_codecs==1', {
        'defines': ['USE_PROPRIETARY_CODECS'],
}],

Then I think there is a mistake in the Qt WebEngine Features documentation.

You should try to add in your qtwebengine.pro file

WEBENGINE_CONFIG+=proprietary_codecs

and not

WEBENGINE_CONFIG+=use_proprietary_codecs
Tony
  • 1
  • 3
  • I already try these lines. It doesn't work. But, I force value in common.gypi file. Now if I go to html5test.com, mp3 and h264 support is OK, but the browser still not able to play these media... – Sébastien Bémelmans Jan 19 '17 at 12:56
0

I tried the solution of Sébastien Bémelmans but it didn't work for me (I have Qt version 5.10.1).

Instead I found a solution on qt forum that I modified a bit to fit the actual Qt 5.10.1 version.

After doing all what Sébastien Bémelmans said:

#Edit ..\%QT_SOURCES_DIR%\qtwebengine\.qmake.conf
#Add
WEBENGINE_CONFIG += use_proprietary_codecs

#Edit ...\%QT_SOURCES_DIR%\qtwebengine\configure.json
#Search for webengine-proprietary-codecs
"autoDetect": false,
into
"autoDetect": true,
#Run qmake into ...\%QT_SOURCES_DIR%\qtwebengine\ (normally no need of adding WEBENGINE_CONFIG += use_proprietary_codecs after qmake)
Dardan Iljazi
  • 747
  • 1
  • 9
  • 16