Enabling proprietary codecs in chromium

1,938 views
Skip to first unread message

Sumit Agrawal

unread,
Aug 20, 2015, 5:30:21 AM8/20/15
to Chromium-dev
As I understand from the available documentation, enabling proprietary codecs should be fairly simple.

I have created ~/.gyp/include.gypi with contents as below (xxx is placeholder)

{
'variables': {
    'google_api_key':               'xxx',
    'google_default_client_id':     'xxx',
    'google_default_client_secret': 'xxx',
  },
  'GYP_DEFINES':
    'proprietary_codecs=1'
    'ffmpeg_branding=Chrome'
    'dcheck_always_on=1'
}

gclient runhooks
ninja -C out_${SDK_BOARD}/Debug -j8 chrome chrome_sandbox nacl_helper
deploy_chrome --build-dir=out_${SDK_BOARD}/Debug --nostrip --to=10.138.134.90 --target-dir=/home/chrome

I was facing "not enough free space" error, hence I am using --target-dir. I hope that should be fine.

However, I am still not able to see mp3 or h.264 support on running https://html5test.com/

I am not sure if my GYP_DEFINES flags are being applied correctly. Is there any way to check the final list of GYP_DEFINES flags with which the image was built?

Regards,
Sumit

Naveen

unread,
Aug 20, 2015, 5:47:52 AM8/20/15
to sumi...@gmail.com, Chromium-dev
Hi Sumit,

On which OS you are performing this operation. Windows or Linux?

If it is windows please follow this 

It will use around 25 GB of your memory. It took around 8 Hr for me to build this on i7, 8GB RAM. 

It is successful for me. I have integrated Chromium with mp3 support in my WPF application. 






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

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.



--
Regards,
Naveen Kumar

Sumit Agrawal

unread,
Aug 20, 2015, 5:55:38 AM8/20/15
to Chromium-dev, sumi...@gmail.com
Hi Naveen,

I am building chromium for chromium OS.
I have a feeling that it's a formatting issue in include.gypi

Regards,
Sumit

Torne (Richard Coles)

unread,
Aug 20, 2015, 7:12:39 AM8/20/15
to sumi...@gmail.com, Chromium-dev
On Thu, 20 Aug 2015 at 10:55 Sumit Agrawal <sumi...@gmail.com> wrote:
Hi Naveen,

I am building chromium for chromium OS.
I have a feeling that it's a formatting issue in include.gypi

Not a formatting issue, but your include.gypi is indeed not valid.
 
Regards,
Sumit

On Thursday, August 20, 2015 at 3:17:52 PM UTC+5:30, Naveen Kumar Chittipolu wrote:
Hi Sumit,

On which OS you are performing this operation. Windows or Linux?

If it is windows please follow this 

It will use around 25 GB of your memory. It took around 8 Hr for me to build this on i7, 8GB RAM. 

It is successful for me. I have integrated Chromium with mp3 support in my WPF application. 





On Thu, Aug 20, 2015 at 3:00 PM, Sumit Agrawal <sumi...@gmail.com> wrote:
As I understand from the available documentation, enabling proprietary codecs should be fairly simple.

I have created ~/.gyp/include.gypi with contents as below (xxx is placeholder)

{
'variables': {
    'google_api_key':               'xxx',
    'google_default_client_id':     'xxx',
    'google_default_client_secret': 'xxx',
  },
  'GYP_DEFINES':
    'proprietary_codecs=1'
    'ffmpeg_branding=Chrome'
    'dcheck_always_on=1'
}
 
GYP_DEFINES is the name of an environment variable. If you want to set these variables in a gypi file you should just add them to the variables block you already have.

Sumit Agrawal

unread,
Aug 21, 2015, 12:10:20 AM8/21/15
to Chromium-dev, sumi...@gmail.com
Thanks, I'll put them in the variables block and try again.

I had copied this GYP_DEFINES block from the web somewhere, not able to find it now.

Sumit Agrawal

unread,
Aug 21, 2015, 1:16:50 AM8/21/15
to Chromium-dev, sumi...@gmail.com
I still have one question though.

Is there any build log or something that I can look up to confirm whether the flags have been applied correctly?

Steven Miller

unread,
Aug 21, 2015, 9:58:27 AM8/21/15
to sumi...@gmail.com, Chromium-dev
I have never had any luck putting those gyp_defines in my include,gypi. Once your in the shell 'cros chrome-sdk', add the flags with export GYP_DEFINES="${GYP_DEFINES} foo=bar" then run gclient runhooks. If you echo $GYP_DEFINES once in the shell, you'll see if your flags have been picked up.

Steven

Steve Miller

Sumit Agrawal

unread,
Aug 21, 2015, 10:06:28 AM8/21/15
to Steven Miller, Chromium-dev

Hi Steven,

Exporting those GYP_DEFINES in cros shell works for me too.

Sumit

Sumit Agrawal

unread,
Aug 21, 2015, 11:47:21 AM8/21/15
to Chromium-dev
I found the link, from where I had found the syntax for GYP_DEFINES in include.gypi

https://code.google.com/p/chromium/wiki/CommonBuildTasks#Configuring_the_Build

{
'variables': {
'mac_strip_release': 0,
},
'GYP_DEFINES':
'clang=1 '
'component=shared_library '
'dcheck_always_on=1 '
}

Sumit Agrawal

unread,
Sep 22, 2015, 1:07:13 AM9/22/15
to Chromium-dev
FYI.

I was able to enable proprietary codecs, by setting the flags correctly in GYP_DEFINES block itself.
I modified chromium.gyp_env as mentioned in this link

Reply all
Reply to author
Forward
0 new messages