自 3.0 版起,Android 就支持 HLS。直到 Honeycomb 才支持 H.264 和 AAC,但只有RTSP流协议。不支持HLS和MPEG-2 TS not(请参阅此处)。
将ffmpeg移植到 Android 平台可能是一个解决方案(LGPL 来源可用)。然而,我正在寻找一个带有 SDK、可定制 HLS 播放器等的现成解决方案。这里有一个,但我想知道您是否不了解其他解决方案。
谢谢 STEN
You may find the http://vov.io/vitamio/ libraries very useful. They allow you to use HLS feeds (I've tested and use the library in production apps).
One thing to note however, don't try testing on an Emulator device, as it will not work, you will need a real device for your testing.
Hope that helps.
Warm Regards,
Shabbir
-- EDIT --
Just editing this answer to let people know that the Vitamio url has changed - and also now you don't need to download a separate "helper app" from the PlayStore or the vov.io website - you can now just incorporate everything from the downloads/instructions they provide.
The new site is http://vitamio.org/
MPEG TS 自 2.3 ( Gingerbread ) 起就存在于代码库中,但没有做广告。实际上 HLS 在 2.3 版本中是受支持的,但您需要一个小修复来启用它。您需要在流中添加 httplive 前缀,并在代码中进行小修复以接受它。
维焦尔
最后,我们使用 FFMPEG 库制作了自己的播放器,现在我们还使用 stagefright (http://freepine.blogspot.cz/2010/01/overview-of-stagefrighter-player. html).
BR 斯坦