Wowza Community

Live broadcasts fine on ios and pc - but exactly what is needed to go on Android?

I broadcast live rtmp streams with FMLE. Despite reading the forums, I can’t figure out if, to be viewed on Android, I need to:

  1. send out an additional rtsp stream from a second instance of FMLE for all my broadcasts

  2. do a transcode of all my live streams from rtmp to rtsp using a wowza add on

  3. use the existing rtmp stream with some extra semantics (playlist.m3u8) like the ios devices use to make it http: (jeez - how does that work?)

Thanks for the probably very obvious answer :confused:

ys

Android devices 4.0+ generally support hls playback. Your playback would look the same as your iOS device. Typically in mosts iterations of Android a rtsp url is an accepted fallback as well. I would try both protocols with your sample.mp4 file that comes with your Wowza installation to do your initial testing:

rtsp://[your-wowza-ip]:1935/vod/mp4:sample.mp4
http://[your-wowza-ip]:1935/vod/mp4:sample.mp4/playlist.m3u8

Hi,

Unfortunately you can’t put rtsp urls in a video tag, as that’s not supported in most html5 implementations.

Your best option is to provide a href link on this side,that provides clickable link that says “Click here for the Android RTSP stream”

or similar.

<body>
<div id="rtsp_live">
    <a href="rtsp://xx.xx.xx.xx:1935/live/myStream"><img border="0"
                           alt="EXAMPLE RTSP"
                           width="426"
                           height="240"/>click to play Android RTSP stream</a>
</div>
</body>

Daren

I only do live streaming… just tested this in my web-page. I think your code is for recorded video, so this was not going to work anyway:

I would appreciate it if you can you please take a look at the code below and let me know what it should be.

<video controls="controls" width="100%"
	src="rtsp://[my server]:1935/broadcast/LosAngeles/Los Angeles/mp4:sample.mp4"															
        src="http://[my server]:1935/broadcast/LosAngeles/Los Angeles/playlist.m3u8"
	autoplay="true">					
</video>

The Iphone stopped playing - the playlist.m3u8 does work on its own, it is my normal code. Haven’t tried android yet, but am pretty sure it won’t work either.

Still unsure how, when live streaming just rtmp and no fancy server stuff, I can also get http and rtsp… Just good karma, I guess!

Thanks in advance,

ys

src=“http://[WOWZA-SERVER-IP]:1935/live/myStream/playlist.m3u8”

I am doing that - it works - and with fallback to flash, also working. Could you please give me a line for providing rtsp to androids similar to the one above you gave above for providing http to ios devices. The one for live streams please.

That would complete my player.

btw, the line above only works for devices above iPhone 4 like iPhone 4s - at least that is my experience. Is this correct?

Thanks again,

ys

Hi,

You just need to ensure the URL in your code matches what Wowza generates. So for example an HTML5 web page hosting a live Apple HLS live steam can be as simple as:

<html>
<head> 
  <title>test</title> 
</head>
 
<body> 
        <video controls src="http://[WOWZA-SERVER-IP]:1935/live/myStream/playlist.m3u8">
        </video> 
</body> 
</html>

Where:

live = a Wowza application called live

myStream = a stream that is being ingested by the “live” application

To do more elaborate streaming, including fallback to Flash (rtmp) I’d take a look at JWPlayer.

You could code this fallback yourself in HTML5 but it does require more complex code. This article has an example.

-Paul