Adding H.264 support for the Android app

1,072 views
Skip to first unread message

אבי וזהו

unread,
May 14, 2017, 11:25:51 AM5/14/17
to Chromium-dev
Hi,

I was following this guide for building the android app.

I noted that there is no support for H264 videos.

How can i add the H264 support to the build?

Thanks
Avi

PhistucK

unread,
May 14, 2017, 11:45:12 AM5/14/17
to אבי וזהו, Chromium-dev
H.264 is not a free codec. If you have the license for distributing an H.264 decoder, you can enable it via some configuration.
There is a blanket build time flag for all of the non-free codecs -

If you want to only add H.264 (but not AAC for example, which usually goes along with it), you will have to search the code a bit to see how it enables hardware H.264 support (since this is an Android build and Android usually works with devices that have a hardware H.264 decoder).

Also, media-dev might be more helpful.


PhistucK

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/8a51392e-830f-44c4-bda8-dfa3e9bf841c%40chromium.org.

PhistucK

unread,
May 14, 2017, 11:50:23 AM5/14/17
to אבי וזהו, Chromium-dev
For searching the code quickly - cs.chromium.org.


PhistucK

Tima Vaisburd

unread,
May 14, 2017, 6:16:50 PM5/14/17
to PhistucK, אבי וזהו, Chromium-dev
Try to add argument

ffmpeg_branding = "Chrome"

in your GN args

אבי וזהו

unread,
May 15, 2017, 3:01:26 AM5/15/17
to Chromium-dev
Hi,

hanks for your help, It's much appreciated.

I tried to run the flowing commands:

1: export GYP_DEFINES='proprietary_codecs=1 ffmpeg_branding=Chrome'
2: gclient runhooks
3: gn gen --args='target_os="android"' out/Default
4: ninja -C out/Default chrome_public_apk

And it didn't seem to add the h264 to the app

Then i tried to run

1: gn gen --args='target_os="android" ffmpeg_branding = "Chrome"' out/Default
2: ninja -C out/Default chrome_public_apk

And also it didn't work

Any suggestions on what am i doing wrong?

Thanks
Avi

PhistucK

unread,
May 15, 2017, 3:18:04 AM5/15/17
to אבי וזהו, Chromium-dev
The spaces you added seems wrong and you omitted one of the arguments in the GN version.

I think it should be -
gn gen --args='target_os="android" proprietary_codecs=1 ffmpeg_branding=Chrome' out/Default
(Maybe even without the quotes around "android")

Does that work for you?


PhistucK

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+unsubscribe@chromium.org.

אבי וזהו

unread,
May 15, 2017, 4:11:02 AM5/15/17
to Chromium-dev, avi...@gmail.com
Hi,,

Thanks a lot 

This command worked:

gn gen --args='target_os="android" proprietary_codecs=true ffmpeg_branding="Chrome"' out/Default


Thanks again
Avi


PhistucK

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

HimmaH

unread,
Jul 3, 2017, 2:21:19 AM7/3/17
to Chromium-dev
Hi, can You tell me which guide you followed to build android app?
I am trying to show H264 videos on android app using webrtc.

אבי וזהו

unread,
Jul 3, 2017, 2:33:11 AM7/3/17
to Chromium-dev
Hi,



Thea's are the steps for allowing the video and building the android APK:

1: export GYP_DEFINES='proprietary_codecs=1 ffmpeg_branding=Chrome'
2: gclient runhooks
3: gn gen --args='target_os="android"' out/Default
4: ninja -C out/Default chrome_public_apk
5: gn gen --args='target_os="android" ffmpeg_branding = "Chrome"' out/Default
6: gn gen --args='target_os="android" proprietary_codecs=true ffmpeg_branding="Chrome"' out/Default
Reply all
Reply to author
Forward
0 new messages