
This document is a very short and quick tutorial to get you started with Wowza Media Server Pro. For more in-depth information consult the User's Guide. For more up to date information visit the online forums at http://www.wowzamedia.com/forums. Wowza Pro also provides some great examples to get your started. Consult [install-dir]/examples/README.html for more details.
Let's jump right in. When you connect to the Wowza Pro server from a Flash player client, you specify up to four pieces of information as part of the rtmp url. An rtmp url takes the following form:
[protocol-method]://[server-ip-address]/[application]/[application-instance]
| [protocol-method]: | rtmp, rtmpt (tunneling) or rtmps (tunneling over ssl) |
| [server-ip-address]: | ip address or domain name of server running Wowza Pro or localhost if running locally |
| [application]: | application name |
| [application-instance]: | application instance name (if omitted defaults to _definst_) |
Throughout this document and in other Wowza Pro documentation we will refer to [install-dir] as the folder to which Wowza Pro was installed. The installation folder is different based on platform:
| Windows | C:\Program Files\Wowza Media Systems\Wowza Media Server Pro [version] |
| Mac OSX | /Library/WowzaMediaServerPro |
| Linux | /usr/local/WowzaMediaServerPro |
Applications are defined server-side by creating a new folder in the folder [install-dir]/applications. To create a new application named myapplication, create the folder [install-dir]/applications/myapplication. The configuration for each application is read from one of two places. First, Wowza Pro checks for the file [install-dir]/conf/[application]/Application.xml. If that file does not exist then it uses the configuration defined in [install-dir]/conf/Application.xml. Consult the User's Guide for more details on the configuration items defined in Application.xml.
One of the major differences between Wowza Media Server Pro and the Adobe Flash Media Server (FMS) is the way Wowza Pro handles the NetStream object on the server. Wowza Pro provides a mechanism for defining custom server side NetStream implementations or stream types. These stream types are configured using the Streams/StreamType property in the Application.xml file. The following table list each of the stream types and their intended use:
| file, default | Video on demand streaming of static Flash media, H.264/AAC and MP3 content |
| record | Video recording |
| live | Publish and play live video content (best for one-to-many streaming of live events) |
| live-lowlatency, chat | Publish and play live video content (best for one-to-one or one-to-few video/audio chat applications) |
| live-record | Publish, play and record live video content (best for one-to-many streaming of live events) |
| live-record-lowlatency | Publish, play and record live video content (best for one-to-one or one-to-few video chat applications) |
| shoutcast | Audio re-streaming of a SHOUTcast/Icecast MP3 or AAC+ audio stream |
| liverepeater-origin, liverepeater-edge, liverepeater-buffer | Publish and play live video content across multiple Wowza Media Server Pro servers in an origin/edge configuration (one-to-many live streaming or live events) |
Wowza Media Server Pro supports Flash media content (.flv), H.264/ACC media content (.f4v, .mp4, .m4a, .mov, .mp4v, .3gp, and .3g2) and MP3 content (.mp3). To play pre-recorded media files using the NetStream.play() command, the proper qualifier must be prepended to the file name. For example to play the file “mycoolvideo.m4v”, specify the stream name “mp4: mycoolvideo.m4v” as the stream name in the NetStream.play() command. Wowza Pro supports the following media qualifiers:
| flv: | Flash media files (.flv) (this is the default media type so the qualifier and the file extension can be omitted) Example: ns.play("mycoolvideo"); |
| mp4: | H.264/ACC media content (.f4v, .mp4, .m4a, .mov, .mp4v, .3gp, and .3g2) Example: ns.play("mp4:mycoolvideo.m4v"); |
| mp3: | MP3 media content (.mp3) Example: ns.play("mp3:mycoolsong.mp3"); |
| id3: | MP3 media content (.mp3) (will only return the ID3 tags without playing the media) Example: ns.play("id3:mycoolsong.mp3"); |
Do not prepend any qualifiers to the stream name when playing live content. The stream name used for live content must match the stream name specified in the encoder exactly (it is case sensitive).
When playing video on demand content (pre-recorded content), the files can be stored in directory structures where it is necessary to specify the relative path to the content. For example, you might store your H.264 content in a sub-directory of the [install-dir]/content folder such as myvideos. To play the video file “[install-dir]/content/myvideos/mycoolvideo.m4v” you would use the stream name:
mp4:myvideos/mycoolvideo.m4v
Some Flash video players combine the connection url and stream name into a single url (FLVPlayback component, JWPlayer, FlowPlayer...). If this is the case, then to play this same video using the application name "myapplication" when the Wowza Pro server is hosted at the ip address 192.168.1.5, use the URL:
rtmp://192.168.1.5/myapplication/mp4:myvideos/mycoolvideo.m4v
If this does not work properly, you might need to specify the application instance name as part of the URL. In this case we will use the default application instance name "_definst_". The modified URL is:
rtmp://192.168.1.5/myapplication/_definst_/mp4:myvideos/mycoolvideo.m4v
Wowza Media Server Pro supports the Real-Time Streaming Protocol (RTSP), Real-time Transport Protocol (RTP) and MPEG Trasport Streams (MPEG-TS) for incoming streaming of H.264/ HE-AAC content. This enables the use of live encoders such as Vara Software's Wirecast, Apple's QuickTime Broadcaster, and hardware based encoders such as those from companies such as: Haivision, Scopus and Optibase. There are two methods for delivering RTP based H.264/HE-AAC live content to Wowza Media Server Pro. The most common method is to use an encoder that supports the QuickTime announce command through an RTSP/RTP session. Using this method the encoder creates a RTSP session with Wowza Pro and sends the Session Description Protocol (SDP) information using the announce command. The RTSP session is used to manage the RTP session startup and shutdown. The second method is a native RTP based solution. The SDP information is communicated to Wowza Pro either through the file system or an HTTP request.
| Windows | Method1: Select: Start Menu->Programs->Wowza Media Server Pro [version]->Wowza Pro Startup Method2: Open a DOS command prompt and enter the commands: cd $WMSAPP_HOME/bin startup |
| Mac OSX | Method1: Double-click: /Applications/Wowza Media Server Pro [version]/Wowza Pro Startup Method2: Run the Terminal application and enter the commands: cd /Library/WowzaMediaServerPro/bin ./startup.sh |
| Linux | Open a command shell and enter the commands: cd /usr/local/WowzaMediaServerPro/bin ./startup.sh |
| Windows | Select: Start Menu->Settings->Control Panel->Administrative Tools->Services Double-click the Wowza Media Server Pro entry, set startup type to Automatic and click the Start button. |
| Mac OSX | Run the Terminal application and enter the command: sudo launchctl load -w /Library/LaunchDaemons/com.wowza.WowzaMediaServerPro.plist |
| Linux | Fedora and RedHat: Open a command shell and enter the commands: chkconfig --level 345 WowzaMediaServerPro on service WowzaMediaServerPro start Note: For other distributions, consult your operating system documentation on how to run an init.d service. |
The following ports are used by default by Wowza Pro for streaming. You will need to open up these ports on your firewall to enable streaming.
| RTMP/RTMPT/RTMPE/RTSP(interleaved) Streaming | TCP 1935 |
| RTP UDP Streaming | UDP 6970-9999 |
| JMX/JConsole Monitoring and Administration | TCP 8084-8085 |
You can verify the Wowza Pro server is running by connecting to it using a a web browser. To do this, open a web browser and enter the following url:
http://[server-ip-address]:1935Where [server-ip-address] is the ip address of the server running Wowza Pro. It should return the Wowza Pro version number. If it does not validate that the server is started and check to be sure TCP port 1935 is open on your router, firewall and/or software firewall (iptables on Linux).
Create the folder [install-dir]/applications/streamingvideo to serve as the application folder. This will enable you to connect to the server using the rtmp url rtmp://[server-ip-address]/streamingvideo. Next, copy your media files to [install-dir]/content.
See also:
We are going to setup an application named livevideo to stream live video.
To connect to this application to either publish or play a live stream use the rtmp url rtmp://[server-ip-address]/livevideo.
See also:
Instructions for using live RTSP/RTP based encoders can be found at Wowza Media System Forums: Live Encoders.
Instructions for using live MPEG-TS based encoders can be found at Wowza Media System Forums: Live Encoders.
We are going to setup an application named rtplive to stream live video from a native RTP encoder.
To connect to this application to either publish or play a live stream use the rtmp url rtmp://[server-ip-address]/rtplive.
See also:
We are going to setup an application named videochat to host a video chat application.
To connect to this application to either publish or play a video stream use the rtmp url rtmp://[server-ip-address]/videochat.
See also:
Create the folder [install-dir]/applications/videorecording to serve as the application folder. This will enable you to connect to the server using the rtmp url rtmp://[server-ip-address]/videorecording. Your content will be recorded to the folder [install-dir]/content.
See also:
All of Wowza Pro's server-side coding is done in Java. The easiest way to get started is to download and install the Eclipse based Wowza Integrated Development Environment (WowzaIDE) at http://www.wowzamedia.com/labs.html#wowzaide. Follow the instructions in the included User's Guide. It will guide you through the process of creating your first custom module.
See also:
The Wowza Pro log files are written to the directory [install-dir]/logs. To turn on debug logging (increase the amount of information written to the logs) edit [install-dir]/conf/log4j.properties and change the log level on the first line from INFO to DEBUG. Due to it's increased load on the server, debug logging should be used in a production environment.
For up to date tuning instructions, see the following forum thread:
General Tuning Instructions
The serial number is located in the file [install-dir]/conf/Server.license. Simply edit this file using a text editor such as NotePad, TextEdit, TextWrangler or vi and replace the serial number in this file with the new serial number.