This article describes how to use a bandwidth checker provided by forum contributor Roger. It is a Wowza Media Server/Java version of the bandwidth checker:
To install the BWCheck package
- Download BWChecker.zip and extract the contents from the compressed (zipped) folder.
- Copy the lib/wms-plugin-bwcheck.jar file in the package to the [install-dir]/lib folder.
- If Wowza Media Server® is running, restart the server.
To configure the bandwidth checker on the server
- Create a folder named [install-dir]/applications/bwcheck.
- Create a folder named [install-dir]/conf/bwcheck.
- Copy the [install-dir]/conf/Application.xml file to the new [install-dir]/conf/bwcheck folder.
- Open the [install-dir]/conf/bwcheck/Application.xml file in a text editor and either remove or comment-out the flvplayback module reference:
Code:<!--Remove or comment-out this section.-->
<Module>
<Name>flvplayback</Name>
<Description>FLVPlayback</Description>
<Class>com.wowza.wms.module.ModuleFLVPlayback</Class>
</Module> - Add the following module reference as the last entry in the <Modules> section (it is important that it be the last entry):
Code:<Module>
<Name>BWCheck</Name>
<Description>BWCheck</Description>
<Class>com.wowza.wms.plugin.bwcheck.ModuleBWCheck2</Class>
</Module>
Note: The ModuleBWCheck2 module source code is included in the src folder that you extracted from the BWChecker.zip file.
To configure bandwidth checker clients
Copy the client folder that you extracted from the BWChecker.zip file to a client computer. The client folder contains the following renditions of the bandwidth checker client:
bwchecker.html
This is an interactive tool that tests server-to-client bandwidth every 5 seconds.
- Install the bandwidth checker client:
- On Windows® operating systems, right-click install.bat, and then select Run as administrator.
- On Linux® operating systems, run ./install.sh.
- On Mac OS® X, run ./install.command in a terminal window.
- Open the bwchecker.html file in a web browser and update the Server field with the IP address of the remote Wowza Media Server that you configured in the previous section (for example, rtmp://[wowza-ip-address]/bwcheck).
- Click Start.
The sample application will return the download speed and latency value between the remote Wowza Media Server and your local browser approximately once every 5 seconds.
bwcheck.fla
This is an example of how you might call the bandwidth checker on the server from your Adobe® Flash® client application. You can integrate the example code in this file into your Flash-based player to test bandwidth before playing a media stream. When the bandwidth checker is done, it will call onBWDone with the calculated bandwidth in kilobits-per-second (kbps).