Live Streaming with Wowza and Instant Roku Channel
Wowza is a media server
that provides live
and on-demand video streams
for web sites, Roku players, and other streaming devices.
This walk-through is intended to provide a quick introduction to
live streaming using Wowza and Instant Roku Channel.
It will cover setting up Wowza Media Server on Amazon EC2
("Elastic Compute Cloud")
to provide a live single-bitrate stream to be displayed within a Roku channel.
Adobe Flash Media Live Encoder will be used to encode and transmit the stream to Wowza.
Advanced details such as multi-bitrate streams and transcoding will not be covered.
Prerequisites:
An Instant Roku Channel account with a private channel installed on a Roku player for testing.
(See
this tutorial
if you don't have a private test channel installed yet.)
A capture device such as a video camera or webcam
installed on a Mac or Windows-based encoding workstation or laptop.
Video and audio signals are both required for input to the encoder.
Cost:
Instant Roku Channel account: Free
Adobe Flash Media Live Encoder: Free
(Wirecast can be used instead of Adobe Flash Media Live Encoder)
Wowza DevPay License: $5.00 per month plus $0.15 per hour (typical) while running
MainConcept AAC Encoder Plug-in: $180 (one-time purchase, Windows only, not needed for Mac)
HLS streamed out from Amazon to Roku players: $0.12 per Gigabyte
Flash streamed in to Amazon Wowza instance: $0.05 per Gigabyte
Download Flash Media Live Encoder (Mac or Windows) to your encoding workstation or laptop.
FMLE is free, but you may be required to register your email address before downloading it.
Install FMLE and test with your video capture device.
Do not click Start or Connect yet.
We will complete the connection to the Flash Media Server
and start the encoder at a later step.
Be sure to review Adobe's EULA for any streaming restrictions.
Wowza Configuration File
Instant Roku Channel provides a customized Wowza configuration file named
ircwowza.zip
that is specifically tuned for use with Roku players.
This file will be used when launching the Amazon EC2 Wowza server instance.
The ircwowza.zip
configuration file is a compressed archive that contains
several different files and directories
that are expanded and copied into the Wowza server as part of the EC2 launch process.
If no configuration file is provided when launching the EC2 instance,
the Wowza server will use a built-in default configuration.
Download the customized Wowza configuration file from this link:
ircwowza.zip.
Save the file on your laptop or workstation
so that it can be used in the next section when the EC2 Wowza instance is launched.
The zip file does not need to be unzipped or unarchived
because the Wowza instance requires that
the configuration information be provided to it as a zip file.
Amazon EC2 Wowza Instance
The following steps will configure and launch an Amazon EC2 instance of the
Wowza Media Server.
Some of the configuration settings (Wowza License and AWS Security Group)
will be saved within your AWS
account so that the next time you launch a Wowza instance
several of the steps can be skipped.
Browse to http://www.wowza.com/ec2.
and follow the directions to purchase a DevPay License.
Sometimes this is also referred to as an Embedded License.
The price of the Wowza DevPay License will be $5.00 per month,
but your initial charge may be less than $5.00 due to monthly prorating.
Important: DO NOT purchase a Regular Wowza License
unless you have finished testing
and are ready to use Wowza full-time in a production environment.
You will also need to install the Regular Wowza License key into the Wowza server
instance which is not covered in this introductory guide.
This walk-through only covers the use of Wowza DevPay License.
After you have purchased the Wowza DevPay License,
browse to http://www.wowza.com/forums/content.php?23
and locate the DevPay licensing AMI ID for the US-East location.
This is an identifier for an "Amazon Machine Instance" that
will be needed to start the correct Wowza version on EC2.
An AMI in a different location may also be used, but the hourly costs may be higher.
AMIs for Amazon's US-East location are generally the least expensive.
Be sure to choose an AMI ID from the DevPay licensing table and not the
LicKey table.
The DevPay AMIs may also be referred to as "Embedded License" AMIs.
The LicKey AMIs are the "Regular Wowza License" AMIs
and will not be covered in this walk-through.
Record the AMI ID (for example ami-3e79db57),
you will need it in a later step.
Log into your Amazon AWS account and enter the EC2 section.
Click the Security Groups link from the left-side Navigation panel.
Click the Create Security Group button near the top of the page.
Provide a Name and Description,
for example "Wowza" and "Wowza Security Group",
then click Yes, Create
Under the Inbound tab near the bottom of the page,
enter 80 into the Port Range box,
then click the Add Rule button.
This rule will allow Roku players to connect to the Wowza server
to download the live stream.
Again, under the Inbound tab near the bottom of the page,
enter 1935 into the Port Range box,
then click the Add Rule button.
This rule will allow your encoding workstation or laptop
to connect to the Wowza server to upload the live stream.
Click the Apply Rule Changes button to save the two new rules.
Click the AMIs link from the left-side Navigation panel.
Paste the AMI ID that you saved earlier into the search box in the center of the page.
Change Viewing from Owned By Me to All Images.
After a minute or two the Wowza AMI that corresponds to
the AMI ID you provided will be displayed.
Right click anywhere on the row containing the new Wowza AMI information
and select Launch Instance.
The Request Instances Wizard is displayed.
Verify that the Instance Type is set to small.
Click the Continue button.
The Advanced Instance Options panel is displayed.
Under User Data select as file.
Click the Browse button to locate and select the ircwowza.zip
file that you previously downloaded.
Click the Continue button.
The Storage Device Configuration panel is displayed
Click the Continue button.
The Key - Value panel is displayed.
Directly beneath Value,
enter a name for the instance,
for example "Wowza".
Click the Continue button.
The Create Key Pair panel is displayed.
Select Proceed without a Key Pair
Click the Continue button.
The Configure Firewall panel is displayed.
Select the Security Group that you just created.
Click the Continue button.
The Review panel is displayed.
Click the Launch button.
Click the Close button.
Click the Instances link from the left-side Navigation panel.
Record the Instance ID (for example i-1234abcd)
for the newly launched Wowza instance,
this will be used as a password in a later step.
Record the Public DNS value (for example ec2-10-20-30-40.compute-1.amazonaws.com)
for the newly launched Wowza instance,
this will be used to connect to the Wowza instance in a later step.
After the AWS Instances page shows that the new Wowza instance is running,
you can verify that the Wowza server is operating correctly
by using this
Test page.
On the Test page
change the contents of the Server box to:
rtmp://address/vod
substituting the Public DNS value previously saved in place of
address.
Click the Play button.
If the Wowza instance is running an animated video will play.
The animated video is stored within the Wowza instance.
It is not a live stream,
but it verifies that the Wowza instance is functional.
Important: Because your Wowza server instance is now running,
your Amazon AWS account is being billed for
$0.15 every hour, whether or not you are streaming anything.
Make sure that you terminate the Wowza instance
(right click, select Terminate)
when you are done with this walk-through
in order to avoid unnecessary charges to your AWS account.
Your AWS account will continue to be billed $5.00 per month for the
Wowza license.
You can view or cancel your Wowza license by
logging in to your AWS Account Page
and clicking View Paid AMI Activity
in the Amazon Elastic Computer Cloud section.
MainConcept AAC Encoder
In order to be compatible with Roku players the live stream must have it's audio
encoded as AAC instead of the encoder default of MP3.
If you installed Flash Media Live Encoder (FMLE)
on a Mac encoding workstation or laptop then you already
have an AAC encoder available as part of the Mac OS,
and AAC is available as an FMLE Audio Format option.
If you installed FMLE on a Windows encoding workstation or laptop then you will need
to purchase an AAC plug-in for FMLE because
Windows does not include a built-in AAC encoder.
Windows-based systems without the AAC encoder plug-in installed will
only have MP3 available as an Audio Format option.
The cost for the encoder plug-in that adds the Audio Format AAC option is $180.
Without AAC encoding live streams may not play at all on Roku2 players
and earlier Roku players may have long buffering times and no audio.
Skip the following steps if you are using a Mac-based encoding workstation or laptop.
Click the BUY NOW button to purchase the AAC Encoder plug-in.
Follow the on-screen directions to complete payment and download the plug-in.
After payment is complete you will be provided with a registration
code.
The code will be used during the plug-in installation process
to activate it.
Without the registration code the AAC Encoder plug-in will only function for 30 seconds.
Click on the AAC Encoder installation executable and follow the on-screen instructions,
replacing the default DEMO registration code with the code that was just purchased.
After the AAC Encoder installation is complete,
restart Flash Media Live Encoder and verify that AAC is available
as an Audio Format option.
Flash Media Live Encoder
As shown in the diagram at the top of this page,
the encoder will be used to convert video and audio
signals from a camera or webcam into a Flash stream suitable to be sent
to the Wowza EC2 instance.
Start up Adobe Flash Media Live Encoder on your workstation or laptop.
Configure the video input:
Make sure that the Video checkbox is checked.
Device: Usually a camera or webcam
Format: H264
Frame Rate: 29.97
Input Size: Image input size, varies depending on camera or webcam driver
Bit Rate: Channel bandwidth, try not to exceed the upstream Internet bandwidth
Configure the audio input:
Make sure that the Audio checkbox is checked.
Device: Usually the microphone built into the camera or webcam
Format: AAC
Channels: Stereo
Sample Rate: 44100
Bit Rate: 96
Volume: Reduce to avoid feedback if testing with the camera and Roku player in the same room
Configure the Flash Media Server connection:
Make sure that the Stream to Flash Media Server checkbox is checked.
Enter the FMS URL as rtmp://address/live,
substituting the Public DNS value previously saved in place of
address.
Enter irc as the name of the Stream.
This can be changed to something else later,
and is used to distinguish between multiple streams
being provided by the same Wowza instance.
Click the Connect button.
If a Wowza instance is found
the Connect to FMS panel is displayed.
If the Connect to FMS panel is not displayed,
check that the Public DNS value is correct,
and re-verify that the Wowza instance is running.
Enter wowza as the Username.
Enter the previously saved Wowza Instance ID as the password.
Click OK.
Click the large green Start button.
The encoder is now streaming live video to the Wowza server instance.
Edit the Roku Channel
Add a live stream program to the test Roku channel:
Log into your Instant Roku Channel account.
From the menu along the left side of the page, select Channels.
Select a channel to add the live program to,
or create a new channel.
From the menu along the left side of the page, select Content.
Right-click on any folder
in the content tree in the upper-left window
and add a New Video or Audio item.
In the lower window,
locate the Live Program Parameter and change it to True.
In the lower window,
locate the Stream 1 - URL Program Parameter and change it to
http://address/live/irc/playlist.m3u8
substituting the Public DNS value previously saved in place of
address.
In the lower window,
locate the Stream 1 - Bitrate Program Parameter and change it to
a value that is slightly less than the
Total bandwidth required to stream as shown in the encoder.
This value is specified in Kilobits per Seconds (Kbps)
and will typically be in the range of 200 to 5000.
In the lower window,
locate the StreamFormat Program Parameter and change it to hls.
Change both the Title and ShortDescriptionLine1
parameters to "Live Stream Test"
Finally!
The live stream is ready to play.
Re-start the test channel on a Roku player
and select the Live Stream Test program.
Important:
Because your Wowza server instance is now running,
your Amazon AWS account is being billed for
$0.15 every hour, whether or not you are streaming anything.
Make sure that you terminate the Wowza instance
when you are done with this walk-through
in order to avoid unnecessary charges to your AWS account.
Your AWS account will continue to be billed $5.00 per month for the Wowza license.
To terminate the EC2 Wowza instance:
Enter the EC2 section of your Amazon AWS account.
Click the Instances link from the left-side Navigation panel.
Locate and right-click anywhere on row containing the Wowza instance details
and select Terminate
Click the Yes, Terminate button.
You can cancel the $5.00 per month Wowza DevPay License by
logging in to your AWS Account Page
and clicking View Paid AMI Activity
in the Amazon Elastic Computer Cloud section.
- o -
Please see this
brief tutorial
for more information about how to build a Roku channel using Instant Roku Channel.
Questions and comments about this Roku developer walk-through can be forwarded to .
Instant Roku Channel
Instant Roku Channel is a cloud-based tool for Roku developers and content providers that shortens development time and eases maintenance after deployment.