G-Man
G-Man

Reputation: 7241

CEF MP4 support

I have rebuilt cef from source with the proprietary_codecs option set to true, but I still cannot play mp4 videos for some reason. Is there a specific switch that I need to enable ? This is what I used to create the version of cef with support for proprietary codecs

set CEF_USE_GN=1
set DEPOT_TOOLS_WIN_TOOLCHAIN = 0
set GN_DEFINES=is_official_build=true proprietary_codecs=true ffmpeg_branding=Chrome enable_precompiled_headers = false
set GN_ARGUMENTS=--ide=vs2015 --sln=cef --filters=//cef/*
python d:\code\automate\automate-git.py --download-dir=D:\code\chromium_git --depot-tools-dir=D:\code\depot_tools --no-distrib --no-build --branch=3239

Upvotes: 1

Views: 5165

Answers (2)

Shashank Shetty
Shashank Shetty

Reputation: 1

Follow this link

Add this to update.bat:

set CEF_USE_GN=1
set GN_DEFINES=ffmpeg_branding=Chrome proprietary_codecs=true is_official_build=true use_thin_lto=false chrome_pgo_phase=false
set GN_ARGUMENTS=--ide=vs2022 --sln=cef --filters=//cef/*
python3 ..\automate\automate-git.py --download-dir=c:\code\chromium_git --depot-tools-dir=c:\code\depot_tools --no-distrib --no-build --branch=5938

This will take some time to complete.

Add this to create.bat:

set CEF_USE_GN=1
set GN_DEFINES=ffmpeg_branding=Chrome proprietary_codecs=true is_official_build=true use_thin_lto=false chrome_pgo_phase=false
set GN_ARGUMENTS=--ide=vs2022 --sln=cef --filters=//cef/*
call cef_create_projects.bat

After this, run that ninja build command mentioned in documentation.

This is how I built cef 117 version with proprietary_codecs, and I was able to play mp4 videos.

Upvotes: 0

G-Man
G-Man

Reputation: 7241

There are 2 main steps in the build, one that calls automate-git.py and the second one that creates the cef projects (create.bat). I had the proper GN_DEFINES set in the first one but not the second one. I added the GN_DEFINES (is_official_build=true proprietary_codecs=true ffmpeg_branding=Chrome ) to the second one and it picked up a lot more files during the build. Now I can play mp4 files

Upvotes: 1

Related Questions