Contents
Tutorial
Troubleshooting
- RTSP/RTP
- Common problems with .stream files
- Properties to fix audio and video alignment
- Property to fix TS packet alignment in UDP packets
- Property to force output to MPEG-TS (set-top box)
- Property to change AAC packetization method
- Property to import AC-3 elementary streams
Related Articles
- How to troubleshoot RTSP/RTP playback
- How to set up an application for RTSP/RTP streaming
- How to configure Apple QuickTime player to playback an RTSP/RTP on Windows
- How to configure VLC player for RTSP/RTP playback (RTSP/RTP interleaved and tuning)
- How to select MPEG-TS stream by program ID and also audio language by PID
Tutorial
Configuration
This section provides the basic steps for setting up an application for live streaming and configuring Application.xml.
- Create application folder [install-dir]/applications/live.
- Create configuration folder [install-dir]/conf/live 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>live</StreamType>
- Set the HTTPStreamers property to:
Code:<HTTPStreamers>cupertinostreaming,smoothstreaming,sanjosestreaming</HTTPStreamers>
- Set the Streams/LiveStreamPacketizers property to:
Code:<LiveStreamPacketizers>cupertinostreamingpacketizer,smoothstreamingpacketizer,sanjosestreamingpacketizer</LiveStreamPacketizers>
- Set the RTP/Authentication/PlayMethod property to:
Code:<PlayMethod>none</PlayMethod>
- Set the Streams/StreamType property to:
Publishing the stream
This section provides the basic steps for creating a .stream file to publish your live stream to Wowza Media Server.
- Consult your MPEG-TS encoder documentation to configure an outgoing live stream. Publish the stream to the IP address of the server running Wowza Media Server using port 10000.
- Create .stream file:
- Use a text editor to create the file [install-dir]/content/mpegts.stream and set the contents of this file to udp://0.0.0.0:10000. If you're receiving a multicast stream, change the 0.0.0.0 part of the URL to the multicast address of the stream.
- Using a text editor, edit the [install-dir]/conf/admin.password file and add a username and password that will be used to start and stop the publishing of the MPEG-TS stream (below is an example of the file with the username myuser and password mypassword):
Code:# Admin password file (format [username][space][password]) # username password myuser mypassword
- Use a text editor to create the file [install-dir]/content/mpegts.stream and set the contents of this file to udp://0.0.0.0:10000. If you're receiving a multicast stream, change the 0.0.0.0 part of the URL to the multicast address of the stream.
- Start Wowza Media Server.
- Use Stream Manager to start the MPEG-TS stream:
- Enter the following URL in a web browser:
URL: http://[wowza-ip-address]:8086/streammanager - In the Security dialog box, enter your admin username and password from above.
- In the Stream Manager webpage, click the [start-receiving-stream] link just below the live application folder.
- In the Start Receiving Stream dialog box, select the following MediaCaster Type option: rtp
- In the Stream Name field, enter mpegts.stream.
- Click OK.
- Enter the following URL in a web browser:
Playback
Note: In the following examples, [wowza-ip-address] is the IP address or domain name of the server running Wowza Media Server.
Adobe Flash Player (RTMP)
In Wowza Media Server 3.5.0 and later, double-click [install-dir]/examples/LiveVideoStreaming/FlashRTMPPlayer/player.html, enter the information below, and then click the Connect button.
Server: rtmp://[wowza-ip-address]/live
Stream: mpegts.stream
Stream: mpegts.stream
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/LiveVideoStreaming/client/live.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/live.html.
Server: rtmp://[wowza-ip-address]/live
Stream: mpegts.stream
Stream: mpegts.stream
To play the stream from a remote computer, copy the client folder to a web server, and then connect to: http://<webserver>/client/live.html.
Note: If your application will only stream to Flash RTMP clients, see Flash RTMP clients only.
Adobe Flash Player (San Jose/Adobe HDS)
In Wowza Media Server 3.5.0 and later, double-click [install-dir]/examples/LiveVideoStreaming/FlashHTTPPlayer/player.html, enter the information below, and then click the Connect button.
Stream: http://[wowza-ip-address]:1935/live/mpegts.stream/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/LiveVideoStreaming/clientOSMF/bin-release/LiveOSMFPlayer.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/LiveOSMFPlayer.html.
Stream: http://[wowza-ip-address]:1935/live/mpegts.stream/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/LiveOSMFPlayer.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/live/mpegts.stream/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. iPhone 3GS and newer devices support Baseline profile. For encoding guidance for playback on Apple iOS devices, see How to find Apple iOS device supported profile and level information.
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 and later.
Microsoft Silverlight (Smooth Streaming)
In Wowza Media Server 3.5.0 and later, double-click [install-dir]/examples/LiveVideoStreaming/SilverlightPlayer/player.html, enter the information below, and then click the Connect button.
Stream: http://[wowza-ip-address]:1935/live/mpegts.stream/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/LiveVideoStreaming/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/live/mpegts.stream/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 Silverlight player requires that both audio and video be present for playback. For live streaming only, the key frame frequency (which can be set directly in some encoders or is gop/fps) must be between 1 and 4 seconds (2 seconds is recommended). Anything greater than 4 seconds may cause playback to freeze.
RTSP/RTP player
Enter the following URL into the RTSP/RTP player:
URL: rtsp://[wowza-ip-address]:1935/live/mpegts.stream
Adaptive Bitrate Streaming
Adaptive bitrate (ABR) live streaming to Adobe® Flash® Player, Apple iOS devices, and Microsoft Silverlight requires that you have an encoder that can generate multiple bitrate streams from the same source with properly aligned key frames. You also must create a Synchronized Multimedia Integration Language (SMIL) file that links the streams together for playback.
For example, let's say that we have three live streams encoded at different bitrates:
- mpegts_700.stream (700kbps total bitrate)
- mpegts_350.stream (350kbps total bitrate)
- mpegts_200.stream (200kbps total bitrate)
Using a text editor, create a SMIL file named mpegts.smil in the [install-dir]/content folder with the following content:
Code:
<smil>
<head>
</head>
<body>
<switch>
<video src="mpegts_700.stream" system-bitrate="700000"/>
<video src="mpegts_350.stream" system-bitrate="350000"/>
<video src="mpegts_200.stream" system-bitrate="200000"/>
</switch>
</body>
</smil>
Microsoft Smooth Streaming will only switch between the video portion of the streams. The audio track in the first stream listed in the <switch> container will be used. If you want to use a stream other than the first stream for the audio track, add an <audio> entry to the <switch> container for that item. For example:
Code:
<smil>
<head>
</head>
<body>
<switch>
<video src="mpegts_700.sdp" system-bitrate="700000"/>
<video src="mpegts_350.sdp" system-bitrate="350000"/>
<video src="mpegts_200.sdp" system-bitrate="200000"/>
<audio src="mpegts_200.sdp" system-bitrate="96000"/>
</switch>
</body>
</smil>
Note: The <audio> item will be ignored when streaming using Adobe HDS (San Jose) or Apple HLS (Cupertino) streaming.
Adobe Flash Player (San Jose/Adobe HDS)
In Wowza Media Server 3.5.0 and later, double-click [install-dir]/examples/LiveVideoStreaming/FlashHTTPPlayer/player.html, enter the information below, and then click the Connect button.
Stream: http://[wowza-ip-address]:1935/live/smil:mpegts.smil/manifest.f4m
Note: In 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-ip-address]:1935/live/smil:mpegts.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/live/smil:mpegts.smil/playlist.m3u8
Microsoft Silverlight (Smooth Streaming)
In Wowza Media Server 3.5.0 and later, double-click [install-dir]/examples/LiveVideoStreaming/SilverlightPlayer/player.html, enter the information below, and then click the Connect button.
Stream: http://[wowza-ip-address]:1935/live/smil:mpegts.smil/Manifest
Note: In 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.
Stream: http://[wowza-ip-address]:1935/live/smil:mpegts.smil/Manifest
By default Microsoft Smooth Streaming will calculate video and audio bitrates for the manifest data on the fly by inspecting the stream. 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.
Flash RTMP clients only
(Optional) If your application will only stream to Flash RTMP clients, in [install-dir]/conf/live/Application.xml, you can set the Streams/StreamType property to:
Code:
<StreamType>rtp-live</StreamType>
Also, in [install-dir]/conf/live/Application.xml, make sure that the Streams/LiveStreamPacketizers property is empty:
Code:
<LiveStreamPacketizers></LiveStreamPacketizers>
Troubleshooting
RTSP/RTP
- RTSP/RTP streaming is used to stream to Android™ and BlackBerry® mobile devices. Newer Android-based phones also support Adobe Flash Player 10.1 and 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.
Common problems with .stream files
- Many text editors will append a .txt filename extension to the mpegts.stream filename. This will result in an error message similar to the following:
SDP file missing: c:/program files/wowzamediasystems/wowzamediaserver[version]/content/mpegts.stream
To fix this, go to the [install-dir]/content folder and remove the .txt filename extension from the file.
- The mpegts.stream file contains the address of the incoming UDP stream that carries the MPEG-TS packets. Most of the time, it's sufficient to set this address to the following:
URL: udp://0.0.0.0:[port]
Where [port] is the port number to which the stream is being published.
The IP address (0.0.0.0) instructs Wowza Media Server to listen on all local IP addresses for the incoming stream. Sometimes this won't work properly if the computer has multiple network interfaces. If this happens, it's best to specify the internal IP address of the stream. For example, to listen to the local loopback interface, you might specify:
URL: udp://127.0.0.1:10000
Or you might specify the computer's internal NAT address:
URL: udp://192.168.1.1:10000
Properties to fix audio and video alignment
Some MPEG-TS encoders publish audio and video where the media frames aren't aligned on PES packet boundaries. This will cause the audio and video to not play. Wowza Media Server can re-align unaligned streams, but it requires a property to be added to [install-dir]/conf/[application]/Application.xml.
To turn on the code to fix audio alignment, add the following property 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>audioIsAligned</Name>
<Value>false</Value>
<Type>Boolean</Type>
</Property>
Code:
<Property>
<Name>videoIsAligned</Name>
<Value>false</Value>
<Type>Boolean</Type>
</Property>
Property to fix TS packet alignment in UDP packets
A few MPEG-TS encoders don't align TS packets correctly in UDP packets. When this happens, you'll see lots of the following warning messages in the logs:
RTPDePacketizerMPEGTS.handleRTPPacket: Out of sync: 0x[nn]
Add the following property 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>rtpDePacketizerWrapper</Name>
<Value>com.wowza.wms.rtp.depacketizer.RTPDePacketizerWrapperReChunkMPEGTS</Value>
</Property>
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>
Property to import AC-3 elementary streams
Note: Wowza Media Server 3.5.1 or later is required.
Wowza Media Server can import AC-3 elementary streams, allowing Dolby® Digital (AC-3) and Dolby Digital Plus (Enhanced AC-3) audio from MPEG-TS encoders to pass through unaltered for delivery using Apple HLS (Cupertino) and Microsoft Smooth Streaming. This allows your customers to experience immersive surround-sound audio when streaming on media devices such as Apple TV®, Xbox 360®, Sony PlayStation® 3 (PS3), hybrid set-top boxes, and smart TVs. To import AC-3 elementary streams, 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>mpegtsImportAC3</Name>
<Value>true</Value>
<Type>Boolean</Value>
</Property>
Updated: For Wowza Media Server 3.5.1 on 01-28-2013
- 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