Wowza Community

Dynamic Bandwidth Detection (BWCheck)

Flowplayer and JW Player both have dynamic switching solutions to accomplish this. They use BWCheck in the beginning, but only once, then use object, the “QoS” (quality of service) metrics to decide when to switch streams.

I’ve not worked with the Flowplayer implementation, but I have used the JW player one. The tutorial is here:

You need versions of a video that are Keyframe and timecode aligned. The MS Expresssion encoder seems to be able to do that.


Are you doing live streaming? Wirecast does live, Expression encoder doesn’t do live. At present, as far as I know, Wirecast does not do the necessary alignment for this purpose. FMLE works.


We have guides in the Live Encoder section:

I can’t really recommend. They all have their strengths, weaknesses and price points


If you are still using Wirecast, as I mentioned before I think, it does not properly align the keyframe timecodes to make live switching possible. FMLE can do this. Have you seen this, you can debug keyframe timecodes with this, to see if they are lining up:


My point is the jar does not fire the onBWDone call twice but the code sample does… hence I believe they are not in sync on a code level.

And to your code sample… I am seeing bw numbers on both calls and so both onBWDone calls would be considered valid which isn’t the correct usage. The two calls report very different bandwidth numbers.



Hey Richard,

I was looking at the response you had for using JW Player 5.1 for dynamic streaming in this thread.

No, this is not needed for that. The main thing you need is video versions that have properly aligned keyframe timecodes. Follow this tutorial:


So, I’m looking into dynamic streaming with RTMP as mentioned here (

and saw this listed in the doc:

“Stream switching for RTMP based upon bandwidth only works if the server implements a checkBandwidth call. This is default in FMS 3.0+, and easy to set up with Wowza. If there’s no checkBandwidth handler, streams will be switched based solely on the available display width.”

Do I need to set anything up on Wowza 2 for this?



OK Cool. Thanks Richard


I am not able to run these demo in BWChecker

CtoSBWCheck.html and bwcheck.html

Do you have AS3 and flex version of it

for CtoSBWCheck reponse

It outputs the following data:





How can I calculate out of this the bandwidth:

Is deltaTime in milliseconds ? is it the time it took to download ?

What is deltaDown? is it in bits, in Milliseconds ?

Is latency in milliseconds ? How do I add it to the equation ?

kbitDown is the total amount of bits sent, right ?


Thanks Richard, but I was aiming at something else.

Suppose I have a myFIle that I send to the user,

and i want to calculate how long it will take for the user to recieve it.

I know my file size, but i dont know what`s the user download speed.

How can I tell the user`s download speed by this data, please ?

Thanks Richard so if


it means it loads 1000kbit per second ?

and if , then i want to send a file of 1000kbit to the user

it will be transferred in:

1 second + latency ?

You must have had someone else in mind when sending this message, Richard.

Which makes a lot of sense to me, Considering you must be answering such a multitude of questions by so many users.

Please believe me I have no issue with the QoS metrics built-in to Flash, nor the

Im simply trying to use this BWcheck module as a means of claculating how long will it take the user to recieve a specific big file (the files not being sent with NetStream at all).

Neither did I assume that latency and kBitDown are the same.

I just attempted to determine if the formula for calculating how long a file will take to be transferred (assuming bandwidth is not constant) would be:

Latency + kbitDown*fileSize in kbits 

Is my formula correct ?

If not, what would be the right formula, please ?

Also, you said:

“latency” is how long will it take to start playing

The speed at which it will play once it starts is indicated by kbitDown

In what units is measured latency ? seconds ?

and in what units is measured kbitDown? kbits per second ?

Many thanks

Please excuse me.

Surely there`s no need for any excuse at all…

Quite the opposite - Thank you for your swift responses and assistance !

Thank you for asserting my assumption about the units AND for correcting my formula. Of course it`s divided and not multiplied.

Again , many thanks - you`ve helped me a great deal.

Please just another question:

Is KILO calculated in the wowza server in standard notation as in 1 Kilobit= 1024 bits or in IEEE notation as in 1 Kilobit=1000bits, please ?

Hi Richard, I cant get the LIVE RTMP stream switching… I followed guides from flow player and cant get live rtmp working. VOD RMTP works, but not LIVE…

Our task is to have one page for the viewer to enter and depending on the load of his/her connection it will choose between 3 streams 700 kbps, 400, and 150…

As far as I’ve been able to determine dynamic switching doesn’t work for live streams due to the lack the ability to buffer ahead of play back time.

The details of my findings are here:-

I am using the bandwidth checker for my video streaming application and it is working well. However, I would like to show a progress bar while this is going on. Suggestions on how to do it? I am specifically looking for how to get the amount of bandwidth measurement data already received by flash client at a periodic interval.




By result set you mean the payload used for bw estimation? I was hoping there is a way I can the amount of data received so far, in actionscript, on the player side. And divide that by the total number of bytes expected. Is that possible? If so, could you point me on how to do this?


Do I need to use this module when trying to get JW player 5.1 and Wowza with Dynamic Bitrate Switching to work?

It seems the sample code is not up to date with the jar file… when using the jar the bw is reported to the client once… when using the code above compiled into a module… the bw call fires twice.

Also… one small suggestion… :slight_smile:

When using the jar out of the box it might be nice to wrap the onConnect check in a try catch so that this error doesn’t occur if the second buy acomplia param isn’t passed:

invoke(onConnect): java.lang.ClassCastException: com.wowza.wms.amf.AMFDataObj cannot be cast to com.wowza.wms.amf.AMFDataItem: com.wowza.wms.amf.AMFDataList.getBoolean(null:-1)



Thank you jakehilton for your prompt and complete response!

You wrote:

There are AS2 and AS3 Flash client examples in the examples folder of Wowza Server:




I cant find the /examples directory! Do you have a link to the code, the as file?