开发者

Play .ts video file on Android?

I am pretty new at streaming video, so please bear with me. :)

I am trying to port an m3u8 stream over from iPhone to Android. Looking in the m3u8 feed, I found some .ts files. From what I can tell, .ts files are, themselves, wrappers that contain the video stream (Elem开发者_JS百科entary Stream).

Is it possible to play a .ts file in Android? (The docs only list 3gp and mp4 as supported formats.)

Is there a way to extract the Elementary Stream and just process the video feed? If that is in 3gp or mp4, I should be ok.

Will Stagefright handle .ts? Is Stagefright even available? I read that there are/were some problems with it.

(As a further caveat, I am not getting much help from my server guys. They are pushing for a Flash player solution, including a proprietary player. They will not provide me with a 3gp or an mp4 feed, but I'm hoping I can find that in the .ts file.)

I'm open to other suggestions. Thanks for your patience with this newbie. :)


There is a standard for that called HTTP Live Streaming. Android 3.0 supports this protocol to some extent which means you can pass the URL of the m3u8 playlist to the MediaPlayer and the player should be able to stream it over HTTP. Stagefright is bundled with Android 3.0.

You can browse its source code here.

Also, this thread might interest you: it summarizes support for HTTP Live Streaming.


Android stagefright in Gingerbread and prior versions does not support playback of .ts (transport stream) or elementary stream. As you have rightly pointed out, it only supports MP4/3GP/MP3 file formats.


You can play .ts video file in android by using NDK based project. Dolphine player is best open source player for android and also supports various formats of video.

You got the .ts link from m3u file. Now you can fetch binary data from .ts file and store this binary data in file, then play this file by using video player.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