
This document is a very short and quick tutorial to get you started
with Wowza Media Server 2 on Amazon EC2. 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
User's Guide, and the Wowza Server for Amazon EC2 User Guide.
For
more
up
to
date
information visit the online forums at: http://www.wowzamedia.com/forums.
Once
your EC2 server is running download
the Wowza examples here or download and install the Wowza Server Developer
edition which includes all of the examples and will allow you to
become familiar with the Wowza Media Server 2 on your local machine
before working with EC2.
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.
Installation path: On the EC2 Wowza Server there are symbolic links (which are similar to Windows Shortcuts) set up for the most commonly accessed directories. In this document we will refer to the symbolic link /home/wowza as the folder to which Wowza Media Server was installed whenever a valid symbolic link exists.
| Linux | /usr/local/WowzaMediaServer |
| Symbolic links from: |
/home/wowza/ |
One of the many advantages of running Wowza Media Server 2 for EC2
Edition is that there are several applications (eg: live broadcast,
Video on Demand, etc..) pre-configured. But for the sake of
illustrating how each application is configured by a user we'll first
describe how you would create a new application. An application is
defined simply by creating a folder in the /home/wowza/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 /home/wowza/conf folder:
/home/wowza/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 /home/wowza/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 /home/wowza/applications/[application] folder.
All configuration files for Wowza Server and its applications are in
the /home/wowza/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 /home/wowza/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.
You can also stream content from the Amazon S3 service. Instructions
for how to do so are in the "Streaming Media Directly from S3" section
of the Wowza
Server
For
AmazonEC2
User's Guide
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 Streamingprotocol. 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.
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.
By using Wowza Media Server 2 on Amazon EC2 you get a
pre-configured, pre-tuned Wowza Server running on hardware
backed by Amazon ready to go with just the click of
a button. But before you can get to the point you can just click and go
you'll need
to configure a few different pieces which we'll review here.
| EC2 | To stop the service: service WowzaMediaServer stop To start the service: service WowzaMediaServer start |
The following ports are used by default by Wowza Media Server 2 for streaming. You will need to open up these ports on the 'Security Groups' tab of Elasticfox 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 /home/wowza/conf/VHost.xml and
add additional port numbers to the HostPortList/HostPort/Port comma separated list of ports. If you open any of these ports on
the server you will still need to open them using Elasticfox as
described in the previous section. 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. You can view this address inElasticfox in the 'Public DNS' column of the 'Instances' tab. You can also 'right-click' on your instance and select 'Copy Public DNS Name to clipboard'. Once you've entered the above URL it should return the Wowza Server version number. If not, check to be sure the server is running and TCP port 1935 is open in Elasticfox 'Security Groups', on your router, firewall and/or software firewall (iptables on Linux).
The Wowza Server for EC2 edition is preconfigured with an
application 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 /home/wowza/content folder:
The Wowza Server for EC2 edition is preconfigured with an
application 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...:
The Wowza Server for EC2 edition is preconfigured with 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 application 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).
Connect to the instance to configure the
publishing of the MPEG-TS stream. See the Wowza
Server
for
Amazon
EC2
User's
Guide for
details on how to connect to your
instance via Telnet.Using
a
Unix
text editor such as as 'vi',
edit the file /home/wowza/conf/rtplive/Application.xml file and make the
following changes (some of these settings
may already be present): Note: If you edit the file on a local machine
then upload to the server chances are that the server will not
correctly read the line breaks because Unix, Macintosh and Windows all
use different conventions. There are some Unix tools such as
'dos2unix'which will convert line breaks but since Unix does such a
poor job reporting line break incompatibility we recommend you edit in
Unix if at all possible.
# Admin password file (format [username][space][password])
# username password
myuser mypassword The Wowza Server for EC2 edition is preconfigured with 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.
. See the Wowza
Server
for
Amazon
EC2
User's
Guide for
details on how to connect to your
instance via Telnet.# Admin password file (format [username][space][password])
#username password
myuser mypassword
The Wowza Server for EC2 edition is preconfigured with 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.
Connect to your EC2
Instance and navigate to the /home/wowza/content folder. See the Wowza
Server
for
Amazon
EC2
User's
Guide for
details on how to connect to your
instance via Telnet.
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.
Connect to your EC2
Instance and navigate to the /home/wowza/conf/rtplive folder. See the Wowza
Server
for
Amazon
EC2
User's
Guide for
details on how to connect to your
instance via Telnet.<Property>
<Name>forceInterleaved</Name>
<Value>true</Value>
<Type>Boolean</Type>
</Property>
# Admin password file (format [username][space][password])
#username password
myuser mypassword
The Wowza Server for EC2 edition is preconfigured with 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.
Connect to your EC2
Instance and navigate to the /home/wowza/conf/shoutcast folder. See the Wowza
Server
for
Amazon
EC2
User's
Guide for
details on how to connect to your
instance via Telnet.Using a Unix text editor such
as 'vi'
edit the
file /home/wowza/conf/shoutcast/Application.xml file and make the following
changes (some of these settings
may already be present): # Admin password file (format [username][space][password])
#username password
myuser mypassword
On computer2 :
Connect to your EC2
Instance and navigate to the /home/wowza/applications folder. See the Wowza
Server
for
Amazon
EC2
User's
Guide for
details on how to connect to your
instance via Telnet.Create
application folder /home/wowza/applications/videorecording 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 resultant file
will be located in the /home/wowza/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 /home/wowza/logs . To turn on debug logging (increase the amount of information written to the logs) edit /home/wowza/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 for EC2 is pre-tuned.
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 all you need to do is unblock TCP
traffic to ports 8084 and 8085 in your security group using Elasticfox.
For more details please consult the Wowza Pro for Amazon EC2 User's
Guide. Additional information is available in the Wowza Server Users
Guide.