QtWebEngine compilation with proprietary codecs doesn't work
-
Hello,
I'm in charge of a software which uses Qt SDK and it need the web browser included. We switched to Qt 5.7 to get modern web capabilities. We solved all our migration problems from QtWebkit to QtWebengine, except one thing : MP3 playback. And we really need it.
So I followed this article https://blog.qt.io/blog/2016/06/03/netflix-qt-webengine-5-7/ and somes others on the Internet.
My target is Qt 5.7.1 32bits with MSVC2015. My approach was to download from github the qtwebengine module, supply everything it needs for compilation. I added the line "WEBENGINE_CONFIG+=use_proprietary_codecs" (and in doubt, "WEBENGINE_CONFIG+=proprietary_codecs", I saw it somewhere written that way) to "qtwebengine.pro" file. I saw the log saying "Proprietary codecs (H264, MP3).... Enabled", so I assumed the configuration was ok. The compilation was successful.
Then, my first idea was to copy the new dlls directly over the SDK ones in my application folder. And ... That didn't work.
My second idea was to recompile my application with everything generated by the qtwebengine build. So I replaced all the files from the Qt SDK folder. I added an extra "WEBENGINE_CONFIG+=use_proprietary_codecs" to my own project. The compilation was successful, but I still don't have MP3 support.So please, is someone here can tell me, how I can get that damned MP3 support ? :'(
-
Any update on this?
Or a guide on how to build QWebEngine with propretary codecs? I find hard to get the information for that.New framework Electron is much easier to use, no need to recompile, for anyone interested
https://electron.atom.io/docs/tutorial/using-widevine-cdm-plugin/ -
Hello,
I fixed the issue and I posted the solution on stack. I'm sorry I forgot I posted my bug in here too.
https://stackoverflow.com/questions/41611445/unable-to-get-mp3-support-with-qtwebengine
-
Hi,
I do exactly what is explaining on this link https://stackoverflow.com/questions/41611445/unable-to-get-mp3-support-with-qtwebenginewhen I execute:
C:\Qt\5.7\msvc2015\bin\qmake WEBENGINE_CONFIG+=use_proprietary_codecsI have on return:
Proprietary codecs (H264, MP3).... Enabled
Geolocation....................... EnabledBut, on the command: nmake
I have on return some error:
Qt5WebView_resource.rc(1) : fatal error RC1015: cannot open include file 'windows.h'.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Windows Kits\10\bin\x86\rc.EXE"' : code retour '0x1'
Stop.
NMAKE : fatal error U1077: 'D:\InstallationApplis\VisualStudio2015\VC\bin\nmake.exe' : code retour '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : code retour '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : code retour '0x2'
Stop.Is there any other way to integrate mp3 and mp4 codecs into qtwebengine?
-
Hi,
I do exactly what is explaining on this link https://stackoverflow.com/questions/41611445/unable-to-get-mp3-support-with-qtwebenginewhen I execute:
C:\Qt\5.7\msvc2015\bin\qmake WEBENGINE_CONFIG+=use_proprietary_codecsI have on return:
Proprietary codecs (H264, MP3).... Enabled
Geolocation....................... EnabledBut, on the command: nmake
I have on return some error:
Qt5WebView_resource.rc(1) : fatal error RC1015: cannot open include file 'windows.h'.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Windows Kits\10\bin\x86\rc.EXE"' : code retour '0x1'
Stop.
NMAKE : fatal error U1077: 'D:\InstallationApplis\VisualStudio2015\VC\bin\nmake.exe' : code retour '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : code retour '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : code retour '0x2'
Stop.Is there any other way to integrate mp3 and mp4 codecs into qtwebengine?
-
I just recompiled QtWebEngine on latest 5.9.3
Compile show the flag is on, but when I run my app, I still have the error message on netflix..
I added the widevinecdm.dll and widevinecdmadapter.dll close to my executable.C:\Qt\Qt5.9.3\5.9.3\Src\qtwebengine>C:\Qt\Qt5.9.3\5.9.3\msvc2015\bin\qmake WEBENGINE_CONFIG+=use_proprietary_codecs
Running configuration tests...
Done running configuration tests.Configure summary:
Qt WebEngine:
Embedded build ......................... no
Pepper Plugins ......................... yes
Printing and PDF ....................... yes
Proprietary Codecs ..................... yes
Spellchecker ........................... yes
WebRTC ................................. yes
Using system ninja ..................... noscreenshot:
https://www.dropbox.com/s/t16k2co1zg0k24q/netflix.png?dl=Also added this to my .pro file:
QTWEBENGINE_CHROMIUM_FLAGS="--always-authorize-plugins --register-pepper-plugins="/plugins/ppapi/widevinecdmadapter.dll; application/x-ppapi-widevine-cdm""
WEBENGINE_CONFIG+=use_proprietary_codecsI wish there was one clear guide on how to do all this.
I have to refer to an old blog and the information is all scattered..
A real guide should not be a blog and would need to have all steps -_- -
Just to finish, my problem was the version of widevine was incompatible (recent one are not working for some reason)
was really hard to debug but finally found it with trial an error :)See:
https://forum.qt.io/topic/85805/qtwebengine-register-pepper-plugins -
I just recompiled QtWebEngine on latest 5.9.3
Compile show the flag is on, but when I run my app, I still have the error message on netflix..
I added the widevinecdm.dll and widevinecdmadapter.dll close to my executable.C:\Qt\Qt5.9.3\5.9.3\Src\qtwebengine>C:\Qt\Qt5.9.3\5.9.3\msvc2015\bin\qmake WEBENGINE_CONFIG+=use_proprietary_codecs
Running configuration tests...
Done running configuration tests.Configure summary:
Qt WebEngine:
Embedded build ......................... no
Pepper Plugins ......................... yes
Printing and PDF ....................... yes
Proprietary Codecs ..................... yes
Spellchecker ........................... yes
WebRTC ................................. yes
Using system ninja ..................... noscreenshot:
https://www.dropbox.com/s/t16k2co1zg0k24q/netflix.png?dl=Also added this to my .pro file:
QTWEBENGINE_CHROMIUM_FLAGS="--always-authorize-plugins --register-pepper-plugins="/plugins/ppapi/widevinecdmadapter.dll; application/x-ppapi-widevine-cdm""
WEBENGINE_CONFIG+=use_proprietary_codecsI wish there was one clear guide on how to do all this.
I have to refer to an old blog and the information is all scattered..
A real guide should not be a blog and would need to have all steps -_- -
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):