Wowza Community

Dynamic Bandwidth Detection (BWCheck)

By result set, I mean the bandwidth numbers that are received by onBWDone. I don’t know how to do what you want exactly. I would just fake it, i.e, start up your display when bandwidth checking starts, increment the progress bar until the onBWDone function receives the result set, then have it go to 100% and disappear. The real purpose of a progress bar in this case is providing feedback to the user that something is happening. It doesn’t have to measure the progress accurately to do that.


Also, the “progress” is mostly on the server, so it’s not exactly available client-side the way you are thinking about it. But I suppose you could react to onBWcheck being triggered, and onBWdone gets called once prior to getting the final result. So the progress bar could key off that and increment in thirds. Something like that.


Just setup BWCheck in your application following the guide in the top of this thread. You add a jar file to the Wowza lib folder, and add a Module to the Application.xml. Then the code that handles BWCheck in the player will work.


Install the Developer edition and the examples folder will be there.


There is a pre-built version of this module you can download from the first post in this thread, so you don’t need to build this code in the IDE.

JW Player’s dynamic streaming does use the BWCheck if it is present, and it is good idea to have it, it will work better. It does this at connection time only to decide which level to start with, then uses other methods ( object/QoS metrics) during the streaming session to change levels.

As I understood it, Wowza accepted a single file in, and then would re-encode it on the fly for connections of lower bandwidth

No, this does not happen. Wowza does no transcoding. You need multiple versions of a video or live stream to do this. (I’m curious what you read that gave you that understanding?)

Each version of video or live stream has to be keyframe and timecode aligned. FMLE is known to do this for live streams.


Yes, do follow the JW Player dynamic streaming tutorial. It’s a client-side solution. The only server-side aspect is the BWCheck module and the stream variations.

You can use remap a stream in an application module or use StreamNameAlias possibly to help with your use case:

Override play remap stream name


We’ve been testing Expression encoder recently and it seems to be producing correctly aligned versions.


The BWCheck works with Flowplayer. It works with that example and they have simpler version that just does the connection time 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.