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 ? :'(

  • I would be interested to know if you fixed the issue.
    I am also trying to recompile for Netflix support.
    Would be nice if you could only copy the codecs/plugins to our application instead of rebuilding every time from source.

  • 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

  • Hello,

    I fixed the issue and I posted the solution on stack. I'm sorry I forgot I posted my bug in here too.


  • Hi,
    I do exactly what is explaining on this link https://stackoverflow.com/questions/41611445/unable-to-get-mp3-support-with-qtwebengine

    when I execute:
    C:\Qt\5.7\msvc2015\bin\qmake WEBENGINE_CONFIG+=use_proprietary_codecs

    I have on return:
    Proprietary codecs (H264, MP3).... Enabled
    Geolocation....................... Enabled

    But, 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'
    NMAKE : fatal error U1077: 'D:\InstallationApplis\VisualStudio2015\VC\bin\nmake.exe' : code retour '0x2'
    NMAKE : fatal error U1077: 'cd' : code retour '0x2'
    NMAKE : fatal error U1077: 'cd' : code retour '0x2'

    Is there any other way to integrate mp3 and mp4 codecs into qtwebengine?

  • @lipqil
    CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64

    to remove above error.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.