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?
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:
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
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: