Configure Wowza Streaming Engine™ media server software to receive a live stream from a native RTP encoder, using an SDP file, and play the live stream over all supported streaming protocols.
About streaming from native RTP encoders
Native RTP encoders send streams to Wowza Streaming Engine using the Real-time Transport Protocol (RTP). In order to process an RTP stream, Wowza Streaming Engine needs its session description information. This information is typically generated by the native RTP encoder as a Session Description Protocol (.sdp) file that you must upload to Wowza Streaming Engine.
Configure the live streaming application
Live streams are configured and managed in live applications in Wowza Streaming Engine. You can configure a live application in Wowza Streaming Engine Manager or by setting properties in the application's XML configuration file. Both methods produce the same result; editing Application.xml is the only option if you use Wowza Media Server™ software.
Configure the live application in Wowza Streaming Engine Manager
This example uses the default live application that installs with Wowza Streaming Engine.
You can use Wowza Streaming Engine Manager with the latest version of most web browsers that support HTML5 and Cascading Style Sheets level 3 (CSS 3). We recommend Google Chrome.
- In Wowza Streaming Engine Manager, click the Applications tab at the top of the page and then select the live application in the contents panel.
Start by enabling playback over all supported protocols: Adobe HDS, Adobe RTMP, Apple HLS, Microsoft Smooth Streaming, MPEG-DASH, and RTSP/RTP.
- On the Setup tab of the live application page, make sure all Playback Types are selected. If necessary, click Edit, select them all, and then click Save.
Note: Every time you edit an application's configuration, Wowza Streaming Engine prompts you to restart the application. However, you can wait until all changes are completed before you restart.
Next, disable playback authentication.
- In the contents panel, click Playback Security, and then click Edit.
- On the Playback Security page, select No client restrictions, and then click Save.
- Restart the application.
The application runs whenever Wowza Streaming Engine is running.
Configure the live application in XML
This section shows you how to configure the live application by editing the Application.xml configuration file in a text editor. If you configured the live application in Wowza Streaming Engine Manager, skip this section.
- Navigate to [install-dir]/conf/live and open Application.xml in a text editor.
- In the <Streams> container element, make sure the <StreamType> property is live. The XML looks like this:
<Streams> ... <StreamType>live</StreamType> ... </Streams>
- Set the <HTTPStreamers> property for all supported HTTP streaming protocols. The XML looks like this:
- Set the <LiveStreamPacketizers> property for HDS, HLS, Microsoft Smooth Streaming, and MPEG-DASH streaming. The XML looks like this:
<Streams> ... <LiveStreamPacketizers>cupertinostreamingpacketizer,smoothstreamingpacketizer,sanjosestreamingpacketizer,mpegdashstreamingpacketizer</LiveStreamPacketizers> ... </Streams>
- In the <RTP> container element, make sure playback authentication is disabled by setting the <PlayMethod> property to none. The XML looks like this:
<RTP> <Authentication> ... <PlayMethod>none</PlayMethod> </Authentication> ... </RTP>
- Save your changes and close Application.xml.
- Restart Wowza Streaming Engine or Wowza Media Server.
Publish the source stream to Wowza Streaming Engine
- Use the native RTP encoder's software or interface to generate a Session Description Protocol (.sdp) file that describes the stream. For help, see the encoder's documentation. Name the file myStream.sdp and copy it to the [install-dir]/content folder on the server that runs Wowza Streaming Engine.
- In Wowza Streaming Engine Manager, click Server in the menu bar, click Stream Files in the contents panel, and then click the Connect icon for the myStream.sdp file.
- In the Connect a Stream File dialog box, click the Application Name menu and choose live.
- Click the MediaCaster Type menu and choose rtp.
- Click OK.
The Connection successful notification is displayed.
In Wowza Streaming Engine Manager, click Test Players in the upper-right corner of the live application page.
Each tab in the Test Players window either hosts a test player that can play the live stream, or provides instructions for playing the live stream. The test players are preconfigured to stream the default live stream myStream.To test playback of the myStream.sdp stream over Adobe HDS, for example, make sure the native RTP encoder is sending the stream to the live application in Wowza Streaming Engine and that Adobe Flash is enabled in the browser you're using. Then, click the Adobe HDS tab, enter the information below, and then click Start.
- Server – Enter [wowza-ip-address]:1935.
- Application – Enter live.
- Stream – Enter myStream.sdp
The resulting URL syntax for playback over supported protocols is:
- MPEG-DASH – http://[wowza-ip-address]:1935/live/myStream.sdp/manifest.mpd
- Apple HLS – http://[wowza-ip-address]:1935/live/myStream.sdp/playlist.m3u8
- Adobe RTMP – rtmp://[wowza-ip-address]/live/myStream.sdp
- Adobe HDS – http://[wowza-ip-address]:1935/live/myStream.sdp/manifest.f4m
- Microsoft Smooth Streaming – http://[wowza-ip-address]:1935/live/myStream.sdp/Manifest
- RTSP (Android mobile playback) – rtsp://[wowza-ip-address]:1935/live/myStream
You can also test your live stream by using the test players online on our Wowza Test Players webpage, or by using the example players that install with Wowza Streaming Engine at [install-dir]/examples/. For more information, see any of these articles:
- Play streams with the Adobe RTMP example player in Wowza Streaming Engine
- Play streams with Adobe HDS example player in Wowza Streaming Engine
- Play streams with the Silverlight example player in Wowza Streaming Engine
- Play streams with the MPEG-DASH example player in Wowza Streaming Engine
- Play Wowza Streaming Engine streams on Apple iOS devices
- Play Wowza Streaming Engine streams on RTSP/RTP players
Adaptive bitrate streaming with .sdp streams
HTTP-based adaptive bitrate live streaming requires using an encoder that can generate multiple bitrate streams from the same source with properly aligned keyframes. You also must create a Synchronized Multimedia Integration Language (SMIL) file that links the streams together for playback.
For example, assume that you have three live streams encoded at different bitrates:
- myStream_700.sdp (700kbps total bitrate)
- myStream_350.sdp (350kbps total bitrate)
- myStream_200.sdp (200kbps total bitrate)
Using a text editor, create a SMIL file named myStream.smil in the [install-dir]/content folder with the following content:
<smil> <head> </head> <body> <switch> <video src="myStream_700.sdp" system-bitrate="700000"/> <video src="myStream_350.sdp" system-bitrate="350000"/> <video src="myStream_200.sdp" system-bitrate="200000"/> </switch> </body> </smil>
There's a <video> entry in the <switch> container for each stream rendition. The system-bitrate value is set to the total bitrate (in bits-per-second) for that stream.
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:
<smil> <head> </head> <body> <switch> <video src="myStream_700.sdp" system-bitrate="700000"/> <video src="myStream_350.sdp" system-bitrate="350000"/> <video src="myStream_200.sdp" system-bitrate="200000"/> <audio src="myStream_200.sdp" system-bitrate="96000"/> </switch> </body> </smil>
- The <audio> item will be ignored when using Adobe HDS (San Jose) or Apple HLS (Cupertino) streaming.
- JW Player and Flowplayer use a client-side XML file to reference each stream rendition, not the server-side SMIL file shown here. They both also use the BWCheck module.
For more information, see Stream adaptive bitrate content with Wowza Streaming Engine.
RTSP/RTP streaming is used to stream to Android and BlackBerry mobile devices. Android devices used to support Adobe Flash player, but don't any more. Newer Android devices support Apple HLS. HLS works best on Android 4.0 devices and above.
To stream to RTSP/RTP, be sure that UDP ports 0-65535 are open and mapped to the Wowza Streaming Engine server.
Force output to MPEG-TS for set-top boxesWhen using RTSP/RTP to stream out content, you can force the output to MPEG-TS, which is required by many set-top boxes. For more information, see Generate and control MPEG-TS output for set-top boxes in Wowza Streaming Engine.
Change the AAC packetization method
Wowza Streaming Engine can use the mpeg4-generic or mp4a-latm (3gpp) packetization method to output AAC audio. The default packetization method is mpeg4-generic.
Configure mp4a-latm packetization using Wowza Streaming Engine Manager
- Click the Applications tab and then select your live application in the contents panel.
- On the live application page Properties tab, click Custom in the Quick Links bar or scroll to the bottom of the page.
- In the Custom area, click Edit.
- Click Add Custom Property, specify the following settings in the Add Custom Property dialog box, and then click Add:
- Path – Select /Root/Application/RTP.
- Name – Enter audioPacketizerAAC.
- Type – Select String.
- Value – Enter com.wowza.wms.rtp.packetizer.RTPPacketizerMPEG4LATM.
- Click Save, and then restart the live application to apply the changes.
Configure mp4a-latm packetization in XML
- Navigate to [install-dir]/conf/[application] and open Application.xml in a text editor.
- Add the audioPacketizerAAC property to the <RTP> container element. The XML looks like this:
<RTP> ... <Properties> <Property> <Name>audioPacketizerAAC</Name> <Type>String</Type> <Value>com.wowza.wms.rtp.packetizer.RTPPacketizerMPEG4LATM</Value> </Property> </Properties> <RTP>
- Restart Wowza Streaming Engine or Wowza Media Server.