Adding video codec to Android

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-18 11:47:37

问题


Can someone please explain the steps I need to take in order to add a new codec to Android?

Also, I would like the codec to be installed as part of an application installation (or first launch) and NOT as part of a full Android OS build.

The reason I want to do this is that I have an application that needs to show a video of a non supported codec (HLS or TS), but I wouldn't want to build a full blown video player - just integrate with the existing, built-in, player.

Thanks, Alik.


回答1:


Can someone please explain the steps I need to take in order to add a new codec to Android?

Build your own firmware, or build your own media player (like VLC for Android).

Also, I would like the codec to be installed as part of an application installation (or first launch) and NOT as part of a full Android OS build.

That is not possible, unless you build your own media player.

The reason I want to do this is that I have an application that needs to show a video of a non supported codec (HLS or TS), but I wouldn't want to build a full blown video player - just integrate with the existing, built-in, player.

VLC for Android is due out (at least for some phones) shortly, so it may be able to play your format.




回答2:


I think it maybe possible to add custom codec(though I have not tried) by referring to the android developer page Adding custom codec to android.

You can try out adding your codec through openMAX IL layer then call up the android media player to play it(I believe vlc has done in this way but uses its own player). The awesome player, the android default player, just fetch a list of codecs available through openMAX API and if there is a codec, it plays. So it is worth to try adding your codec during initialization of your app, and call up media player.



来源:https://stackoverflow.com/questions/4678739/adding-video-codec-to-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!