Turn on proprietary codecs in Chromium builds

17,945 views
Skip to first unread message

Balázs Szántó

unread,
Jul 23, 2014, 7:55:20 AM7/23/14
to chromi...@chromium.org
Hello!

As far as I know, proprietary codecs (supporting MP3, MP4, ...) are not enabled in Chromium due to license restrictions, however I want to build for myself a Chromium with the proprietary codecs turned on. I use the Chromium Embedded Framework and I set the proprietary_codecs to 1 in the cef.gypi file. Opening the CefClient app and visiting the http://html5test.com/ website told that the browser support these proprietary codecs, but it failed to playback the video files. Going through some forum posts, I copied the Google Chromes libffmpegsumo.dll and the video playback just worked.

My questions is, how to build the libffmpegsumo.dll for my own. Searching the source I see some options, but wasn't able to make it work. Based on the libffmpegsumo.dlls I've built I can say that It wasn't containing the neccesary codes. I've tried some of these flags:
                build_ffmpegsumo
                use_system_ffmpeg
                ffmpeg_branding
                ffmpeg_branding=Chrome

Can somebody point me to the right direction? I'm new to Chromium and CEF, any help is appreciated.
Thanks
Balazs

Dale Curtis

unread,
Jul 23, 2014, 1:51:42 PM7/23/14
to szanto9...@gmail.com, Chromium-dev
It should be sufficient to set "proprietary_codecs=1 ffmpeg_branding=Chrome" in your GYP_DEFINES if you're building from our source repository. Make sure you're regenerating the GYP files before building. I'm not sure if CEF has different options for enabling these codecs.

- dale


--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev

Balázs Szántó

unread,
Jul 28, 2014, 4:09:41 PM7/28/14
to chromi...@chromium.org
Thanks, it worked!

VN

unread,
Nov 21, 2014, 6:33:33 AM11/21/14
to chromi...@chromium.org
Hi Balazs

I need to compile the Chromium browser with MP4 support? I am trying to follow the instructions below, but not sure which specific source files need to be changed.

I have been able to compile the Chromium once with default values using the Ninja Command, so If I need to now add the MP4 support, which files should I change and what exact changes do I need to make?

How do I regenerate my GYP files?

Regards
VN

Balázs Szántó

unread,
Nov 21, 2014, 8:48:50 AM11/21/14
to vnanc...@gmail.com, chromi...@chromium.org

VN

unread,
Nov 23, 2014, 12:56:53 AM11/23/14
to chromi...@chromium.org
Thanks. It worked for me.

VN

unread,
Dec 2, 2014, 5:22:21 AM12/2/14
to chromi...@chromium.org
Hi 

I am able to successfully compile the latest code from master, but I am finding another challenge, I want to build a specific version of Chromium, the tag 37.0.2062.94. Whenever I switch to this tag, I get the following error while giving the command (c:\workspace\chromium\src>python build\gyp_chromium)


gyp: C:\workspace\chromium\src\third_party\angle\src\build_angle.gyp not found (cwd: C:\workspace\chromium\src)
gyp: C:\workspace\chromium\src\third_party\skia\gyp\record.gypi not found (cwd:C:\workspace\chromium\src) 
while reading includes of C:\workspace\chromium\src\skia\skia_library.gypi 
while reading includes of C:\workspace\chromium\src\skia\skia.gyp

Also the ninja command fails as well.

C:\workspace\chromium\src>ninja -C out/Release chrome

