# Wowza Media Server 2: Quick Start Guide

## Table of Contents

Introduction
Application Configuration
Stream Types
Supported Media
Content Storage
Real Time Messaging Protocol (RTMP - Adobe Flash Player)
Apple HTTP Live Streaming (Cupertino Streaming - iPhone, iPod touch)
Smooth Streaming (Microsoft Silverlight)
RTSP/RTP/MPEG-TS (QuickTime, VLC, mobile devices, set top boxes, encoders)
Installation
Installing the Server
Starting and Stopping the Server
Ports Used for Streaming
How to verify Wowza Server is running
Installing Examples
Entering a New Serial Number
Tutorials
How to play a video on demand file
How to publish and play a live stream (RTMP or RSTP/RTP based encoder)
How to publish and play a live stream (MPEG-TS based encoder)
How to publish and play a live stream (native RTP encoder with SDP file)
How to re-stream video from an IP camera
How to re-stream audio from SHOUTcast/Icecast
How to setup video chat application
How to setup video recording application
How to stream and record a live video
How to develop server-side code
Administration
Logging
Server Tuning
Management and Monitoring (JConsole and JMX)

## Introduction

This document is a very short and quick tutorial to get you started with Wowza Media Server 2. Wowza Media Server 2 is high performance media streaming server software for delivering content to the following player technologies and devices: Adobe Flash® (Adobe Flash player), Microsoft Smooth Streaming (Microsoft Silverlight® player), Apple HTTP Live Streaming (iPhone™, iPod® touch, Safari® browser, QuickTime® player), Real Time Streaming Protocol (RTSP/RTP) (QuickTime player and VLC media player and many mobile devices) and MPEG2 Transport Streams (MPEG-TS) (set-top boxes and IPTV solutions).

For more in-depth information consult the Wowza Media Server 2 User's Guide. For more up to date information visit the online forums at: http://www.wowzamedia.com/forums. Wowza Server also provides some great examples to get your started. Once the server is installed, the examples are located at: [install-dir]/examples (see the README.html file at the root of the examples folder).

This document refers to third party software that is not licensed, sold, distributed or otherwise endorsed by Wowza. Please ensure that any and all use of Wowza software and third party software is properly licensed.

Throughout this document and in other Wowza Media Server documentation we will refer to [install-dir] as the folder to which Wowza Media Server was installed. The installation folder differs based on platform:

Windows | C:\Program Files\Wowza Media Systems\Wowza Media Server 2
Mac OSX | /Library/WowzaMediaServer
Linux | /usr/local/WowzaMediaServer

###

### Application Configuration

To begin using Wowza Media Server 2, first create an application. An application is defined simply by creating a folder in the [install-dir]/applications folder. For example, to create a new application named myapplication, create the folder:

[install-dir]/applications/myapplication

The application is now ready to use for simple video on demand streaming. It will use the default configuration file which is located in the [install-dir]/conf folder:

[install-dir]/conf/Application.xml (Default configuration file)

To give an application its own Application.xml instead of using the default configuration file, create a folder with the same name in the [install-dir]/conf folder and copy the default configuration file to the new folder.

[install-dir]/conf/myapplication/Application.xml (Configuration file for myapplication)

It is a common mistake to put the Application.xml file in the [install-dir]/applications/[application] folder. All configuration files for Wowza Server and its applications are in the [install-dir]/conf folder.

A single application can be configured to deliver a live or video on demand stream to the Adobe Flash player, the Silverlight player, an Apple iPhone or iPod touch device and an RTSP/RTP based player at the same time (with the exception of video on demand delivery to RTSP/RTP which is not supported in the current version).

Consult the User's Guide for more details on the configuration items defined in Application.xml.

###

### Stream Types

