Contents
- Basic configuration
- Configuring HTTP packetizers
- Setting up originURL(s)
- Using simple stream names
- Playing the streams
- Securing the origin
- Securing the edges
- Related articles
Basic configuration
Wowza origin
- On the Wowza origin server, create the application folder [install-dir]/applications/liveorigin.
- Create the configuration folder [install-dir]/conf/liveorigin and copy [install-dir]/conf/Application.xml to this new folder.
- Open the newly copied Application.xml file in a text editor and set the StreamType property to liverepeater-origin:
Code:<StreamType>liverepeater-origin</StreamType>
- Start Wowza Media Server.
Wowza edge
- On each Wowza edge server, create the application folder [install-dir]/applications/liveedge.
- Create the configuration folder [install-dir]/conf/liveedge and copy [install-dir]/conf/Application.xml to this new folder.
- Open the newly copied Application.xml file in a text editor and set the StreamType property to liverepeater-edge:
Code:<StreamType>liverepeater-edge</StreamType>
- Start Wowza Media Server.
Encoder
Publish a stream from an encoder to the Wowza origin server:
Connect: rtmp://[wowza-origin-address]:1935/liveorigin
Stream name: myStream
-or-Stream name: myStream
Start a MediaCaster stream (for example, from an IP camera) using StreamManager.
Testing basic configuration
Use the Wowza Media Server LiveVideoStreaming example player to test the stream.
Wowza Media Server 3.5
Double-click [install-dir]/examples/LiveVideoStreaming/FlashRTMPPlayer/player.html, enter the information below, and then click the Connect button.
Wowza Media Server 3.1.2 and earlier
Double-click [install-dir]/examples/LiveVideoStreaming/client/live.html, enter the information below, and then click the Play button.
Test from the origin server:
Server: rtmp://[wowza-origin-address]:1935/liveorigin
Stream: myStream
Stream: myStream
Test from the edge server:
Server: rtmp://[wowza-edge-address]:1935/liveedge
Stream: rtmp://[wowza-origin-address]:1935/liveorigin/_definst_/myStream
Stream: rtmp://[wowza-origin-address]:1935/liveorigin/_definst_/myStream
Configuring HTTP packetizers
Live streams coming into Wowza Media Server must be packaged (packetized) before they can be delivered to clients using HTTP streaming protocols such as Apple HTTP Live Streaming (Apple® HLS), Adobe HTTP Dynamic Streaming (Adobe® HDS), and Microsoft® Smooth Streaming. The <Streams>/<LiveStreamPacketizers> list in Application.xml specifies the streaming protocols that are used when packetizing live streams. There are two types of packetizers: streaming packetizers and repeater packetizers.
Wowza origin
In a live stream repeater (origin/edge) configuration, streaming packetizers are used when delivering a stream from the Wowza origin server to a Wowza edge server. The <Streams>/<LiveStreamPacketizers> list in Application.xml on the origin can contain none, one, or more than one of the following streaming packetizers.
| cupertinostreamingpacketizer | Enables Apple HLS live streaming to iOS-based devices. |
| sanjosestreamingpacketizer | Enables Adobe HDS live streaming to Flash® Player. |
| smoothstreamingpacketizer | Enables Smooth Streaming to Microsoft Silverlight®. |
On the origin server, add the desired streaming packetizers to /conf/liveorigin/Application.xml:
Code:
<!-- LiveStreamPacketizers (separate with commas): cupertinostreamingpacketizer, smoothstreamingpacketizer, sanjosestreamingpacketizer, cupertinostreamingrepeater, smoothstreamingrepeater, sanjosestreamingrepeater, dvrstreamingpacketizer, dvrstreamingrepeater --> <LiveStreamPacketizers>cupertinostreamingpacketizer, smoothstreamingpacketizer, sanjosestreamingpacketizer</LiveStreamPacketizers>
In a live stream repeater (origin/edge) configuration, a packetizer is set with a repeater value on a Wowza edge server. The <Streams>/<LiveStreamPacketizers> list in Application.xml on the edge can contain none, one, or more than one of the following repeater packetizers.
| cupertinostreamingrepeater | Enables Apple HLS live stream repeater for iOS-based devices. |
| sanjosestreamingrepeater | Enables Adobe HDS live stream repeater for Flash Player. |
| smoothstreamingrepeater | Enables Microsoft Smooth Streaming live stream repeater for Silverlight. |
On each edge server, add the desired repeater packetizers to /conf/liveorigin/Application.xml:
Code:
<!-- LiveStreamPacketizers (separate with commas): cupertinostreamingpacketizer, smoothstreamingpacketizer, sanjosestreamingpacketizer, cupertinostreamingrepeater, smoothstreamingrepeater, sanjosestreamingrepeater, dvrstreamingpacketizer, dvrstreamingrepeater --> <LiveStreamPacketizers>cupertinostreamingrepeater, smoothstreamingrepeater, sanjosestreamingrepeater</LiveStreamPacketizers>
Setting up originURL(s)
Wowza edge
On each edge server, add the origin server URL to the Application.xml file:
Code:
<Repeater> <OriginURL>wowz://[wowza-origin-address]:1935/liveorigin</OriginURL> <QueryString><![CDATA[]]></QueryString> </Repeater>
Code:
<Repeater> <OriginURL>wowz://[wowza-origin-address]:1935/liveorigin|wowz://[wowza-alternate-origin-address]:1935/backuporigin</OriginURL> <QueryString><![CDATA[]]></QueryString> </Repeater>
Note: In the event that the primary origin server fails, clients may experience up to a 12-second timeout before failover to the backup origin server is completed. Use the above method only for failover purposes.
Note: The WOWZ™ protocol is a new TCP-based messaging protocol in Wowza Media Server 3.5 and is used for server-to-server communication. It's enabled by default. If one of the Wowza Media Servers in the origin/edge configuration isn't running Wowza Media Server 3.5, an RTMP connection will be established between the servers instead.
Using simple stream names
If you're using an encoder such as an MPEG-TS encoder in which the stream name isn't a simple stream name, of if you just want to simplify complex stream names for clients, you can use .stream files on the origin server to hide the complex stream names. For example, if your complex stream name on the origin server is udp://0.0.0.0:10000, use a text editor to create a file named origin.stream in the [install-dir]/content folder of each edge server and set the contents to udp://0.0.0.0:10000. You can then use origin.stream in place of [stream-name] in the example playback URLs to play the stream.
Note: A .stream file is a plaintext file with a .stream filename extension. Make sure that your text editor doesn't use the .txt filename extension for this file.
Note: You can also simplify complex URL-based stream names by using the StreamNameAlias AddOn.
Playing the streams
Note: In the following examples, [wowza-edge-address] is the IP address of an edge server running Wowza Media Server, [wowza-origin-address] is the IP address of the origin server running Wowza Media Server, and [stream-name] is the name of the live stream being sent to the origin server.
To play the stream in Adobe Flash Player (San Jose/Adobe HDS)
Wowza Media Server 3.5
Double-click [install-dir]/examples/LiveVideoStreaming/FlashHTTPPlayer/player.html, enter the information below, and then click the Connect button.
Wowza Media Server 3.1.2 and earlier
Double-click [install-dir]/examples/LiveVideoStreaming/clientOSMF/bin-release/LiveOSMFPlayer.html, enter the information below, and then click the Play button.
Stream: http://[wowza-edge-address]:1935/liveedge/[stream-name]/manifest.f4m
To play the stream on Apple iOS device (Cupertino/Apple HLS)
Enter the following URL into the Safari web browser on the device::
URL: http://[wowza-edge-address]:1935/liveedge/[stream-name]/playlist.m3u8
To play the stream in Microsoft Silverlight (Smooth Streaming)
Wowza Media Server 3.5
Double-click [install-dir]/examples/LiveVideoStreaming/SilverlightPlayer/player.html, enter the information below, and then click the Connect button.
Wowza Media Server 3.1.2 and earlier
Double-click [install-dir]/examples/LiveVideoStreaming/clientSilverlight/Default.html, enter the information below, and then click the Play button.
URL: http://[wowza-edge-address]:1935/liveedge/[stream-name]/Manifest
To play the stream in Adobe Flash Player (RTMP)
Wowza Media Server 3.5
Double-click [install-dir]/examples/LiveVideoStreaming/FlashRTMPPlayer/player.html, enter the information below, and then click the Connect button.
Wowza Media Server 3.1.2 and earlier
Double-click [install-dir]/examples/LiveVideoStreaming/client/live.html, enter the information below, and then click the Play button.
Server: rtmp://[wowza-edge-address]:1935/liveedge
Stream: rtmp://[wowza-origin-address]:1935/liveorigin/_definst_/[stream-name]
Stream: rtmp://[wowza-origin-address]:1935/liveorigin/_definst_/[stream-name]
Note: You can substitute the name of a .stream file on the origin server in place of the complex URL in Stream. For more information, see Using simple stream names.
Securing the origin
You can prevent unauthorized re-streaming from a server and direct streaming from an Adobe Flash client using SecureToken.
Wowza Media Server 3.5 and later
- On the origin server, open [install-dir]/conf/[application]/Application.xml in a text editor and add the following <Module> definition as the last entry in the <Modules> list:
Code:<Module> <Name>ModuleRTMPAuthenticate</Name> <Description>ModuleRTMPAuthenticate</Description> <Class>com.wowza.wms.security.ModuleRTMPAuthenticate</Class> </Module>
- On the same origin server Application.xml file as above, add the following property to the <Properties> list at the bottom of the file:
Code:<Property> <Name>secureTokenSharedSecret</Name> <Value>#ed%h0#w@1</Value> </Property>
- On each edge server, open [install-dir]/conf/[application]/Application.xml in a text editor and add the following <Module> definition (same as above) as the last entry in the <Modules> list:
Code:<Module> <Name>ModuleRTMPAuthenticate</Name> <Description>ModuleRTMPAuthenticate</Description> <Class>com.wowza.wms.security.ModuleRTMPAuthenticate</Class> </Module>
- In each edge server's Application.xml file (same as above), add the following property to the <Properties> list at the bottom of the file:
Code:<Property> <Name>secureTokenOriginSharedSecret</Name> <Value>#ed%h0#w@1</Value> </Property>
Wowza Media Server 3.1.2 and earlier
- Download and unzip the MediaSecurity Addon package.
- Copy the two .jar files from the package /lib folder to the Wowza Media Server /lib folder on the origin server and each edge server.
- On the origin server, open [install-dir]/conf/[application]/Application.xml in a text editor and add the following <Module> definition as the last entry in the <Modules> list:
Code:<Module> <Name>ModuleRTMPAuthenticate</Name> <Description>ModuleRTMPAuthenticate</Description> <Class>com.wowza.wms.plugin.security.ModuleRTMPAuthenticate</Class> </Module>
- On the same origin server Application.xml file as above, add the following property to the <Properties> list at the bottom of the file:
Code:<Property> <Name>secureTokenSharedSecret</Name> <Value>#ed%h0#w@1</Value> </Property>
- On each edge server, open [install-dir]/conf/[application]/Application.xml in a text editor and add the following <Module> definition (same as above) as the last entry in the <Modules> list:
Code:<Module> <Name>ModuleRTMPAuthenticate</Name> <Description>ModuleRTMPAuthenticate</Description> <Class>com.wowza.wms.plugin.security.ModuleRTMPAuthenticate</Class> </Module>
- In each edge server's Application.xml file (same as above), add the following property to the <Properties> list at the bottom of the file:
Code:<Property> <Name>secureTokenOriginSharedSecret</Name> <Value>#ed%h0#w@1</Value> </Property>
- Restart Wowza Media Server on all origin and edge servers so that the new .jar files are loaded.
Securing the edges
- Follow the steps in the previous section (Securing the origin).
- In each edge server's Application.xml file (same as above), add the following property to the <Properties> list at the bottom of the file (below the secureTokenOriginSharedSecret Property):
Code:<Property> <Name>secureTokenSharedSecret</Name> <Value>#ed%h0#w@1</Value> </Property> <Property> <Name>requireSecureConnection</Name> <Value>true</Value> <Type>Boolean</Type> </Property>
- For this to work, your Flash application must return the SecureToken when it connects. For information about how to do this in JW Player, see How to add SecureToken Protection to LongTail JW Player 5.
Updated: For Wowza Media Server 3.5 on 11-14-2012


Article List
Categories
Wowza Media