ninja: error: loading 'build.ninja': The system cannot find the file specified.
ninja: Entering directory `out/Release'

Where as in the master, both the commands work successfully, but not in this Tag.

Please help.

Regards
VN

Paweł Hajdan, Jr.

unread,
Dec 2, 2014, 5:51:09 AM12/2/14
to vnanc...@gmail.com, chromium-dev
Please make sure to run gclient sync.

Paweł

VN

unread,
Dec 2, 2014, 5:52:06 AM12/2/14
to chromi...@chromium.org, vnanc...@gmail.com, phajd...@chromium.org
Hi Pawel

Thanks for your quick reply. Do you mean i should run gclient sync after switching to the other Tag?

Regards
VN

Paweł Hajdan, Jr.

unread,
Dec 2, 2014, 6:14:16 AM12/2/14
to VN, chromium-dev
Yes.

Paweł

Paweł Hajdan, Jr.

unread,
Dec 3, 2014, 4:49:44 AM12/3/14
to Vikas Nanchahal, chromium-dev
[adding chromium-dev back]

Please try "gclient sync --with_branch_heads".


Paweł

On Wed, Dec 3, 2014 at 1:59 AM, Vikas Nanchahal <vnanc...@gmail.com> wrote:
When I do that. I get the few errors.

Here is the log from the console:


D:\workspace1\src>gclient sync
Syncing projects:  16% (15/93) src/chrome/test/data/extensions/api_test/permissi
Syncing projects:  17% (16/93) src/third_party/clang_format/script
Syncing projects:  23% (22/93) src/third_party/WebKit

src/chrome/test/data/extensions/api_test/permissions/nacl_enabled/bin (ERROR)
----------------------------------------
[0:00:00] Started.
[0:00:00]

________ running 'git -c core.deltaBaseCacheLimit=512m clone --no-checkout --pro
ebuilt.git D:\workspace1\src\chrome\test\data\extensions\api_test\permissions\na
cl_enabled\_gclient_bin__y5dwc' in 'D:\workspace1'
[0:00:00] Cloning into 'D:\workspace1\src\chrome\test\data\extensions\api_test\p
ermissions\nacl_enabled\_gclient_bin__y5dwc'...
[0:00:02] remote: Sending approximately 12.50 MiB ...
[0:00:03] Receiving objects:   0% (1/195)
[0:00:03] Receiving objects:  10% (20/195)
[0:00:04] Receiving objects:  52% (103/195), 387.89 KiB | 376.00 KiB/s
[0:00:05] Receiving objects:  52% (103/195), 1.25 MiB | 623.00 KiB/s
[0:00:06] Receiving objects:  60% (118/195), 2.19 MiB | 704.00 KiB/s
[0:00:07] Receiving objects:  61% (119/195), 2.75 MiB | 665.00 KiB/s
[0:00:08] Receiving objects:  62% (121/195), 3.69 MiB | 706.00 KiB/s
[0:00:10] Receiving objects:  62% (121/195), 4.32 MiB | 644.00 KiB/s
[0:00:11] Receiving objects:  68% (133/195), 4.94 MiB | 588.00 KiB/s
[0:00:12] Receiving objects:  77% (151/195), 5.31 MiB | 604.00 KiB/s
[0:00:13] Receiving objects:  77% (152/195), 6.69 MiB | 621.00 KiB/s
[0:00:15] Receiving objects:  78% (153/195), 7.50 MiB | 657.00 KiB/s
[0:00:16] Receiving objects:  79% (155/195), 8.25 MiB | 682.00 KiB/s
[0:00:17] Receiving objects:  79% (155/195), 9.13 MiB | 717.00 KiB/s
[0:00:18] Receiving objects:  82% (160/195), 9.94 MiB | 735.00 KiB/s
[0:00:20] Receiving objects:  87% (171/195), 11.69 MiB | 804.00 KiB/s
[0:00:21] Receiving objects: 100% (195/195), 12.13 MiB | 820.00 KiB/s
[0:00:21] Resolving deltas:   0% (0/116)
[0:00:21] Resolving deltas:  38% (45/116)
[0:00:24] Resolving deltas:  61% (71/116)
[0:00:26] Resolving deltas:  84% (98/116)
[0:00:27] Resolving deltas:  96% (112/116)
[0:00:28] Resolving deltas: 100% (116/116)
[0:00:29] remote: Total 195 (delta 116), reused 195 (delta 116)
[0:00:29] Checking connectivity... done.
[0:00:30] _____ Conflicting directory found in D:\workspace1\src\chrome\test\dat
a\extensions\api_test\permissions\nacl_enabled\bin. Moving to D:\workspace1\_bad
_scm\src\chrome\test\data\extensions\api_test\permissions\nacl_enabled\binkrdxv2
.
[0:00:31]

________ running 'git -c core.deltaBaseCacheLimit=512m clone --no-checkout --pro
ebuilt.git D:\workspace1\src\chrome\test\data\extensions\api_test\permissions\na
cl_enabled\_gclient_bin_wrpn1s' in 'D:\workspace1'
[0:00:31] Cloning into 'D:\workspace1\src\chrome\test\data\extensions\api_test\p
ermissions\nacl_enabled\_gclient_bin_wrpn1s'...
[0:00:33] remote: Sending approximately 12.50 MiB ...
[0:00:33] Receiving objects:   0% (1/195)
[0:00:33] Receiving objects:  10% (20/195)
[0:00:34] Receiving objects:  54% (106/195), 1.50 MiB | 1.26 MiB/s
[0:00:35] Receiving objects:  63% (123/195), 3.25 MiB | 1.74 MiB/s
[0:00:37] Receiving objects:  79% (155/195), 7.31 MiB | 2.15 MiB/s
[0:00:38] Receiving objects:  87% (171/195), 9.88 MiB | 2.23 MiB/s
[0:00:40] Receiving objects:  98% (192/195), 12.44 MiB | 2.36 MiB/s
[0:00:40] Receiving objects: 100% (195/195), 12.44 MiB | 2.36 MiB/s
[0:00:40] Resolving deltas:   0% (0/116)
[0:00:40] Resolving deltas:  12% (15/116)
[0:00:41] Resolving deltas:  51% (60/116)
[0:00:44] Resolving deltas:  60% (70/116)
[0:00:45] Resolving deltas:  80% (93/116)
[0:00:46] Resolving deltas:  89% (104/116)
[0:00:48] Resolving deltas:  94% (110/116)
[0:00:50] Resolving deltas:  96% (112/116)
[0:00:50] Resolving deltas: 100% (116/116)
[0:00:50] remote: Total 195 (delta 116), reused 195 (delta 116)
[0:00:50] Checking connectivity... done.
----------------------------------------
Error: Command git checkout --quiet 9c803208c445d311f43ab00cb83688aec3fa1e2f ret
urned non-zero exit status 128 in D:\workspace1\src\chrome\test\data\extensions\
api_test\permissions\nacl_enabled\bin
fatal: reference is not a tree: 9c803208c445d311f43ab00cb83688aec3fa1e2f



Warnings:
Conflicting directory D:\workspace1\src\chrome\test\data\extensions\api_test\per
missions\nacl_enabled\bin moved to D:\workspace1\_bad_scm\src\chrome\test\data\e
xtensions\api_test\permissions\nacl_enabled\binkrdxv2.

Naveen Kumar Chittipolu

unread,
Jul 22, 2015, 2:18:59 PM7/22/15
to Chromium-dev
Could you please help me in changing proprietary_codecs to 1? I fetched source code of chromium. but i didnt find cef.gypi file anywhere. 

Paweł Hajdan, Jr.

unread,
Jul 22, 2015, 2:38:15 PM7/22/15
to chitt...@gmail.com, Chromium-dev
Note this is an old thread.

See Dale's reply about adding proprietary_codecs=1 to GYP_DEFINES env variable.

Also make sure to review other links provided in answers to this thread.

Paweł

Naveen Kumar Chittipolu

unread,
Jul 23, 2015, 7:31:26 AM7/23/15
to Chromium-dev, phajd...@chromium.org
Thanks for your reply pawel. 

  I Created new file chromium.gyp_env in     Chromium/scr  with the flags mentioned by Dale. and i generated new build. But when i play audio file i got demuxer: could not open error. Please see the attached file for details. Please help us regarding this issue. 

Thanks,

Naveen
 

Naveen Kumar Chittipolu

unread,
Jul 23, 2015, 1:35:54 PM7/23/15
to Chromium-dev, szanto9...@gmail.com
Hi Balazs,

I am facing issues with generating chrome build with flags enabling. Can u point me to the right direction?

Ritesh Rai

unread,
Jul 30, 2016, 3:51:14 PM7/30/16
to Chromium-dev
I want to Build CefSharp.Wpf.ChromiumWebBrowser with MP3, MP4 Support.. Let me know if you can help me in this. 

wax miguel

unread,
Aug 1, 2016, 2:44:16 AM8/1/16
to Chromium-dev

Shuky Chen

unread,
Dec 1, 2016, 8:57:30 AM12/1/16
to Chromium-dev
Hi all,

In CEF you can add the following environment variable:
GN_DEFINES="proprietary_codecs=true ffmpeg_branding=Chrome"

This is true for branch 2840 and above

Sheldon

unread,
Mar 24, 2017, 1:09:44 AM3/24/17
to Chromium-dev

在 2014年7月23日星期三 UTC+8下午7:55:20,Balázs Szántó写道:
Reply all
Reply to author
Forward
0 new messages