Wowza Media Server is a Flash Media Server alternative, Flash streaming server and flash server.



Wowza Media Server Pro: Quick Start Guide

Introduction

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_)

An example rtmp url is:

rtmp://192.168.1.5/myapplication

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, defaultVideo on demand streaming of static Flash media, H.264/AAC and MP3 content
recordVideo recording
livePublish and play live video content (best for one-to-many streaming of live events)
live-lowlatency, chatPublish and play live video content (best for one-to-one or one-to-few video/audio chat applications)
live-recordPublish, play and record live video content (best for one-to-many streaming of live events)
live-record-lowlatencyPublish, play and record live video content (best for one-to-one or one-to-few video chat applications)
shoutcastAudio re-streaming of a SHOUTcast/Icecast MP3 or AAC+ audio stream
liverepeater-origin, liverepeater-edge, liverepeater-bufferPublish 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.

Quick Tutorials

How to start Wowza Pro standalone

WindowsMethod1:
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 OSXMethod1:
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
LinuxOpen a command shell and enter the commands:
cd /usr/local/WowzaMediaServerPro/bin
./startup.sh

How to start Wowza Pro as a service

WindowsSelect:
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 OSXRun the Terminal application and enter the command:
sudo launchctl load -w /Library/LaunchDaemons/com.wowza.WowzaMediaServerPro.plist
LinuxFedora 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.

Which ports need to be open on my firewall

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) StreamingTCP 1935
RTP UDP StreamingUDP 6970-9999
JMX/JConsole Monitoring and AdministrationTCP 8084-8085

How to verify Wowza Pro is running

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]:1935

Where [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).

How to setup a video on demand application

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:

How to setup a live streaming application

We are going to setup an application named livevideo to stream live video.

  1. Create the folder [install-dir]/applications/livevideo.
  2. Create the folder [install-dir]/conf/livevideo.
  3. Copy [install-dir]/conf/Application.xml into [install-dir]/conf/livevideo.
  4. Edit the newly copied Application.xml and change Streams/StreamType to live

To connect to this application to either publish or play a live stream use the rtmp url rtmp://[server-ip-address]/livevideo.

See also:

How to stream using a RTSP/RTP based encoder

Instructions for using live RTSP/RTP based encoders can be found at Wowza Media System Forums: Live Encoders.

How to stream using a MPEG-TS based encoder

Instructions for using live MPEG-TS based encoders can be found at Wowza Media System Forums: Live Encoders.

How to stream using a native RTP based encoder

We are going to setup an application named rtplive to stream live video from a native RTP encoder.

  1. Create the folder [install-dir]/applications/rtplive.
  2. Create the folder [install-dir]/conf/rtplive.
  3. Copy [install-dir]/conf/Application.xml into [install-dir]/conf/rtplive.
  4. Edit the newly copied Application.xml and change Streams/StreamType to rtp-live
  5. From the encoder generate a Session Description Protocol (SDP) file that describes the native stream (consult your encoders documentation for instructions on how to do this) and name the file myStream.sdp.
  6. Copy the SDP file into the [install-dir]/content folder
  7. Double click [install-dir]/examples/NativeRTPVideoStreaming/client/nativertp.html, set Server to rtmp://[server-ip-address]/rtplive and Stream to myStream.sdp and click the Play button

To connect to this application to either publish or play a live stream use the rtmp url rtmp://[server-ip-address]/rtplive.

See also:

How to setup a video chat application

We are going to setup an application named videochat to host a video chat application.

  1. Create the folder [install-dir]/applications/videochat.
  2. Create the folder [install-dir]/conf/videochat.
  3. Copy [install-dir]/conf/Application.xml into [install-dir]/conf/videochat.
  4. Edit the newly copied Application.xml and change Streams/StreamType to live-lowlatency

To connect to this application to either publish or play a video stream use the rtmp url rtmp://[server-ip-address]/videochat.

See also:

How to setup a video recording application

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:

How to develop server-side code

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:

  • Example: [install-dir]/examples/ServerSideModules
  • Javadocs: [install-dir]/documentation/serverapi/index.html
  • Forum: Useful Code

Where to find the Wowza Pro log files

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.

How to tune Wowza Pro

For up to date tuning instructions, see the following forum thread:

General Tuning Instructions

How to change serial number

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.