Skip to content Skip to sidebar Skip to footer

Play M3u8 Video In Android

I want to live streaming the video and it is in m3u8 format. So i tried the below code public class StreamingPlayer extends Activity implements OnBufferingUpdateListener, OnComplet

Solution 1:

The video was existed in http://www.livestream.com. In this there is Mobile Api for live streaming.

The Api is:

http://www.livestream.com/userguide/index.php?title=Mobile_API#How_to_get_mobile_compatible_clips_from_a_channel.27s_library

In above link there is full information for mobile compatible. To get the rtsp link from the channel to use this link

http://xproshowcasex.channel-api.livestream-api.com/2.0/getstream

Replace the your channel name instead of proshowcase. And then get all mobile compatible url's like IPhone, Android, Blackberry etc.,

Using that url you can stream the video in Android by using video view or media player.

For more information please read the Mobile Api link.

If any one get the same problem I hope this answer will helps you.

Best of luck.

Solution 2:

I have no problem to play stream:

videoView1.setVideoPath("http://***.net/livedemo/_definst_/stream3.stream/playlist.m3u8?wowzasessionid=773395207");
videoView1.start();

About the message:

The video cannot be played

Maybe you need to add permissions to your Manifest file:

<uses-permissionandroid:name="android.permission.INTERNET"/><uses-permissionandroid:name="android.permission.ACCESS_NETWORK_STATE"/>

Solution 3:

I think you should move this:

mMediaPlayer.setOnPreparedListener(this);

To be before the call to prepare()

Solution 4:

Did you try to play your link with native player directly through web browser? If you can not play it with native player, it means that your file is not supported by your current Android version. HTTP Live Streaming format can have some specificities that are not well supported by Android, whereas it can play on IOS.

Solution 5:

I tried m3u8 video format for more than 6 months and it is not succeeded. It is playing in my iPhone app and native applications. My streaming server is Red5 and it has no RTSP plugin. It gives out RTMP streaming and it could not be streamed in Android. I waited for one year to get an OS having support for RTSP streaming but google haven't. Still I am using a web view with a flash player to stream live video(It has not much clarity). I feel shame to say this to my client and continuing search to play the live stream in Android default player.

I think your video url may not RTSP.

Post a Comment for "Play M3u8 Video In Android"