In Wowza Media Server 2 MediaStreams represent a incoming or outgoing stream of video, audio or metadata. Wowza Server provides a mechanism for defining custom server-side MediaStream implementations or stream types. These stream types are configured using the Streams/StreamType property in the Application.xml file. The following table list the more commonly used stream types and their intended use (for a complete list consult the User's Guide):

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 | Publish and play live video content (best for one-to-one or one-to-few video/audio chat applications)
live-record | Same as live in addition content will be recorded
shoutcast | Audio re-streaming of a SHOUTcast/Icecast MP3 or AAC+ audio stream
shoutcast-record | Same as shoutcast in addition content will be recorded
liverepeater-origin | Origin stream type used by live stream repeater to deliver a single streaming using origin/edge configuration
liverepeater-edge | Edge stream type used by live stream repeater to deliver a single stream using origin/edge configuration
rtp-live | Re-streaming of an RTSP/RTP, native RTP or MPEG-TS stream
rtp-live-record | Same as rtp-live in addition content will be recorded

###

### Supported Media

Wowza Media Server 2 supports the following media file formats: FLV (Flash Video), MP4 (QuickTime container) and MP3 content (see table below for common file extensions). To play video on demand content, the proper prefix must be perpended to the file name to create a stream name. For example to play the MP4 file mycoolvideo.mov use the stream name mp4:mycoolvideo.mov. The following table lists the more common file type prefixes (for a complete list consult the User's Guide):

flv: | FLV (Flash Video - this is the default media type so the qualifier and the file extension can be omitted) Example: "flv:mycoolvideo.flv"
mp4: | MP4 (QuickTime container - .mp4, .f4v, .mov, .m4v, .mp4a, .3gp, and .3g2) Example: "mp4:mycoolvideo.mov"
mp3: | MP3 (.mp3) Example: "mp3:mycoolsong.mp3"
smil: | SMIL (XML files used to configure multi-bitrate streams - .smil)

###

### Content Storage

Wowza Media Server 2 is configured by default to use a single content directory which is located at [install-dir]/content. You can change the default content location on an application by application basis by changing the Streams/StorageDir property in Application.xml to the desired content path.

###

### Real Time Messaging Protocol (RTMP - Adobe Flash Player)

Wowza Media Server 2 can stream multi-bitrate live and video on demand content to the Adobe Flash player over RTMP. Wowza Server is a great alternative to Flash Media Interactive Server (FMIS) and Flash Media Streaming Server (FMSS). It supports media streaming as well as other features such as: Shared Objects, video recording, video chat, remote procedure calls and more. Wowza Server supports all video and audio formats that the Flash player supports:

Video

- H.264
- VP6
- SorensonSpark
- Screen Shared codec

Audio

- AAC - AAC, AAC Low Complexity (AAC LC), High Efficiency AAC v1 and v2 (HE-AAC)
- MP3
- Speex
- NellyMoser ASAO.

The Adobe Flash player is a cross-browser, cross-platform technology that exists on many personal computing and mobile devices. The Adobe Flash plugin runs SWF files that are generated by Flash authoring tools such as the Adobe Flash authoring tool and Adobe Flex. ActionScript is the most common Flash programming language. Using ActionScript, a SWF file can be programmed to do many things within a web page including playing streaming media. Wowza Server and the Flash player communicate using an NetConnection object and media is streamed using a NetStream object.

The NetConnection.connect method is used to establish a connection between Wowza Server and the Flash player. The NetConnection.connect method takes an RTMP URL in the following form:
[protocol-method]://[wowza-address]/[application]/[application-instance]
where:

[protocol-method] | rtmp, rtmpe (encryption), rtmpt (tunneling), rtmpte (encryption and tunneling) or rtmps (tunneling over ssl)
[wowza-address] | IP address or domain name and port of server running Wowza Server (default port 1935)
[application] | Application name
[application-instance] | Application instance name (if omitted defaults to _definst_)

For example, to connect to a Wowza Media Server 2 at the address mycompany.com using the application name myapplication, the URL to use in the NetConnection.connect method is:
rtmp://mycompany.com/myapplication

The NetStream.play method is used to start streaming. It takes as its first argument a stream name. For example, to play the media file mycoolvideo.mov you would use the stream name mp4:mycoolvideo.mov. Some pre-built player combine the server connection URL used in the NetConnection.connect method and the stream name used in the NetStream.play method into a single URL. This URL takes the form:

[protocol-method]://[wowza-address]/[application]/[application-instance]/[stream-name]
For example to connect to a Wowza Server at the address mycompany.com, using the application name myapplication to play the video on demand file named mycoolvideo.mov the URL is:
rtmp://mycompany.com/myapplication/mp4:mycoolvideo.mov

For more details regarding Flash streaming including secure streaming using SecureToken and RTMPE and multi-bitrate streaming, see the User's Guide.

###

### Apple HTTP Live Streaming (Cupertino Streaming - iPhone, iPod touch)

Wowza Media Server 2 can stream multi-bitrate live and video on demand H.264, AAC and MP3 content to the iPhone, iPod touch, and specific versions of QuickTime player and the Safari browser using the Apple HTTP Live Streaming protocol. Apple HTTP Live Streaming is a chunked based streaming protocol that uses HTTP for delivery. All media chunking and packaging necessary to deliver a stream using this protocol is performed by Wowza Server. Apple HTTP Live Streaming is referred to in the Wowza Server documentation and configuration files as Cupertino Streaming.

Cupertino streaming leverages a playlist wrapper to describe the list of chunks available for streaming. A Cupertino streaming playlist URL has the following form:
http://[wowza-address]/[application]/[application-instance]/[stream-name]/playlist.m3u8

where:

[wowza-address] | IP address or domain name and port of server running Wowza Server (default port 1935)
[application] | Application name
[application-instance] | Application instance name (if omitted defaults to _definst_)
[stream-name] | stream name with stream prefix

For example, to play the video on demand file located on the Wowza Media Server 2 at the address mycompany.com, using the application name myapplication with the file name mycoolvideo.mov the URL is:
http://mycompany.com:1935/myapplication/mp4:mycoolvideo.mov/playlist.m3u8
The iPhone and iPod touch support the following video and audio formats:

Video

- H.264 (Baseline profiile level 3.0 or below)

Audio

- AAC, AAC Low Complexity (AAC LC), High Efficiency AAC v1 (HE-AAC)
- MP3

The iPhone and iPod touch do not support a combination of H.264 video and MP3 audio in the same stream. The iPhone and iPod touch do not support High Efficiency AAC v2.

For more details regarding Cupertino streaming including secure streaming using AES-128 encryption and multi-bitrate streaming, see the User's Guide.

###

### Smooth Streaming (Microsoft Silverlight)

Wowza Media Server 2 can stream multi-bitrate live and video on demand H.264, AAC and MP3 content to the Microsoft Silverlight player using the Smooth Streaming protocol. Smooth Streaming is a chunked-based streaming protocol that uses HTTP for delivery. All media chunking and packaging necessary to deliver a stream using this protocol is performed by Wowza Server. Microsoft Silverlight is cross-browser, cross-platform technology that exists on many personal computing devices.

Smooth Streaming leverages a playlist wrapper called the Manifest to describe the list of chunks available for streaming. A Smooth Streaming Manifest URL has the following form:
http://[wowza-address]/[application]/[application-instance]/[stream-name]/Manifest

where:

[wowza-address] | IP address or domain name and port of server running Wowza Server (default port 1935)
[application] | Application name
[application-instance] | Application instance name (if omitted defaults to _definst_)
[stream-name] | stream name with stream prefix

For example, to play the video on demand file located on the Wowza Media Server 2 at the address mycompany.com, using the application name myapplication with the file name mycoolvideo.mov the URL is:
http://mycompany.com:1935/myapplication/mp4:mycoolvideo.mov/Manifest

The Silverlight player in combination with Wowza Server supports the following video and audio formats:

Video

- H.264

Audio

- AAC - AAC, AAC Low Complexity (AAC LC), High Efficiency AAC v1 and v2 (HE-AAC)
- MP3

For more details regarding Smooth Streaming including multi-bitrate streaming, see the User's Guide.

###

### RTSP/RTP/MPEG-TS (QuickTime, VLC, mobile devices, set top boxes, encoders)

Wowza Media Server 2 can stream live H.264, AAC and MP3 content to players and devices that support the Real Time Streaming Protocol (RTSP), Real-time Transport Protocol (RTP) and MPEG2 Transport Stream protocol (MPEG-TS). This includes players and devices such as QuickTime Player, VideoLAN VLC player, set top boxes and mobile devices. Wowza Server can also accept incoming streams from encoding devices that use these same protocols. Wowza Server supports RTP and MPEG-TS in and out over UDP as well as Multicast. In addition, Wowza Server supports interleaved RTSP/RTP (which is where the RTP portion of the stream flows over the RTSP TCP connection) which enables RTSP/RTP to be delivered in network environment that do not allow UDP transmission.

An RTSP/RTP URL in Wowza Server has the following form:
rtsp://[wowza-address]/[application]/[application-instance]/[stream-name]

where:

[wowza-address] | IP address or domain name and port of server running Wowza Server (default port 1935)
[application] | Application name
[application-instance] | Application instance name (if omitted defaults to _definst_)
[stream-name] | Stream name with stream prefix

For example, to play the live stream located on the the Wowza Media Server 2 at the address mycompany.com, using the application name myapplication with the stream name mylivestream the URL is:
rtsp://mycompany.com:1935/myapplication/mylivestream

For more details regarding Real Time Streaming Protocol streaming including support for RTSP/RTP/MPEG-TS encoders, see the User's Guide.

## Installation and Configuration

###

### Installing the Server

Windows | Double click WowzaMediaServer-2.0.0.exe and follow the instructions on the screen.
Mac OSX | Double click WowzaMediaServer-2.0.0.dmg and follow the instructions on the screen.
Red Hat Package Manager (RPM) | Open a command shell and enter the commands: sudo chmod +x WowzaMediaServer-2.0.0.rpm.bin sudo ./WowzaMediaServer-2.0.0.rpm.bin
Debian Package Manager (DEB) | Open a command shell and enter the commands: sudo chmod +x WowzaMediaServer-2.0.0.deb.bin sudo ./WowzaMediaServer-2.0.0.deb.bin
TAR Installer (TAR) | Open a command shell and enter the commands: sudo chmod +x WowzaMediaServer-2.0.0.tar.bin sudo ./WowzaMediaServer-2.0.0.tar.bin

Note: For all platforms other than Windows, the Wowza Server server must first be started in standalone mode. The first time the server is started in standalone mode you will be asked to enter the serial number. After the serial number is successfully entered, the server can run as a system service.

###

### Starting and Stopping the Server (Standalone)

Windows | Method1: Select: Start Menu->Programs->Wowza Media Server [version]->Wowza 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 [version]/Wowza Startup Method2: Run the Terminal application and enter the commands: cd /Library/WowzaMediaServer/bin ./startup.sh
Linux | Open a command shell and enter the commands: cd /usr/local/WowzaMediaServer/bin ./startup.sh

### Starting and Stopping the Server (System Service)

Windows | To start select: Start Menu->Settings->Control Panel->Administrative Tools->Services Double-click the Wowza Media Server entry, set startup type to Automatic and click the Start button. To stop select: Start Menu->Settings->Control Panel->Administrative Tools->Services Right-click the Wowza Media Server entry and select Stop.
Mac OSX | Run the Terminal application and enter the command: To start: sudo launchctl load -w /Library/LaunchDaemons/com.wowza.WowzaMediaServer.plist To stop: sudo launchctl unload -w /Library/LaunchDaemons/com.wowza.WowzaMediaServer.plist
Linux | To start a service (commands for Linux differ by Linux distro): service WowzaMediaServer start or /etc/init.d/WowzaMediaServer start or /sbin/service WowzaMediaServer start To stop a service (commands for Linux differ by Linux distro): service WowzaMediaServer stop or /etc/init.d/WowzaMediaServer stop or /sbin/service WowzaMediaServer stop To setup the service to start on reboot (Fedora and RedHat): chkconfig --level 345 WowzaMediaServer on Note: Consult your Linux distro documentation if your platform does not support chkconfig

### Port Used for Streaming

The following ports are used by default by Wowza Media Server 2 for streaming. You will need to open up these ports on your firewall to enable streaming.

TCP 1935 | RTMP (all variants), RTSP, Smooth and Cupertino Streaming
UDP 6970-9999 | RTP UDP Streaming
TCP 8084-8085 | JMX/JConsole Monitoring and Administration
TCP 8086 | HTTP Administration

Note: Wowza Server by default binds to TCP port 1935 for all forms of streaming. To configure other ports for streaming, see the next section.

### How to open additional ports for streaming

To open additional ports for streaming, edit [install-dir]/conf/VHost.xml and add additional port numbers to the HostPortList/HostPort/Port comma separated list of ports. Be sure there are no applications or server software running on your server that also use the ports you wish to open. Below are the common ports used for the Wowza Server streaming protocols:

TCP 80 | RTMPT, Smooth Streaming, Cupertino Streaming
TCP 443 | RTMPS
TCP 554 | RTSP

Note: Wowza Server cannot share the same TCP ports with other applications.

### How to verify Wowza Server is running

You can verify Wowza Media Server 2 is running by connecting to it using a a web browser. To do this, open a web browser and enter the following URL:

http://[wowza-ip-address]:1935

Where [wowza-ip-address] is the ip address of the server running Wowza Media Server 2. It should return the Wowza Server version number. If not, check to be sure the server is running and TCP port 1935 is open on your router, firewall and/or software firewall (iptables on Linux).

### Installing Examples

Windows | Select: Start Menu->Programs->Wowza Media Server [version]->Examples double-click installall.bat
Mac OSX | Open folder: /Library/WowzaMediaServer/example double-click installall.command
Linux | Open a command shell and enter the commands: cd /usr/local/WowzaMediaServer/examples ./installall.sh

Note: See the README.html at the root of each example folder for detailed information.

### Entering a New 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.

## Tutorials

### How to play a video on demand file

Below are the steps to set up an applcation named vod to stream video on demand content to the Adobe Flash player, the Microsoft Silverlight player and the Apple iPhone or iPod touch. For this tutorial we will use the Extremists.m4v sample video file that is located in the [install-dir]/content folder:

1. Create application folder [install-dir]/applications/vod
2. Create configuration folder [install-dir]/conf/vod and copy [install-dir]/conf/Application.xml into this new folder
3. Edit the newly copied Application.xml file and make the following changes (some of these settings may already be present):

1. Set the Streams/StreamType property to: default
2. Set the HTTPStreamers property to: cupertinostreaming,smoothstreaming
3. Add the following property to the application level <Properties> container at the bottom of the Application.xml file (be sure to get the correct <Properties> container - there are several in the Application.xml file)
   `<Property>
   <Name>smoothStreamingMediaMajorVersion</Name>
   <Value>2</Value>
   <Type>Integer</Type>
   </Property>`

4. Smooth Streaming only: Using a text editor create the file [install-dir]/conf/clientaccesspolicy.xml with the following content (For more information see the article Network Security Access Restrictions in Silverlight):
   `
   <?xml version="1.0" encoding="utf-8"?>
   <access-policy>
   <cross-domain-access>
   <policy>
   <allow-from http-request-headers="*">
   <domain uri="*"/>
   </allow-from>
   <grant-to>
   <resource path="/" include-subpaths="true"/>
   </grant-to>
   </policy>
   </cross-domain-access>
   </access-policy>
   `
5. Start Wowza Media Server 2

To play using Adobe Flash player:
Double-click [install-dir]/examples/SimpleVideoStreaming/client/simplevideostreaming.html, enter the information below and click the Play button.
Server: rtmp://[wowza-address]/vod
Stream: mp4:Extremists.m4v
To play using iPhone or iPod touch:
Enter the following URL into the Safari web browser:
http://[wowza-address]:1935/vod/mp4:Extremists.m4v/playlist.m3u8
To play using Microsoft Silverlight:
Copy the contents of the [install-dir]/examples/SimpleVideoStreaming/clientSilverlight folder to a web server. Using a text editor, edit the Default.html file you just copied and change the MediaSource URL (line 254) to:
http://[wowza-address]:1935/vod/mp4:Extremists.m4v/Manifest
Next, open a web browser and enter the URL that loads the Default.html file and the video will begin to play.
Note: [wowza-address] is the IP address or domain name of the server running Wowza Server.
Note: To play your own content, copy it into the [install-dir]/content folder and substitute it's file name for the Extremists.m4v file name above.
For more detailed information and instructions for mult-bitrate streaming see:

- Forums: How to play a video on demand file

See also:

- Example: [install-dir]/examples/SimpleVideoStreaming
- Forums: Using the Flash FLVPlayback component
- Forums: Using JW Player
- Forums: Using FlowPlayer
- Forums: MediaSecurity AddOn Package
- Forums: GeoIP Locking Module
- Forums: Dynamic Load Balancing
- Forums: Dynamic Bandwidth Detection (BWCheck)

### How to publish and play a live stream (RTMP or RSTP/RTP based encoder)

Below are the steps to set up an applcation named live to stream live content to the Adobe Flash player, the Microsoft Silverlight player, the Apple iPhone or iPod touch and RTSP/RTP based players. This tutorial provides the basic steps for using RTMP or RTSP/RTP based live encoders such as; Telestream Wirecast, Apple QuickTime Broadcaster...:

1. Create application folder [install-dir]/applications/live
2. Create configuration folder [install-dir]/conf/live and copy [install-dir]/conf/Application.xml into this new folder
3. Edit the newly copied Application.xml file and make the following changes (some of these settings may already be present):

1. Set the Streams/StreamType property to: live
2. Set the HTTPStreamers property to: cupertinostreaming,smoothstreaming
3. Set the LiveStreamPacketizers property to: cupertinostreamingpacketizer,smoothstreamingpacketizer
4. Add the following property to the application level <Properties> container at the bottom of the Application.xml file (be sure to get the correct <Properties> container - there are several in the Application.xml file)
   `<Property>
   <Name>smoothStreamingMediaMajorVersion</Name>
   <Value>2</Value>
   <Type>Integer</Type>
   </Property>
   `
5. ``Set the RTP/Authentication/PlayMethod to: none
6. RTSP/RTP encoder only: Set the RTP/Authentication/PublishMethod to: none

4. Smooth Streaming only: Using a text editor create the file [install-dir]/conf/clientaccesspolicy.xml with the following content (For more information see the article Network Security Access Restrictions in Silverlight):
   `
   <?xml version="1.0" encoding="utf-8"?>
   <access-policy>
   <cross-domain-access>
   <policy>
   <allow-from http-request-headers="*">
   <domain uri="*"/>
   </allow-from>
   <grant-to>
   <resource path="/" include-subpaths="true"/>
   </grant-to>
   </policy>
   </cross-domain-access>
   </access-policy>
   `
5. Start Wowza Media Server 2

To publish using RTMP based encoder:
Enter the Server URL and Stream Name information below and click the Publish or Start button on the encoder:
Server URL: rtmp://[wowza-address]/live
Stream Name: myStream.sdp
Note: These are generic instructions. Consult the Live Encoders forum section or your encoder's documentation for more detailed instructions.
To publish using RTSP/RTP based encoder:
Enter the Host Address and Stream Name information below and click the Publish or Start button on the encoder:
Host Address: [wowza-address]:1935
Stream Name: live/myStream.sdp
Note: These are generic instructions. Consult the Live Encoders forum section or your encoder's documentation for more detailed instructions.
To play using Adobe Flash player:
Double-click [install-dir]/examples/LiveVideoStreaming/client/live.html, enter the information below and click the Play button.
Server: rtmp://[wowza-address]/live
Stream: myStream.sdp
To play using iPhone or iPod touch:
Enter the following URL into the Safari web browser:
http://[wowza-address]:1935/live/myStream.sdp/playlist.m3u8
To play using Microsoft Silverlight:

1. Download the Smooth Streaming player from here: IIS_Smooth_Streaming_Player_Development_Kit_1.0_Beta_2.exe
2. Double click IIS_Smooth_Streaming_Player_Development_Kit_1.0_Beta_2.exe to extract the player
3. Edit Default.html and change the mediaSource property (line 85) to:

http://[wowza-address]:1935/live/myStream.sdp/Manifest
Double click Default.html and the video will begin to play.
To play using RTSP/RTP player or device:
Enter the following URL into the RTSP/RTP player:
rtsp://[wowza-address]:1935/live/myStream.sdp
Note: [wowza-address] is the IP address or domain name of the server running Wowza Server.
Note: The .sdp file extension on the stream name is not required. Some RTSP/RTP encoders do append this extension on to the stream name. To simplify the instructions, we have included the extension. If your encoder does not require the extension, you can remove it. Just be sure to also remove it from the stream name portion of the URL.
For more detailed information and instructions for mult-bitrate streaming see:

- Forums: How to publish and play a live stream (RTMP or RSTP/RTP based encoder)

See also:

- Example: [install-dir]/examples/Live VideoStreaming
- Forums: Live Encoders
- Forums: Troubleshooting live streaming issues
- Forums: Using the Flash FLVPlayback component
- Forums: Using JW Player
- Forums: Using FlowPlayer
- Forums: MediaSecurity AddOn Package
- Forums: GeoIP Locking Module
- Forums: Dynamic Load Balancing
- Forums: Live Stream Record
- Forums: Dynamic Bandwidth Detection (BWCheck)

### How to publish and play a live stream (MPEG-TS based encoder)

#### Adobe Flash player only

Below are the steps to setup an application named rtplive to stream live content to the Adobe Flash player. This tutorial provides the basic steps for using a live encoder that publishes a stream using the MPEG2 Transport Stream protocol (MPEG-TS). These simplified steps leverage a featured built into Wowza Server that will only work with the Adobe Flash player. To stream to the Adobe Flash player along with the Microsoft Silverlight player, the Apple iPhone or iPod touch and RTSP/RTP based players see the All Player Technologies section below.

1. Create application folder [install-dir]/applications/rtplive
2. Create configuration folder [install-dir]/conf/rtplive and copy [install-dir]/conf/Application.xml into this new folder
3. Edit the newly copied Application.xml file and make the following changes (some of these settings may already be present):

1. Set the Streams/StreamType property to: rtp-live

4. Using a text editor create the file [install-dir]/content/mpegts.stream set the contents of this file to udp://0.0.0.0:10000
5. Start Wowza Media Server 2
6. Configure the MPEG-TS based encoder to send a live to the IP address of the server running Wowza Server using port 10000

To play using Adobe Flash player:
Double-click [install-dir]/examples/LiveVideoStreaming/client/live.html, enter the information below and click the Play button.
Server: rtmp://[wowza-address]/rtplive
Stream: mpegts.stream

#### All Player Technologies

Below are the steps to set up an applcation named rtplive to stream live content to the Adobe Flash player, the Microsoft Silverlight player, the Apple iPhone or iPod touch and RTSP/RTP based players. This tutorial provides the basic steps for using a live encoder that publishes a stream using the MPEG2 Transport Stream protocol (MPEG-TS).

1. Create application folder [install-dir]/applications/rtplive
2. Create configuration folder [install-dir]/conf/rtplive and copy [install-dir]/conf/Application.xml into this new folder
3. Edit the newly copied Application.xml file and make the following changes (some of these settings may already be present):

1. Set the Streams/StreamType property to: live
2. Set the HTTPStreamers property to: cupertinostreaming,smoothstreaming
3. Set the LiveStreamPacketizers property to: cupertinostreamingpacketizer,smoothstreamingpacketizer
4. Add the following property to the application level <Properties> container at the bottom of the Application.xml file (be sure to get the correct <Properties> container - there are several in the Application.xml file)
   `<Property>
   <Name>smoothStreamingMediaMajorVersion</Name>
   <Value>2</Value>
   <Type>Integer</Type>
   </Property>
   `
5. ``Set the RTP/Authentication/PlayMethod to: none

4. Using a text editor create the file [install-dir]/content/mpegts.stream set the contents of this file to udp://0.0.0.0:10000
5. Smooth Streaming only: Using a text editor create the file [install-dir]/conf/clientaccesspolicy.xml with the following content (For more information see the article Network Security Access Restrictions in Silverlight):
   `
   <?xml version="1.0" encoding="utf-8"?>
   <access-policy>
   <cross-domain-access>
   <policy>
   <allow-from http-request-headers="*">
   <domain uri="*"/>
   </allow-from>
   <grant-to>
   <resource path="/" include-subpaths="true"/>
   </grant-to>
   </policy>
   </cross-domain-access>
   </access-policy>
   `
6. Using a text editor, edit the file [install-dir]/conf/admin.password and add a username and password that will be used to start and stop the publishing of the MPEG-TS stream (below is an example of the file with the username myuser and password mypassword):
   `# Admin password file (format [username][space][password])
   # username password
   myuser mypassword
   `
7. Start Wowza Media Server 2
8. Configure the MPEG-TS based encoder to send a live to the IP address of the server running Wowza Server using port 10000
9. Use the Stream Manager to start the MPEG-TS stream

1. Open a web browser and enter the url: http://[wowza-address]:8086/streammanager
2. Enter your admin username and password from above
3. Click the [start-receiving-stream] link just below the rtplive application folder
4. Select the MediaCaster Type: rtp
5. Enter mpegts.stream into the Stream Name field
6. Click OK

To publish a stream from the encoder:
Consult your encoder's documentation. Send the stream to the IP address of the server running Wowza Server and the port 10000.
To play using Adobe Flash player:
Double-click [install-dir]/examples/LiveVideoStreaming/client/live.html, enter the information below and click the Play button.
Server: rtmp://[wowza-address]/rtplive
Stream: mpegts.stream
To play using iPhone or iPod touch:
Enter the following URL into the Safari web browser:
http://[wowza-address]:1935/rtplive/mpegts.stream/playlist.m3u8
To play using Microsoft Silverlight:

1. Download the Smooth Streaming player from here: IIS_Smooth_Streaming_Player_Development_Kit_1.0_Beta_2.exe
2. Double click IIS_Smooth_Streaming_Player_Development_Kit_1.0_Beta_2.exe to extract the player
3. Edit Default.html and change the mediaSource property (line 85) to:

http://[wowza-address]:1935/rtplive/mpegts.stream/Manifest
Double click Default.html and the video will begin to play.
To play using RTSP/RTP player or device:
Enter the following URL into the RTSP/RTP player:
rtsp://[wowza-address]:1935/rtplive/mpegts.stream
Note: [wowza-address] is the IP address or domain name of the server running Wowza Server.
For more detailed information and instructions for mult-bitrate streaming see:

- Forums: How to publish and play a live stream (MPEG-TS)

See also:

- Example: [install-dir]/examples/Live VideoStreaming
- Forums: Live Encoders
- Forums: Using an MPEG2 Transport Stream encoder
- Forums: Troubleshooting live streaming issues
- Forums: Using the Flash FLVPlayback component
- Forums: Using JW Player
- Forums: Using FlowPlayer
- Forums: MediaSecurity AddOn Package
- Forums: GeoIP Locking Module
- Forums: Dynamic Load Balancing
- Forums: Live Stream Record
- Forums: Dynamic Bandwidth Detection (BWCheck)

### How to publish and play a live stream (native RTP encoder with SDP file)

#### Adobe Flash player only

Below are the steps to setup an application named rtplive to stream live content to the Adobe Flash player. This tutorial provides the basic steps for using a live encoder that publishes a stream using the Real-time Transport Protocol (native RTP) with Session Description Protocol (SDP) files. These simplified steps leverage a featured built into Wowza Media Server 2 that will only work with the Adobe Flash player. To stream to the Adobe Flash player along withthe Microsoft Silverlight player, the Apple iPhone or iPod touch and RTSP/RTP based players see the All Player Technologies section below.

1. Create application folder [install-dir]/applications/rtplive
2. Create configuration folder [install-dir]/conf/rtplive and copy [install-dir]/conf/Application.xml into this new folder
3. Edit the newly copied Application.xml file and make the following changes (some of these settings may already be present):

1. Set the Streams/StreamType property to: rtp-live

4. Start Wowza Media Server 2
5. Consult your encoder's documentation and configure an outgoing stream and send it to the IP address of the server running Wowza Server. From the encoder software or interface generate an SDP file that describes the stream. Give it the name myStream.sdp and copy it to the [install-dir]/content folder.

To play using Adobe Flash player:
Double-click [install-dir]/examples/LiveVideoStreaming/client/live.html, enter the information below and click the Play button.
Server: rtmp://[wowza-address]/rtplive
Stream: myStream.sdp

#### All Player Technologies

Below are the steps to set up an applcation named rtplive to stream live content to the Adobe Flash player, the Microsoft Silverlight player, the Apple iPhone or iPod touch and RTSP/RTP based players. This tutorial provides the basic steps for using a live encoder that publishes a stream using the Real-time Transport Protocol (native RTP) with Session Description Protocol (SDP) files.

1. Create application folder [install-dir]/applications/rtplive
2. Create configuration folder [install-dir]/conf/rtplive and copy [install-dir]/conf/Application.xml into this new folder
3. Edit the newly copied Application.xml file and make the following changes (some of these settings may already be present):

1. Set the Streams/StreamType property to: live
2. Set the HTTPStreamers property to: cupertinostreaming,smoothstreaming
3. Set the LiveStreamPacketizers property to: cupertinostreamingpacketizer,smoothstreamingpacketizer
4. Add the following property to the application level <Properties> container at the bottom of the Application.xml file (be sure to get the correct <Properties> container - there are several in the Application.xml file)
   `<Property>
   <Name>smoothStreamingMediaMajorVersion</Name>
   <Value>2</Value>
   <Type>Integer</Type>
   </Property>
   `
5. ``Set the RTP/Authentication/PlayMethod to: none

4. Smooth Streaming only: Using a text editor create the file [install-dir]/conf/clientaccesspolicy.xml with the following content (For more information see the article Network Security Access Restrictions in Silverlight):
   `
   <?xml version="1.0" encoding="utf-8"?>
   <access-policy>
   <cross-domain-access>
   <policy>
   <allow-from http-request-headers="*">
   <domain uri="*"/>
   </allow-from>
   <grant-to>
   <resource path="/" include-subpaths="true"/>
   </grant-to>
   </policy>
   </cross-domain-access>
   </access-policy>
   `
5. Using a text editor, edit the file [install-dir]/conf/admin.password and add a username and password that will be used to start and stop the publishing of the camera (below is an example of the file with the username myuser and password mypassword):
   `# Admin password file (format [username][space][password])
   # username password
   myuser mypassword
   `
6. Start Wowza Media Server 2
7. Consult your encoder's documentation and onfigure an outgoing stream and send it to the IP address of the server running Wowza Server. From the encoder software or interface generate an SDP file that describes the stream. Give it the name myStream.sdp and copy it to the [install-dir]/content folder.
8. Use the Stream Manager to start the stream

1. Open a web browser and enter the url: http://[wowza-address]:8086/streammanager
2. Enter your admin username and password from above
3. Click the [start-stream] link just below the rtplive application folder
4. Select the MediaCaster Type: rtp
5. Enter myStream.sdp into the Stream Name field
6. Click OK

To play using Adobe Flash player:
Double-click [install-dir]/examples/LiveVideoStreaming/client/live.html, enter the information below and click the Play button.
Server: rtmp://[wowza-address]/rtplive
Stream: myStream.sdp
To play using iPhone or iPod touch:
Enter the following URL into the Safari web browser:
http://[wowza-address]:1935/rtplive/myStream.sdp/playlist.m3u8
To play using Microsoft Silverlight:

1. Download the Smooth Streaming player from here: IIS_Smooth_Streaming_Player_Development_Kit_1.0_Beta_2.exe
2. Double click IIS_Smooth_Streaming_Player_Development_Kit_1.0_Beta_2.exe to extract the player
3. Edit Default.html and change the mediaSource property (line 85) to:

http://[wowza-address]:1935/rtplive/myStream.sdp/Manifest
Double click Default.html and the video will begin to play.
To play using RTSP/RTP player or device:
Enter the following URL into the RTSP/RTP player:
rtsp://[wowza-address]:1935/rtplive/myStream.sdp
Note: [wowza-address] is the IP address or domain name of the server running Wowza Server.
For more detailed information and instructions for mult-bitrate streaming see:

- Forums: How to publish and play a live stream (native RTP encoder with SDP file)

See also:

- Example: [install-dir]/examples/Live VideoStreaming
- Forums: Live Encoders
- Forums: Using a native RTP encoder
- Forums: Troubleshooting live streaming issues
- Forums: Using the Flash FLVPlayback component
- Forums: Using JW Player
- Forums: Using FlowPlayer
- Forums: MediaSecurity AddOn Package
- Forums: GeoIP Locking Module
- Forums: Dynamic Load Balancing
- Forums: Live Stream Record
- Forums: Dynamic Bandwidth Detection (BWCheck)

### How to re-stream video from an IP camera

#### Adobe Flash player only

Below are the steps to setup an application named rtplive to stream live content to the Adobe Flash player. This tutorial provides the basic steps for re-streaming an IP camera that supports H.264 and AAC through Wowza Media Server 2 for delivery to the listed player technologies. These simplified steps leverage a featured built into Wowza Server that will only work with the Adobe Flash player. To stream to the Adobe Flash player along withthe Microsoft Silverlight player, the Apple iPhone or iPod touch and RTSP/RTP based players see the All Player Technologies section below.

1. Create application folder [install-dir]/applications/rtplive
2. Create configuration folder [install-dir]/conf/rtplive and copy [install-dir]/conf/Application.xml into this new folder
3. Edit the newly copied Application.xml file and make the following changes (some of these settings may already be present):

1. Set the Streams/StreamType property to: rtp-live
2. Add the following property to the MediaCaster/Properties container (be sure to get the correct <Properties> container):
   `<Property>
   <Name>forceInterleaved</Name>
   <Value>true</Value>
   <Type>Boolean</Type>
   </Property>
   `

4. Using a text editor create the file [install-dir]/content/camera.stream set the contents of this file to the full RTSP/RTP URL to camera
5. Start Wowza Media Server 2

To play using Adobe Flash player:
Double-click [install-dir]/examples/LiveVideoStreaming/client/live.html, enter the information below and click the Play button.
Server: rtmp://[wowza-address]/rtplive
Stream: camera.stream

#### All Player Technologies

Below are the steps to set up an applcation named rtplive to stream live content to the Adobe Flash player, the Microsoft Silverlight player, the Apple iPhone or iPod touch and RTSP/RTP based players. This tutorial provides the basic steps for re-streaming an IP camera that supports H.264 and AAC through Wowza Server for delivery to the listed player technologies.

1. Create application folder [install-dir]/applications/rtplive
2. Create configuration folder [install-dir]/conf/rtplive and copy [install-dir]/conf/Application.xml into this new folder
3. Edit the newly copied Application.xml file and make the following changes (some of these settings may already be present):

1. Set the Streams/StreamType property to: live
2. Set the HTTPStreamers property to: cupertinostreaming,smoothstreaming
3. Set the LiveStreamPacketizers property to: cupertinostreamingpacketizer,smoothstreamingpacketizer
4. Add the following property to the application level <Properties> container at the bottom of the Application.xml file (be sure to get the correct <Properties> container - there are several in the Application.xml file)
   `<Property>
   <Name>smoothStreamingMediaMajorVersion</Name>
   <Value>2</Value>
   <Type>Integer</Type>
   </Property>
   `
5. ``Set the RTP/Authentication/PlayMethod to: none
6. Add the following property to the MediaCaster/Properties container (be sure to get the correct <Properties> container):
   `<Property>
   <Name>forceInterleaved</Name>
   <Value>true</Value>
   <Type>Boolean</Type>
   </Property>
   `

4. Using a text editor create the file [install-dir]/content/camera.stream set the contents of this file to the full RTSP/RTP URL to camera
5. Smooth Streaming only: Using a text editor create the file [install-dir]/conf/clientaccesspolicy.xml with the following content (For more information see the article Network Security Access Restrictions in Silverlight):
   `
   <?xml version="1.0" encoding="utf-8"?>
   <access-policy>
   <cross-domain-access>
   <policy>
   <allow-from http-request-headers="*">
   <domain uri="*"/>
   </allow-from>
   <grant-to>
   <resource path="/" include-subpaths="true"/>
   </grant-to>
   </policy>
   </cross-domain-access>
   </access-policy>
   `
6. Using a text editor, edit the file [install-dir]/conf/admin.password and add a username and password that will be used to start and stop the publishing of the camera (below is an example of the file with the username myuser and password mypassword):
   `# Admin password file (format [username][space][password])
   # username password
   myuser mypassword
   `
7. Start Wowza Media Server 2
8. Use the Stream Manager to start the IP camera stream

1. Open a web browser and enter the url: http://[wowza-address]:8086/streammanager
2. Enter your admin username and password from above
3. Click the [start-stream] link just below the rtplive application folder
4. Select the MediaCaster Type: rtp
5. Enter camera.stream into the Stream Name field
6. Click OK

To play using Adobe Flash player:
Double-click [install-dir]/examples/LiveVideoStreaming/client/live.html, enter the information below and click the Play button.
Server: rtmp://[wowza-address]/rtplive
Stream: camera.stream
To play using iPhone or iPod touch:
Enter the following URL into the Safari web browser:
http://[wowza-address]:1935/rtplive/camera.stream/playlist.m3u8
To play using Microsoft Silverlight:

1. Download the Smooth Streaming player from here: IIS_Smooth_Streaming_Player_Development_Kit_1.0_Beta_2.exe
2. Double click IIS_Smooth_Streaming_Player_Development_Kit_1.0_Beta_2.exe to extract the player
3. Edit Default.html and change the mediaSource property (line 85) to:

http://[wowza-address]:1935/rtplive/camera.stream/Manifest
Double click Default.html and the video will begin to play.
To play using RTSP/RTP player or device:
Enter the following URL into the RTSP/RTP player:
rtsp://[wowza-address]:1935/rtplive/camera.stream
Note: [wowza-address] is the IP address or domain name of the server running Wowza Server.
For more detailed information see:

- Forums: How to re-stream video from an IP camera

See also:

- Example: [install-dir]/examples/Live VideoStreaming
- Forums: Live Encoders
- Forums: Re-streaming an RTSP/RTP stream
- Forums: Troubleshooting live streaming issues
- Forums: Using the Flash FLVPlayback component
- Forums: Using JW Player
- Forums: Using FlowPlayer
- Forums: MediaSecurity AddOn Package
- Forums: GeoIP Locking Module
- Forums: Dynamic Load Balancing
- Forums: Live Stream Record
- Forums: Dynamic Bandwidth Detection (BWCheck)

### How to re-stream audio from SHOUTcast/Icecast

#### Adobe Flash player only

Below are the steps to setup an application named shoutcast to stream live content to the Adobe Flash player. This tutorial provides the basic steps for re-streaming a SHOUTcast or Icecast stream through Wowza Media Server 2 for delivery to the listed player technologies. These simplified steps leverage a featured built into Wowza Server that will only work with the Adobe Flash player. To stream to the Adobe Flash player along with the Apple iPhone or iPod touch and RTSP/RTP based players see the All Player Technologies section below.

1. Create application folder [install-dir]/applications/shoutcast
2. Create configuration folder [install-dir]/conf/shoutcast and copy [install-dir]/conf/Application.xml into this new folder
3. Edit the newly copied Application.xml file and make the following changes (some of these settings may already be present):

1. Set the Streams/StreamType property to: shoutcast

4. Using a text editor create the file [install-dir]/content/radiostation.stream and set the contents of this file to the full HTTP URL to a SHOUTcast or Icecast stream (see Note below on the proper URL to use)
5. Start Wowza Media Server 2

To play using Adobe Flash player:
Double-click [install-dir]/examples/SHOUTcast/client/shoutcast.html, enter the information below and click the Play button.
Server: rtmp://[wowza-address]/shoutcast
Stream: radiostation.stream

#### All Player Technologies

Below are the steps to set up an applcation named shoutcast to stream live content to the Adobe Flash player, the Apple iPhone or iPod touch and RTSP/RTP based players. This tutorial provides the basic steps for re-streaming a SHOUTcast or Icecast stream through Wowza Server for delivery to the listed player technologies.

1. Create application folder [install-dir]/applications/shoutcast
2. Create configuration folder [install-dir]/conf/shoutcast and copy [install-dir]/conf/Application.xml into this new folder
3. Edit the newly copied Application.xml file and make the following changes (some of these settings may already be present):

1. Set the Streams/StreamType property to: live
2. Set the HTTPStreamers property to: cupertinostreaming
3. Set the LiveStreamPacketizers property to: cupertinostreamingpacketizer
4. Set the RTP/Authentication/PlayMethod to: none

4. Using a text editor create the file [install-dir]/content/radiostation.stream and set the contents of this file to the full HTTP URL to a SHOUTcast or Icecast stream (see Note below on the proper URL to use)
5. Using a text editor, edit the file [install-dir]/conf/admin.password and add a username and password that will be used to start and stop the publishing of the camera (below is an example of the file with the username myuser and password mypassword):
   `# Admin password file (format [username][space][password])
   # username password
   myuser mypassword
   `
6. Start Wowza Media Server 2
7. Use the Stream Manager to start the SHOUTcast/Icecast stream

1. Open a web browser and enter the url: http://[wowza-address]:8086/streammanager
2. Enter your admin username and password from above
3. Click the [start-stream] link just below the shoutcast application folder
4. Select the MediaCaster Type: shoutcast
5. Enter radiostation.stream into the Stream Name field
6. Click OK

To play using Adobe Flash player:
Double-click [install-dir]/examples/SHOUTcast/client/shoutcast.html, enter the information below and click the Play button.
Server: rtmp://[wowza-address]/shoutcast
Stream: radiostation.stream
To play using iPhone or iPod touch:
Enter the following URL into the Safari web browser:
http://[wowza-address]:1935/shoutcast/radiostation.stream/playlist.m3u8
To play using RTSP/RTP player or device:
Enter the following URL into the RTSP/RTP player:
rtsp://[wowza-address]:1935/shoutcast/radiostation.stream
Note: [wowza-address] is the IP address or domain name of the server running Wowza Server.
Note: The URL that is needed to connect to a SHOUTcast or Icecast server is one of the URLS that is contained within a .pls (SHOUTcast) or .m3u (icecast) playlist file. Most websites that publish SHOUTcast or Icecast streams present links on their sites that refer to these .pls and .m3u files. To re-stream a SHOUTcast or Icecast stream you must first download one of these playlist files to your local machine, open the file with a text editor and use one of the links found inside to connect to the published stream.
For more detailed information see:

- Forums: How to re-stream audio from SHOUTcast/Icecast

See also:

- Example: [install-dir]/examples/SHOUTcast
- Forums: Live Encoders
- Forums: Troubleshooting live streaming issues
- Forums: Using the Flash FLVPlayback component
- Forums: Using JW Player
- Forums: Using FlowPlayer
- Forums: MediaSecurity AddOn Package
- Forums: GeoIP Locking Module
- Forums: Dynamic Load Balancing
- Forums: Live Stream Record
- Forums: Dynamic Bandwidth Detection (BWCheck)

### How to setup video chat application

Below are the steps to setup an application named videochat that we will use to illustrate Wowza Server's video chat capabilities using the Adobe Flash player. This example requires two computers running Adobe Flash in a web browser each with a web camera.

1. Create application folder [install-dir]/applications/videochat
2. Create configuration folder [install-dir]/conf/videochat and copy [install-dir]/conf/Application.xml into this new folder
3. Edit the newly copied Application.xml file and make the following changes (some of these settings may already be present):

1. Set the Streams/StreamType property to: live-lowlatency

4. Start Wowza Media Server 2

On computer1:

1. Double-click [install-dir]/examples/VideoChat/client/videochat.html, enter the information below and click the Connect button.
   Server: rtmp://[wowza-address]/videochat
2. Enter the information below then click the Publish and Play button

Publish: computer1
Play: computer2

On computer2:

1. Double-click [install-dir]/examples/VideoChat/client/videochat.html, enter the information below and click the Connect button.
   Server: rtmp://[wowza-address]/videochat
2. Enter the information below then click the Publish and Play button

Publish: computer2
Play: computer1
For more detailed information see:

- Forums: How to setup video chat application

See also:

- Example: [install-dir]/examples/VideoChat
- Forums: Live Encoders
- Forums: Troubleshooting live streaming issues
- Forums: MediaSecurity AddOn Package
- Forums: Dynamic Bandwidth Detection (BWCheck)

### How to setup video recording application

Below are the steps to setup an application named videorecording that we will use to illustrate Wowza Server's video recording capabilities using the Adobe Flash player. This example requires a single computer running Adobe Flash in a web browser with a web camera.

1. Create application folder [install-dir]/applications/videorecording
2. Create configuration folder [install-dir]/conf/videorecording and copy [install-dir]/conf/Application.xml into this new folder
3. Edit the newly copied Application.xml file and make the following changes (some of these settings may already be present):

1. Set the Streams/StreamType property to: record

4. Start Wowza Media Server 2

On computer:

1. Double-click [install-dir]/examples/VideoRecordign/client/videorecording.html, enter the information below and click the Connect button.
   Server: rtmp://[wowza-address]/videorecording
2. Click the Record button, say something into the camera then hit the Stop button

For more detailed information see:

- Forums: How to setup video recording application

See also:

- Example: [install-dir]/examples/VideoRecording
- Forums: Live Encoders
- Forums: Troubleshooting live streaming issues
- Forums: MediaSecurity AddOn Package
- Forums: Dynamic Bandwidth Detection (BWCheck)

### How to stream and record a live video

To stream and record a live video at the same time, follow the instructions in the How to publish and play a live stream (RTMP or RSTP/RTP based encoder) tutorial above but in step #3.a set the Streams/StreamType property to live-record. The resulant file will be located in the [install-dir]/content folder. If you want more control over the recording process, see the LiveStreamRecord forum post.

See also:

- Forum: LiveStreamRecord

### How to develop server-side code

All of Wowza Server'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, Tuning and Troubleshooting

## Administration

### Logging

The Wowza Media Server 2 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 not be used in a production environment.

### Server Tuning

By default the Wowza Media Server 2 is tuned for development. It is very important to tune Wowza Server if it is to be used in a production environment. For up to date tuning instructions, see the following forum thread:
General Tuning Instructions

### Management and Monitoring (JConsole and JMX)

Wowza Media Server 2 uses Java Management Extensions (JMX) and JConsole for server management and monitoring. JMX is a protocol used for managing a Java-based server. JConsole is an application that ships with the Sun Java Developement Kit (JDK) that uses the JMX protocol to manage a Java-based server.

#### Enable JMX in Wowza Server

To enable the JMX interface we are going to modify the three highlighted settings below in the Server.xml configuration file. Open [install-dir]/conf/Server.xml and find these lines:

<Root>
<Server>
<JMXRemoteConfiguration>
<Enable>false</Enable>
<IpAddress>localhost</IpAddress>
<RMIServerHostName>localhost</RMIServerHostName>

Change the Enable setting to "true" and change IpAddress and RMIServerHostName to the IP address of the Wowza Server. If you are running Wowza Server locally leave it as "localhost", but if it is a remote server, change it that server's IP address. You can use a domain name.

<Root>
<Server>
<JMXRemoteConfiguration>
<Enable>true</Enable>
<IpAddress>[server-ip-address]</IpAddress>
<RMIServerHostName>[server-ip-address]</RMIServerHostName>

If this server is behind a NAT (Network Address Translation) then the IpAddress setting should be the internal IP address (or localhost) and use RMIServerHostName to set the external IP, as below:

<Root>
<Server>
<JMXRemoteConfiguration>
<Enable>true</Enable>
<IpAddress>[internal-ip-address]</IpAddress> <!-- set to localhost or internal ip address if behind NAT -->
<RMIServerHostName>[external-ip-address]</RMIServerHostName> <!-- set to external ip address or domain name if behind NAT -->

Restart Wowza, then open the access log ([install-dir]/logs/wowzamediaserver_access.log) and check the startup lines. Look for "JMX bind attempt" followed by a service url that looks like this:

service:jmx:rmi://localhost:8084/jndi/rmi://localhost:8085/jmxrmi
or:
service:jmx:rmi://[wowza-ip]:8084/jndi/rmi://[wowza-ip]:8085/jmxrmi

#### Connecting to Wowza Server Using JConsole

JConsole is included with the Sun JDK. Install the latest JDK, if you don't already have it, then find JConsole here: [java-install-dir]/bin/JConsole.exe
If Wowza is installed on your PC or Mac, you can start JConsole from the Wowza Menu group with the "JConsole Startup" item.

With JConsole open, click the Remote Process then copy the Service URL into the box and enter user name "admin" and password "admin". Then click Connect button.

When first connected you will see graphs for memory and cpu usage. Next click on MBean tab, then click the WowzaMediaServer node, which you can expand and drill down to all the attributes and operations available through JConsole and the JMX interface.

Copyright © 2006 - 2010 Wowza Media Systems, Inc. All rights reserved