Android 中的字幕/隐藏式字幕支持
我正在开发一个 Android 应用程序,其中包含视频组件;我希望为编码到流中的字幕提供支持,但我找不到任何关于 Android 媒体播放器是否原生支持它们的参考资料。这里有人对这种情况有经验吗?
I'm developing an Android app which includes a video component; I'm hoping to provide support for subtitles encoded into the stream but I can't find any references to whether they are supported natively within the Android media player. Does anyone here have any experience with this situation?
Android 4.0.x 及以下版本
对于 Android 4.0 及以下版本,默认媒体播放器不支持字幕。
它可以在应用程序层(使用 java 代码)或使用本机 NDK 完成。有关更多详细信息,请参阅有关如何在 Android 中支持字幕的白皮书
Android 4.1(Jelly Bean - JB))开始
Android JB 版本内置了对内部(存在于 MP4 文件中)和 SRT 外部字幕的支持。更多详细信息请访问 http://developer.android.com/about/ versions/android-4.1.html#多媒体
Android 4.0.x version and below
In case of Android 4.0 version and below, default Media Player did not support subtitles.
It can be done at application layer (using java code) or using native NDK. More details at this white paper on how to support subtitles in Android
Android 4.1 (Jelly Bean - JB)) Onwards
Android JB version has built in support for internal (present in MP4 files) and SRT external subtitles. More details is available at http://developer.android.com/about/versions/android-4.1.html#Multimedia