Contents
Tutorial
Troubleshooting
- RTSP/RTP
- Property to force output to MPEG-TS (set-top box)
- Property to change AAC packetization method
Related Articles
- How to troubleshoot RTSP/RTP playback
- How to set up an application for RTSP/RTP streaming
- How to configure Apple QuickTime player for RTSP/RTP playback on Windows
- How to configure VLC player for RTSP/RTP playback (RTSP/RTP interleaved and tuning)
- JW Player Dynamic Streaming
- Flowplayer Dynamic Streaming
Tutorial
Configuration
This tutorial shows you how to set up an application for video on demand (VOD) streaming and how to configure Application.xml. This tutorial use the sample video file [install-dir]/content/sample.mp4.
Note: A pre-configured application named vod is included in installations of Wowza Media Server 3 and later.
- Create application folder [install-dir]/applications/vod.
- Create configuration folder [install-dir]/conf/vod and copy [install-dir]/conf/Application.xml to this new folder.
- Edit the newly copied Application.xml file and make the following changes (some of these settings may already be present):
Note: Right-click HERE to download a pre-configured version of Application.xml.
- Set the Streams/StreamType property to:
Code:<StreamType>default</StreamType>
- Set the HTTPStreamers property to:
Code:<HTTPStreamers>cupertinostreaming,smoothstreaming,sanjosestreaming</HTTPStreamers>
- Set the RTP/Authentication/PlayMethod to:
Code:<PlayMethod>none</PlayMethod>
- Set the Streams/StreamType property to:
- Start Wowza Media Server.
Playback
Note: In the following examples, [wowza-ip-address] is the IP address or domain name of the server running Wowza Media Server.
Note: To play your own content, copy it into the [install-dir]/content folder and substitute its filename in place of sample.mp4 in the sample URLs in this section.
Adobe Flash Player (RTMP)
In Wowza Media Server 3.5, double-click [install-dir]/examples/VideoOnDemandStreaming/FlashRTMPPlayer/player.html, enter the information below, and then click the Connect button.
Server: rtmp://[wowza-ip-address]/vod
Stream: mp4:sample.mp4
To play the stream from a remote computer, copy the FlashRTMPPlayer folder to a web server, and then connect to: http://<webserver>/FlashRTMPPlayer/player.html.
Note: In Wowza Media Server 3.1.2 and earlier, double-click [install-dir]/examples/SimpleVideoStreaming/client/simplevideostreaming.html, enter the information below, and then click the Play button.
To play the stream from a remote computer, copy the client folder to a web server, and then connect to: http://<webserver>/client/simplevideostreaming.html.
Server: rtmp://[wowza-ip-address]/vod
Stream: mp4:sample.mp4
Stream: mp4:sample.mp4
To play the stream from a remote computer, copy the client folder to a web server, and then connect to: http://<webserver>/client/simplevideostreaming.html.
Adobe Flash Player (San Jose/Adobe HDS)
In Wowza Media Server 3.5, double-click [install-dir]/examples/VideoOnDemandStreaming/FlashHTTPPlayer/player.html, enter the information below, and then click the Connect button.
Stream: http://[wowza-ip-address]:1935/vod/mp4:sample.mp4/manifest.f4m
To play the stream from a remote computer, copy the FlashHTTPPlayer folder to a web server, and then connect to: http://<webserver>/FlashHTTPPlayer/player.html.
Note: In Wowza Media Server 3.1.2 and earlier, double-click [install-dir]/examples/SimpleVideoStreaming/clientOSMF/bin-release/SimpleOSMFPlayer.html, enter the information below, and then click the Play button.
To play the stream from a remote computer, copy the clientOSMF/bin-release folder to a web server, and then connect to: http://<webserver>/bin-release/SimpleOSMFPlayer.html.
Stream: http://[wowza-ip-address]:1935/vod/mp4:sample.mp4/manifest.f4m
To play the stream from a remote computer, copy the clientOSMF/bin-release folder to a web server, and then connect to: http://<webserver>/bin-release/SimpleOSMFPlayer.html.
Note: The stream can only be played from an OSMF-based Flash player that's embedded in a webpage.
Apple iOS device (Cupertino/Apple HLS)
Enter the following URL into the Safari® web browser on the device:
URL: http://[wowza-ip-address]:1935/vod/mp4:sample.mp4/playlist.m3u8
Note: The Apple® iPhone® 3GS (and older) and iPod touch® devices require that video be encoded using H.264 format (Baseline profile level 3 or lower) and AAC or MP3 stereo audio.
Note: This stream can also be played using the Safari web browser or QuickTime 10.x on a computer running Mac OS® X Snow Leopard version 10.6 or later.
Microsoft Silverlight (Smooth Streaming)
In Wowza Media Server 3.5, double-click [install-dir]/examples/VideoOnDemandStreaming/SilverlightPlayer/player.html, enter the information below, and then click the Connect button.
Stream: http://[wowza-ip-address]:1935/vod/mp4:sample.mp4/Manifest
To play the stream from a remote computer, copy the SilverlightPlayer folder to a web server, and then connect to: http://<webserver>/SilverlightPlayer/player.html.
Note: In Wowza Media Server 3.1.2 and earlier, double-click [install-dir]/examples/SimpleVideoStreaming/clientSilverlight/Default.html, enter the information below, and then click the Play button.
To play the stream from a remote computer, copy the clientSilverlight folder to a web server, and then connect to: http://<webserver>/clientSilverlight/Default.html.
Stream: http://[wowza-ip-address]:1935/vod/mp4:sample.mp4/Manifest
To play the stream from a remote computer, copy the clientSilverlight folder to a web server, and then connect to: http://<webserver>/clientSilverlight/Default.html.
Note: The Microsoft® Silverlight® player requires that both audio and video be present for playback.
RTSP/RTP player
Enter the following URL into the RTSP/RTP player:
URL: rtsp://[wowza-ip-address]:1935/vod/mp4:sample.mp4
Playback of content outside of the content root
To play content that's not in the content root folder ([install-dir]/content), you must add the default application instance name to the playback URL. For example, if the sample.mp4 video file is in [install-dir]/content/myvideos/sample.mp4, the URLs for the different streaming technologies are:
Adobe Flash Player (RTMP)
Server: rtmp://[wowza-ip-address]/vod
Stream: mp4:myvideos/sample.mp4
Single URL: rtmp://[wowza-ip-address]/vod/_definst_/mp4:myvideos/sample.mp4
Stream: mp4:myvideos/sample.mp4
Single URL: rtmp://[wowza-ip-address]/vod/_definst_/mp4:myvideos/sample.mp4
Adobe Flash Player (San Jose/Adobe HDS)
Stream: http://[wowza-ip-address]:1935/vod/_definst_/mp4:myvideos/sample.mp4/manifest.f4m
Apple iOS device (Cupertino/Apple HLS)
URL: http://[wowza-ip-address]:1935/vod/_definst_/mp4:myvideos/sample.mp4/playlist.m3u8
Microsoft Silverlight (Smooth Streaming)
Stream: http://[wowza-ip-address]:1935/vod/_definst_/mp4:myvideos/sample.mp4/Manifest
RTSP/RTP player
URL: rtsp://[wowza-address]:1935/vod/_definst_/mp4:myvideos/sample.mp4
Adaptive bitrate streaming
Adaptive bitrate (ABR) streaming of video on demand content to Adobe® Flash® Player, Apple iOS devices, and Microsoft Silverlight requires that you have multiple files that are pre-encoded to the desired bitrates for streaming. For stream-switching to occur properly, the key frames of each of the files must be aligned. This must be done at encoding time and can be achieved by setting the key frame interval and frame rate values to be the same for each encoded file. After you have the files properly encoded, copy them to the [install-dir]/content folder and create a Synchronized Multimedia Integration Language (SMIL) file that links the files together for playback.
For example, let's say that we have four files encoded at different bitrates:
- bigbuckbunny_450.mp4 (450kbps total bitrate)
- bigbuckbunny_750.mp4 (750kbps total bitrate)
- bigbuckbunny_1100.mp4 (1100kbps total bitrate)
- bigbuckbunny_1500.mp4 (1500kbps total bitrate)
Using a text editor, create a SMIL file named bigbuckbunny.smil in the [install-dir]/content folder with the following content:
Code:
<smil>
<head>
</head>
<body>
<switch>
<video src="mp4:bigbuckbunny_450.mp4" system-bitrate="450000"/>
<video src="mp4:bigbuckbunny_750.mp4" system-bitrate="750000"/>
<video src="mp4:bigbuckbunny_1100.mp4" system-bitrate="1100000"/>
<video src="mp4:bigbuckbunny_1500.mp4" system-bitrate="1500000"/>
</switch>
</body>
</smil>
Microsoft Smooth Streaming will only switch between the video portion of the files. The audio track in the first file listed in the <switch> container will be used. If you want to use a file other then the first file for the audio track, add a <audio> entry to the <switch> container for that item. For example:
Code:
<smil>
<head>
</head>
<body>
<switch>
<video src="mp4:bigbuckbunny_450.mp4" system-bitrate="450000"/>
<video src="mp4:bigbuckbunny_750.mp4" system-bitrate="750000"/>
<video src="mp4:bigbuckbunny_1100.mp4" system-bitrate="1100000"/>
<video src="mp4:bigbuckbunny_1500.mp4" system-bitrate="1500000"/>
<audio src="mp4:bigbuckbunny_1500.mp4" system-bitrate="128000"/>
</switch>
</body>
</smil>
Note: The <audio> item will be ignored when streaming using Adobe HDS (San Jose) or Apple HLS (Cupertino) streaming.
Note: JW Player™ and Flowplayer use a client-side XML file to reference each file rendition, not the server-side SMIL file that's shown in this tutorial. They both also use the BWCheck module.
You can download the SMIL file and the videos that are referenced in this section from the links below:
H.264 Main profile
http://www.wowzamedia.com/_h264/bigbuckbunny.smil
http://www.wowzamedia.com/_h264/bigbuckbunny_450.mp4
http://www.wowzamedia.com/_h264/bigbuckbunny_750.mp4
http://www.wowzamedia.com/_h264/bigbuckbunny_1100.mp4
http://www.wowzamedia.com/_h264/bigbuckbunny_1500.mp4
http://www.wowzamedia.com/_h264/bigbuckbunny.smil
http://www.wowzamedia.com/_h264/bigbuckbunny_450.mp4
http://www.wowzamedia.com/_h264/bigbuckbunny_750.mp4
http://www.wowzamedia.com/_h264/bigbuckbunny_1100.mp4
http://www.wowzamedia.com/_h264/bigbuckbunny_1500.mp4
Lower bitrate setting for mobile streaming (H.264 Baseline profile - iPhone and iPod touch compatible):
http://www.wowzamedia.com/_h264/bigbuckbunnyiphone.smil
http://www.wowzamedia.com/_h264/bigb...iphone_300.mp4
http://www.wowzamedia.com/_h264/bigb...iphone_400.mp4
http://www.wowzamedia.com/_h264/bigb...iphone_600.mp4
http://www.wowzamedia.com/_h264/bigbuckbunnyiphone.smil
http://www.wowzamedia.com/_h264/bigb...iphone_300.mp4
http://www.wowzamedia.com/_h264/bigb...iphone_400.mp4
http://www.wowzamedia.com/_h264/bigb...iphone_600.mp4
These sample multi-bitrate files were encoded with Microsoft Expression Encoder 4 and are properly encoded with key frames aligned.
Adobe Flash Player (San Jose/Adobe HDS)
In Wowza Media Server 3.5, double-click [install-dir]/examples/VideoOnDemandStreaming/FlashHTTPPlayer/player.html, enter the information below, and then click the Connect button.
Stream: http://[wowza-ip-address]:1935/vod/smil:bigbuckbunny.smil/manifest.f4m
Note: In Wowza Media Server 3.1.2 and earlier, double-click [install-dir]/examples/SimpleVideoStreaming/clientOSMF/bin-release/SimpleOSMFPlayer.html, enter the information below, and then click the Play button.
Stream: http://[wowza-ip-address]:1935/vod/smil:bigbuckbunny.smil/manifest.f4m
Apple iOS device (Cupertino/Apple HLS)
Enter the following URL into the Safari web browser on the device:
URL: http://[wowza-ip-address]:1935/vod/smil:bigbuckbunny.smil/playlist.m3u8
Microsoft Silverlight (Smooth Streaming)
In Wowza Media Server 3.5, double-click [install-dir]/examples/VideoOnDemandStreaming/SilverlightPlayer/player.html, enter the information below, and then click the Connect button.
Stream: http://[wowza-ip-address]:1935/vod/smil:bigbuckbunny.smil/Manifest
Note: In Wowza Media Server 3.1.2, double-click [install-dir]/examples/SimpleVideoStreaming/clientSilverlight/Default.html, enter the information below, and then click the Play button.
Stream: http://[wowza-ip-address]:1935/vod/smil:bigbuckbunny.smil/Manifest
By default Microsoft Smooth Streaming will calculate video and audio bitrates for the manifest data on-the-fly by inspecting the file. If you want to configure Wowza Media Server to use the bitrates in the SMIL file, add the following property to the HTTPStreamer/Properties container in [install-dir]/conf/[application]/Application.xml (be sure to get the correct Properties container - there are several in the Application.xml file):
Code:
<Property>
<Name>smoothStreamingUseSMILBitrates</Name>
<Value>true</Value>
<Type>Boolean</Type>
</Property>
Adobe Flash Player (RTMP)
Dynamic streaming for Adobe Flash requires a fair amount of work on the client-side. The following articles provide details about how to achieve dynamic streaming in Flash:
Dynamic streaming in Flash (part 1)
Dynamic streaming in Flash (part 2)
Dynamic streaming in Flash (part 3)
When streaming using Adobe HTTP Dynamic Streaming (Adobe HDS) with Wowza Media Server, it's best to turn on dynamic stream markers, which will provide more accurate on-the-fly bitrate calculations (in most cases). To turn on dynamic stream markers, edit [install-dir]/conf/[application]/Application.xml and add the following property to the Streams/Properties container (be sure to get the correct Properties container - there are several in the Application.xml file):
Code:
<Property>
<Name>enableDynamicStreamMarkers</Name>
<Value>true</Value>
<Type>Boolean</Type>
</Property>
Note: Dynamic stream markers are turned on by default in Wowza Media Server 2.2.0 and later.
Troubleshooting
RTSP/RTP
- RTSP/RTP streaming is used to stream to Android™ and BlackBerry® mobile devices. Newer Android-based phones also support Flash player 10.1 or later along with RTMP and Adobe HTTP Dynamic Streaming (Adobe HDS).
- To stream to RTSP/RTP, be sure that UDP ports 0-65535 are open and properly mapped to the server running Wowza Media Server.
- It's very important to carefully follow the instructions provided in How to troubleshoot RTSP/RTP playback to properly configure Wowza Media Server for RTSP/RTP streaming.
Property to force output to MPEG-TS (set-top box)
When streaming out using RTSP/RTP, you can force the output to MPEG-TS (which is required by many set-top boxes) by adding the following properties to the RTP/Properties container in [install-dir]/conf/[application]/Application.xml (be sure to get the correct <Properties> container, there are several in the Application.xml file):
Code:
<Property>
<Name>forceMPEGTSOut</Name>
<Value>true</Value>
<Type>Boolean</Type>
</Property>
<Property>
<Name>rtpWrapMPEGTS</Name>
<Value>true</Value>
<Type>Boolean</Type>
</Property>
Property to change AAC packetization method
Wowza Media Server can output AAC audio using the mpeg4-generic and mp4a-latm (3gpp) packetization methods. The default packetization method is mpeg4-generic. To switch to mp4a-latm (3gpp), add the following property to the RTP/Properties container in [install-dir]/[application]/Application.xml (be sure to get the correct Properties container - there are several in the Application.xml file):
Code:
<Property>
<Name>audioPacketizerAAC</Name>
<Value>com.wowza.wms.rtp.packetizer.RTPPacketizerMPEG4LATM</Value>
</Property>
Updated: For Wowza Media Server 3.5.0 on 11-08-2012
- Click here, if you are having problems or would like to discuss this article.
- Leave a comment below, if there is some aspect of this article you would like to see changed or improved.


Article List
Categories
Wowza Media