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 |
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:
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.
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.
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 |
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) |
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.
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
Audio
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_) |
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.
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 |
Video
Audio
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.
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 |
The Silverlight player in combination with Wowza Server supports
the following video and audio formats:
Video
Audio
For more details regarding Smooth Streaming including multi-bitrate
streaming, see the
User's Guide.
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 more details regarding Real Time Streaming Protocol streaming
including support for RTSP/RTP/MPEG-TS encoders, see the
User's Guide.
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 |
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 |
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 |
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 |
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 |
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]:1935Where [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).
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 |
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.
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:
<Property>
<Name>smoothStreamingMediaMajorVersion</Name>
<Value>2</Value>
<Type>Integer</Type>
</Property>
<?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>
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...:
<Property>
<Name>smoothStreamingMediaMajorVersion</Name>
<Value>2</Value>
<Type>Integer</Type>
</Property>
Set the RTP/Authentication/PlayMethod
to: none
<?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>
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.
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).
<Property>
<Name>smoothStreamingMediaMajorVersion</Name>
<Value>2</Value>
<Type>Integer</Type>
</Property>
Set the RTP/Authentication/PlayMethod
to: none
<?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>
# Admin password file (format [username][space][password])
# username password
myuser mypassword
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.
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.
<Property>
<Name>smoothStreamingMediaMajorVersion</Name>
<Value>2</Value>
<Type>Integer</Type>
</Property>
Set the RTP/Authentication/PlayMethod
to: none
<?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>
# Admin password file (format [username][space][password])
# username password
myuser mypassword
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.
<Property>
<Name>forceInterleaved</Name>
<Value>true</Value>
<Type>Boolean</Type>
</Property>
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.
<Property>
<Name>smoothStreamingMediaMajorVersion</Name>
<Value>2</Value>
<Type>Integer</Type>
</Property>
Set the RTP/Authentication/PlayMethod
to: none<Property>
<Name>forceInterleaved</Name>
<Value>true</Value>
<Type>Boolean</Type>
</Property>
<?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>
# Admin password file (format [username][space][password])
# username password
myuser mypassword
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.
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.
# Admin password file (format [username][space][password])
# username password
myuser mypassword
On computer2:
For more detailed information see:
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:
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:
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.
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
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.
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>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.
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:
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
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.