[SOLVED] Build CEF with proprietary codecs support

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Re: [SOLVED] Build CEF with proprietary codecs support

Postby sburke » Fri Jun 09, 2017 2:37 pm

Finally was able to build a version that supports H.264. Following the instructions at https://bitbucket.org/chromiumembedded/cef/wiki/MasterBuildQuickStart.md, create the batch files as follows:

c:\code\chromium_git\update.bat:
Code: Select all
python ..\automate\automate-git.py --download-dir=C:\code\chromium_git --depot-tools-dir=C:\code\depot_tools --no-distrib --no-build


c:\code\chromium_git\chromium\src\cef\create.bat:
Code: Select all
set CEF_USE_GN=1
set GN_DEFINES=is_win_fastlink=true proprietary_codecs=true ffmpeg_branding=Chrome
set GN_ARGUMENTS=--ide=vs2015 --sln=cef --filters=//cef/*
call cef_create_projects.bat
Last edited by sburke on Tue Jun 16, 2020 2:31 pm, edited 1 time in total.
sburke
Mentor
 
Posts: 54
Joined: Tue May 30, 2017 1:17 pm

Re: [SOLVED] Build CEF with proprietary codecs support

Postby sburke » Mon Jun 12, 2017 4:21 pm

While this thread describes building of Cef with H.264 support enabled, it does not cover MP4 support via CefSharp (see http://cefsharp.github.io/). CefSharp exposes many useful interfaces such as ILifeSpanHandler, ILoadHandler, IDialogHandler, etc. Is there any guidance as to how one may enable H.264 support in CefSharp? CefSharp is a .NET wrapper to Cef, so there should be a way to use the H.264-enabled build of Cef in conjunction with CefSharp, but I haven't found any documentation on this. Please advise if you have guidance as to how H.264 can be enabled for CefSharp, or how CefSharp can be modified to use the H.264-enabled version of Cef. Thanks.
sburke
Mentor
 
Posts: 54
Joined: Tue May 30, 2017 1:17 pm

Re: [SOLVED] Build CEF with proprietary codecs support

Postby sburke » Mon Jul 10, 2017 5:02 pm

Another question regarding this thread: all of the comments seem to apply to the Atlassian Cef repository. What about the Spotify repository at http://opensource.spotify.com/cefbuilds/index.html? That snapshot is still building with GYP. I have tried configuring the GYP_DEFINES variable as GYP_DEFINES="proprietary_codecs=1 ffmpeg_branding=Chrome", then generating the project and building with Visual Studio. This does not cause the H.264 MP4 codec support to be included in Cef. Are there any pointers on enabling MP4 support in the Spotify repository?
sburke
Mentor
 
Posts: 54
Joined: Tue May 30, 2017 1:17 pm

Re: [SOLVED] Build CEF with proprietary codecs support

Postby magreenblatt » Mon Jul 10, 2017 5:54 pm

sburke wrote:Another question regarding this thread: all of the comments seem to apply to the Atlassian Cef repository. What about the Spotify repository at http://opensource.spotify.com/cefbuilds/index.html? That snapshot is still building with GYP. I have tried configuring the GYP_DEFINES variable as GYP_DEFINES="proprietary_codecs=1 ffmpeg_branding=Chrome", then generating the project and building with Visual Studio. This does not cause the H.264 MP4 codec support to be included in Cef. Are there any pointers on enabling MP4 support in the Spotify repository?

The Spotify builders use GN. The configuration is documented at https://bitbucket.org/chromiumembedded/ ... ldSetup.md.
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: [SOLVED] Build CEF with proprietary codecs support

Postby sburke » Tue Jul 11, 2017 1:11 pm

I have successfully built an H.264 MP4 enabled version of Chromium using the instructions at https://bitbucket.org/chromiumembedded/ ... QuickStart. As I understand it, the source used to build this version is the same as was used for the automated packages at http://opensource.spotify.com/cefbuilds/index.html. In the CefSharp chat channel, @amaitland said, "CefSharp uses vanilla builds of CEF that are sourced from http://opensource.spotify.com/cefbuilds/index.html. Track down one of the guides that people have written about compiling with proprietary codecs enabled. [Best] of luck."

The version of Chromium that results from building the GitHub repository should be essentially identical to the version that is generated when the automated builds are used (hosted on opensource.spotify.com). Both builds generate several redistributable files: d3dcompiler_47.dll, libcef.dll, libEGL.dll, libGLESv2.dll, natives_blob.bin, snapshot_blob.bin, and widevinecdmadapter.dll. Theoretically, these should be interchangeable with the versions included in the CefSharp package files, but I'm having no success swapping them out.

I realize this is not a CefSharp support forum but CefSharp is not going to be further developed any time in the near future (if ever) by Alex Maitland. So the challenge is to use the H.264 MP4 enabled browser in conjunction with CefSharp. As I've been digging deeper on this, I think building the browser from the GitHub repository versus the automated build method on Spotify yields the exact same browser, with (at least) one exception being that the full source build takes the proprietary codec environment variable into account whereas the automated builds do not, because they are already assembled with a canned snapshot of Chromium that cannot ever support proprietary codecs. Am I right or wrong in this understanding?
Last edited by sburke on Tue Jul 11, 2017 2:45 pm, edited 1 time in total.
sburke
Mentor
 
Posts: 54
Joined: Tue May 30, 2017 1:17 pm

Re: [SOLVED] Build CEF with proprietary codecs support

Postby magreenblatt » Tue Jul 11, 2017 2:12 pm

If you visit the AutomatedBuildSetup link you will see that the automated builders use the same automate-git.py script and Bitbucket repository (of which the GitHub repository is a mirror). The difference between your MasterBuildQuickStart build and the Spotify AutomatedBuildSetup build is the GN_DEFINES values and possibly the branch/version that is being built. If you build with the same GN_DEFINES and same branch/version then the binaries will be interchangeable. Otherwise, possibly not depending on what has changed between the builds that you're comparing.
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: Build CEF with proprietary codecs support in OSX Sierra

Postby coder678 » Tue Dec 12, 2017 6:37 pm

Hello,

I am trying to enable mp3 support in CEF 3.3239.1697.g4c795f5 in OSX Sierra. I typed the following sequence of commands.

set CEF_USE_GN=1
set GN_DEFINES=is_official_build=true proprietary_codecs=true ffmpeg_branding=Chrome
python /Users/myusername/Projects/cef_src/automate-git.py --download-dir=/Users/myusername/Projects/cef_src/v1 --no-release-build --x64-build

The binary was built but if I open html5test.com, it says mp3 is not supported.
Please help me with this issue.
coder678
Techie
 
Posts: 35
Joined: Sun Jun 26, 2016 10:03 pm

Re: [SOLVED] Build CEF with proprietary codecs support

Postby sburke » Mon Jan 08, 2018 5:28 pm

For anybody still in need of the CefSharp info, following are the files to overlay after successfully compiling a version of Chromium with H.264 support:

cef.pak
cef_100_percent.pak
cef_200_percent.pak
cef_extensions.pak
chrome_elf.dll
d3dcompiler_43.dll
d3dcompiler_47.dll
devtools_resources.pak
icudtl.dat
libcef.dll
libEGL.dll
libGLESv2.dll
natives_blob.bin
widevinecdmadapter.dll

In my case, I also had to overlay the files in the locales directory with debug versions. Otherwise, some sites render with a font that only about 1 pixel high.
sburke
Mentor
 
Posts: 54
Joined: Tue May 30, 2017 1:17 pm

Re: [SOLVED] Build CEF with proprietary codecs support

Postby dareplyer » Wed Jun 13, 2018 8:58 pm

I had followed the steps described here to build with ffmpeg support
https://bitbucket.org/chromiumembedded/ ... ckStart.md

However I can't find any C:\code\chromium_git\chromium\src\out\Debug_GN_x86\cef.sln file.
Also I haven't find the files as mentioned by sburke in the C:\code directory. Only d3dcompiler_43.dll, icudtl.dat, libcef.dll were there. :cry:

I am making a WPF chromium browser with H264 support with the update.bat and create.bat files as mentioned above.

Any help in this regard will be highly appreciated.
dareplyer
Newbie
 
Posts: 2
Joined: Wed Jun 13, 2018 8:40 pm

Re: [SOLVED] Build CEF with proprietary codecs support

Postby sburke » Thu Jun 21, 2018 8:46 am

In my case, I was enabling proprietary codec support for WinForms. The WPF version may have a different set of files.
sburke
Mentor
 
Posts: 54
Joined: Tue May 30, 2017 1:17 pm

PreviousNext

Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 26 guests