Wowza Community

Wowza Dynamic Bitrate Streaming

We have a live streaming application of Mobile TV. We are sending stream from wirecast to wowza server. and our clients see the streams from their mobile. Now we want to initiate dynamic adaptive streaming. for this purpose, We need the client’s mobile network’s bandwidth. how can we get that in our server side java application and send streams to them based upon their bandwidth?

Hello there and welcome to the Wowza support forum.

Handling the switching between bitrates is done(with the least amount of work) by the client.

One thing to keep in mind is keyframe alignment is critical for adaptive bitrate streaming to work. For this reason I would recommend you employ the Wowza Transcoder.

To setup the live stream for ABR, please check out this Transcoder guide:

How to set up and run Wowza Transcoder AddOn for live streaming

And here is the Adaptive bitrate section of the previous guide

If you are going to create the renditions of the ABR set without the Transcoder, you can follow this guide to configure ABR streaming:

How to do adaptive bitrate streaming

And finally, to answer your initial question, there is an article which describes how to use a bandwidth checker to test server-to-client bandwidth (for RTMP clients)

How to test server-to-client bandwidth for RTMP clients

If you need assistance implementing the bandwidth checker into your workflow, I would suggest you seek the aid of a Wowza endorsed consultant by posting a request to the find a consultant forum

I hope this is helpful.

Kind regards,

Salvadore

For RTMP clients you can do RTMP Dynamic Streaming. This a set of APIs actually, mostly built around NetSteam.info() and NetStream.play2(). JW Player has a good implementation of these APIs, and Wowza has integration with JW Player to leverage the server-side smil used for HTTP clients, client-side in JW Player for it to know what bitrate renditions are available and to switch as necessary. Again, this is JW Player’s implementation of this API, feature set in Flash. If you are going to build this out your self, there is a lot of work to do and none of our examples are useful as starting place or reference.

Take a look at the 2nd example in this JW Player 6 article, which shows how to do what I am referring to, leveraging server-side smil client-side. And it does cupertino streaming if opened in a iOS device:

How to use JW Player with Wowza Streaming Engine

Wowza cannot by itself detect bandwidth. It is something the client has to initiate and participate in. HTTP clients have bandwidth detection built-in. By the time a HTTP playback client downloads one chunk, it knows the chunks size and how long it took to download = bitrate, etc., continuous bandwidth checking and switching as necessary, derived from what it is already doing. RTMP clients have to send packets back and forth and measure size/time, something that is not happening as part of normal RTMP streaming, as in the HTTP playback client. Flash apps that use RTMP Dynamic streamng do this by continuously monitoring the NetStream.info() object.

What you describe is not built-in. I don’t know how you might make that work, I have a doubt that it can work. But, in any case, each stream has to be key frame aligned for any kind of ABR switching to work. From Wowza’s point of view, switching RTMP clients and HTTP clients is not different. Either client requests the switch based on its calculations, Wowza performs the switch. And either way, key frame alignment is necessary for that to work. You can look at PTS and DTS values to debug alignment following this guide:

Kind regards,

Salvadore

Newer Android devices support HLS streaming.

For older Android devices you can include a link to the RTSP stream and set fallback to “false”.

NOTE: Adaptive bitrate streaming is not supported over RTSP.

Here is a sample JWPlayer code with RTSP link and fallback set to “false”:

<div id="test"><a href="rtsp://[server]:1935/Live/[stream-name]">RTSP Link</a></div>
<script type="text/javascript>
jwplayer("test").setup({
	playlist:
	[{
		title: "Title",
		sources:
		[{
			file: "http://[server]:1935/Live/ngrp:Test_all/playlist.m3u8" //  HLS URL
		},
		{
			file: "http://[server]:1935/Live/ngrp:Test_all/jwplayer.smil" // RTMP Playlist URL
		}]
	}],
	rtmp:
	{
		bufferlength: 5
	},
	width: 640,
	height: 360,
	fallback: false
});
</script>

Kind regards,

Salvadore

@Salvadore, The bandwidth checker addon works on client computer to test the bandwidth latency between client and server computer and it indicates that I have to install some files in client’s computer. I think here client means the stream publisher machine not the client who will see the streams from their mobile. but I need the client’s mobile network’s bandwidth when they hit the wowza server for seeing the streams. but it’s not possible to install files on client’s mobile! the what can I do to get the client’s mobile network bandwidth?

@Salvadore, The bandwidth checker addon works on client computer to test the bandwidth latency between client and server computer and it indicates that I have to install some files in client’s computer. I think here client means the stream publisher machine not the client who will see the streams from their mobile. but I need the client’s mobile network’s bandwidth when they hit the wowza server for seeing the streams. but it’s not possible to install files on client’s mobile! the what can I do to get the client’s mobile network bandwidth?

Thanks a lot for the Details information Savadore! I’m trying to working on it. But one question for now, I’ve tried with JW player. I have also seen that JW player has a good API implementation of Dynamic Streaming. But When i embedded JW player (with a video file/live stream) in a web page and was trying to access that page from a Android mobile phone set(default browser), then I found the page appeared but the browser can’t play JW player! Then, I got frustrated! How can I implement Dynamic streaming API of JW player, where the android browser can’t play JW player??

NB: The Android operating system of the mobile set is not fully updated with the latest version. Is that a problem?