The cleanest way to build so that USE_PROPRIETARY_CODECS is #defined?

345 views
Skip to first unread message

Jim Kang

unread,
Oct 23, 2015, 5:06:58 PM10/23/15
to Chromium-discuss
Hey, I'm trying to build Chromium (on OS X) in such a way that it can play mp4 video.

It looks as though `media/base/mime_util.cc` will consider video/mp4 unsupported unless USE_PROPRIETARY_CODECS is #defined. What is a good place in which to #define that?

And are there any other #defines I need to build Chromium to play the same kinds of video that Chrome plays? I also want to make sure that VerifyCodec in stream_parser_factory.cc gets all the same video_codecs and audio_codecs params as Chrome so that IsTypeSupported works correctly.

Jim

PhistucK

unread,
Oct 23, 2015, 5:11:43 PM10/23/15
to jim...@gmail.com, Chromium-discuss


PhistucK

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

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

Jim Kang

unread,
Oct 26, 2015, 10:15:02 AM10/26/15
to Chromium-discuss, jim...@gmail.com
Thanks, PhistucK.

Setting branding=="Chrome" in common.gypi and then re-running `./build/gyp_chromium -Dcomponent=shared_library` didn't work for me because it was looking for a lot of theme-related files that I didn't have, but it did build when I just set all of the instances of `proprietary_codecs` to 1. Unfortunately, this build will load videos but won't play them.

So, I guess I really do have to build Chromium as Chrome in order to get this to work. Anyone know of a guide on doing that? Or a pre-built Canary with debug symbols that can be mapped to source?

PhistucK

unread,
Oct 26, 2015, 10:21:13 AM10/26/15
to jim...@gmail.com, Chromium-discuss
No, I meant that you can change the condition itself. Eventually, proprietary_codecs% should be 1 in order to enable proprietary codec support.


PhistucK

Jim Kang

unread,
Oct 26, 2015, 10:33:24 AM10/26/15
to Chromium-discuss, jim...@gmail.com
Right. That's what I did (end of second sentence). That's enough for it to recognize H264 as supported, but not to play it.

PhistucK

unread,
Oct 26, 2015, 11:50:23 AM10/26/15
to Jim Kang, Chromium-discuss
​Oh, sorry - I did not notice that. Weird. I recall that this is what it takes.

See if this thread helps (did you search? :)) -


PhistucK

Stephen James

unread,
Oct 27, 2015, 6:12:15 AM10/27/15
to Chromium-discuss, jim...@gmail.com
Just last week I downloaded the latest source, set the following, ran build/gyp_chromium and it builds and runs H.264

export GYP_DEFINES="proprietary_codecs=1 ffmpeg_branding=Chrome

Jim Kang

unread,
Oct 28, 2015, 3:52:56 PM10/28/15
to Chromium-discuss, jim...@gmail.com
Thanks, everyone! `export GYP_DEFINES="proprietary_codecs=1 ffmpeg_branding=Chrome` worked!

PhistucK, I did see that thread, but there was no conclusion there, so I was wary of trying those suggestions, since my builds seem to take hours.

葛光乐

unread,
Nov 1, 2015, 10:44:58 PM11/1/15
to jim...@gmail.com, Chromium-discuss
I think  export GYP_DEFINES="ffmpeg_branding=Chrome" is enough.


        # Android OS includes support for proprietary codecs regardless of
        # building Chromium or Google Chrome. We also ship Google Chrome and
        # Chromecast with proprietary codecs.
        ['OS=="android" or branding=="Chrome" or chromecast==1', {
          'proprietary_codecs%': 1,
        }, {
          'proprietary_codecs%': 0,
        }],

I was wrong?

Jim Kang

unread,
Nov 2, 2015, 10:53:55 AM11/2/15
to Chromium-discuss, jim...@gmail.com
I'll try it next time!
Reply all
Reply to author
Forward
0 new messages