如何在 CEF3 最新版本中启用 H264 支持?
How to enable H264 support in CEF3 latest version ?
我知道cef3的旧版本如2623可以通过修改chromium\src\cef\cef.gypi文件启用H264支持。
但在 3071 或 3029 等最新版本中,cef3 已删除 cef.gypi 文件。
我用谷歌搜索了这个,但我发现仍然是通过修改 cef.gypi 文件。
由于此方法仅对旧版本有效。有没有其他方法可以使更新版本启用 H264 支持?
非常感谢!
确实移动了支持 proprietary codecs
的编译选项。
魔法现在在这里发生:
set GN_DEFINES=is_official_build=true proprietary_codecs=true ffmpeg_branding=Chrome
您应该 update/create(发现 here)有 2 个批处理文件:
c:\code\chromium_git\update.bat:
set CEF_USE_GN=1
set GN_DEFINES=is_official_build=true proprietary_codecs=true ffmpeg_branding=Chrome
set GN_ARGUMENTS=--ide=vs2015 --sln=cef --filters=//cef/*
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:
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
有 2 篇 wiki 文章解释了如何构建 CEF/Chromium:
- https://bitbucket.org/chromiumembedded/cef/wiki/MasterBuildQuickStart.md
- 和
BranchesAndBuilding
在同一个 wiki
更新:
以下是有关 Chromium 构建标志的信息的更多链接:
https://www.chromium.org/developers/gn-build-configuration
https://www.chromium.org/audio-video
https://chromium.googlesource.com/chromium/src/+/lkcr/docs/windows_build_instructions.md
... GYP/GN flags which can alter behaviour of Chromium's HTML5 audio/video implementation.
ffmpeg_branding
Overrides which version of FFmpeg to use
Default: $(branding)
Values:
Chrome - includes additional proprietary codecs (MP3, etc..) for use with Google Chrome
Chromium - builds default set of codecs
proprietary_codecs
Alters the list of codecs Chromium claims to support, which affects <source> and canPlayType() behaviour
Default: 0(gyp)/false(gn)
Values:
0/false - <source> and canPlayType() assume the default set of codecs
1/true - <source> and canPlayType() assume they support additional proprietary codecs
我知道cef3的旧版本如2623可以通过修改chromium\src\cef\cef.gypi文件启用H264支持。 但在 3071 或 3029 等最新版本中,cef3 已删除 cef.gypi 文件。 我用谷歌搜索了这个,但我发现仍然是通过修改 cef.gypi 文件。 由于此方法仅对旧版本有效。有没有其他方法可以使更新版本启用 H264 支持? 非常感谢!
确实移动了支持 proprietary codecs
的编译选项。
魔法现在在这里发生:
set GN_DEFINES=is_official_build=true proprietary_codecs=true ffmpeg_branding=Chrome
您应该 update/create(发现 here)有 2 个批处理文件:
c:\code\chromium_git\update.bat:
set CEF_USE_GN=1
set GN_DEFINES=is_official_build=true proprietary_codecs=true ffmpeg_branding=Chrome
set GN_ARGUMENTS=--ide=vs2015 --sln=cef --filters=//cef/*
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:
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
有 2 篇 wiki 文章解释了如何构建 CEF/Chromium:
- https://bitbucket.org/chromiumembedded/cef/wiki/MasterBuildQuickStart.md
- 和
BranchesAndBuilding
在同一个 wiki
更新: 以下是有关 Chromium 构建标志的信息的更多链接:
https://www.chromium.org/developers/gn-build-configuration
https://www.chromium.org/audio-video
https://chromium.googlesource.com/chromium/src/+/lkcr/docs/windows_build_instructions.md
... GYP/GN flags which can alter behaviour of Chromium's HTML5 audio/video implementation.
ffmpeg_branding
Overrides which version of FFmpeg to use
Default: $(branding)
Values:
Chrome - includes additional proprietary codecs (MP3, etc..) for use with Google Chrome
Chromium - builds default set of codecs
proprietary_codecs
Alters the list of codecs Chromium claims to support, which affects <source> and canPlayType() behaviour
Default: 0(gyp)/false(gn)
Values:
0/false - <source> and canPlayType() assume the default set of codecs
1/true - <source> and canPlayType() assume they support additional proprietary codecs