• How to set up live streaming using a native RTP encoder with SDP file

    This tutorial provides the basic steps for using a live encoder that publishes a stream using the Real-time Transport Protocol (native RTP) with Session Description Protocol (SDP) files, and for setting up an application named live to stream live content to the Adobe Flash Player, Microsoft Silverlight player, Apple iOS devices, and RTSP/RTP based-players.

    Contents


    Tutorial

    Troubleshooting

    Related Articles

    Tutorial


    Configuration

    Wowza Streaming Engine Manager configuration

    This section shows you how to set up a live streaming application in Wowza Streaming Engine™ Manager. Users play the live stream to view an event as it happens. Live streams are sent to the streaming engine from an encoder that delivers the stream in a compatible format. The example uses an application named live, which is included in default installations of Wowza Streaming Engine 4.0. If you want to create a new live streaming application, you can use this same procedure.

    1. Start Wowza Streaming Engine Manager.

    2. In the Streaming Engine manager Welcome page, click Applications at the top of the page.

    3. Configure the live application:

      1. In the contents pane, click live. (This example uses the installed live application. If you want to create a new live streaming application, Click Add, then Live, and then follow the instructions in the UI.)

      2. On the Setup tab, click Edit.


      3. Select the following Playback Types options: MPEG-DASH, Adobe HDS, Apple HLS, Microsoft Smooth Streaming, and RTSP/RTP. Accept the defaults for other settings.


      4. Click Save.

        The following alert will appear after every configuration change. Wait until all changes are complete before you restart.


    4. Configure outgoing (playback) authentication.

      1. In the contents pane, click Outgoing Security.

      2. Click Edit.


      3. Under Client restrictions, select No client restrictions.


      4. Click Save.

    5. Configure encoder publishing authentication.

      1. In the contents pane, click Incoming Security.

      2. Click Edit.


      3. Under RTSP Publishing, select Require password authentication.

      4. Under Client Restrictions, select No client restrictions.

      5. Click Save.

    6. Restart the application.



    The application runs whenever Streaming Engine software is running.

    Configuration in XML

    This section provides the basic steps for setting up an application for live streaming and for configuring Application.xml.

    Note: If you created your application as described in the previous section, skip this section. Earlier versions of the server software don’t support Wowza Streaming Engine manager, so you must edit Application.xml in a text editor. If you make changes to Application.xml and you’re using the Streaming Engine software, any supported settings will be displayed in the manager the next time it’s started.
    1. Create application folder [install-dir]/applications/live.

    2. Create configuration folder [install-dir]/conf/live and copy [install-dir]/conf/Application.xml to this new folder.

    3. Edit the newly copied Application.xml file and make the following changes (some of these settings may already be present):


      1. Set the Streams/StreamType property to:
        Code:
        <StreamType>live</StreamType>
      2. Set the HTTPStreamers property to:
        Code:
        <HTTPStreamers>cupertinostreaming, smoothstreaming, sanjosestreaming, mpegdashstreaming</HTTPStreamers>
      3. Set the Streams/LiveStreamPacketizers property to:
        Code:
        <LiveStreamPacketizers>cupertinostreamingpacketizer, smoothstreamingpacketizer, 
           sanjosestreamingpacketizer, mpegdashstreamingpacketizer, mpegdashstreamingrepeater 
           </LiveStreamPacketizers>
      4. Set the RTP/Authentication/PlayMethod property to:
        Code:
        <PlayMethod>none</PlayMethod>
    4. Using a text editor, edit the file [install-dir]/conf/admin.password and add a user name and password that will be used to start and stop the publishing of the stream (below is an example of the file with [publisherName] and [password]):
      Code:
      # Admin password file (format [username][space][password])
      # username password
      [publisherName] [password]
    5. Start the Streaming Engine software.


    Publishing the stream (native RTP encoder with SDP file)

    This section provides the basic steps for publishing your live stream to Wowza Streaming Engine.

    1. Consult your encoder documentation to configure an outgoing stream. Send it to the IP address of the server that is running Streaming Engine software.

    2. Use the encoder software or interface to generate an SDP file that describes the stream. Give it the name myStream.sdp and copy it to the [install-dir]/content folder on Wowza Streaming Engine.

    3. Use Stream Manager to start the stream:

      1. Enter the following URL in a web browser:

        URL: http://[wowza-ip-address]:8086/streammanager

      2. In the Security dialog box, enter your admin username and password from above.

      3. In the Stream Manager webpage, click the [start-receiving-stream] link just below the live application folder.

      4. In the Start Receiving Stream dialog box, select the following MediaCaster Type option: rtp.

      5. In the Stream Name field, enter myStream.sdp.

      6. Click OK.

    Playback


    There are test players online at www.wowza.com/testplayers.

    Example players

    You can also use example players installed in [install-dir]/examples/ to test your streaming applications. For more information see the following articles:


    Note: In the following examples, [wowza-ip-address] is the IP address or domain name of the server running Wowza Streaming Engine.
    Adobe Flash Player (RTMP)

    In Wowza 3.5.0 and later, double-click [install-dir]/examples/LiveVideoStreaming/FlashRTMPPlayer/player.html, enter the information below, and then click Connect.

    Server: rtp://[wowza-ip-address]/live
    Stream: myStream.sdp

    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 3.1.2 and earlier, double-click [install-dir]/examples/LiveVideoStreaming/client/live.html, enter the information below, and then click Play.
    Server: rtmp://[wowza-ip-address]/live
    Stream: myStream.sdp

    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 3.5.0 and later, double-click [install-dir]/examples/LiveVideoStreaming/FlashHTTPPlayer/player.html, enter the information below, and then click Connect.

    Stream: http://[wowza-ip-address]:1935/live/myStream.sdp/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 3.1.2 and earlier, double-click [install-dir]/examples/LiveVideoStreaming/clientOSMF/bin-release/LiveOSMFPlayer.html, enter the information below, and then click Play.
    Stream: http://[wowza-ip-address]:1935/live/myStream.sdp/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/myStream.sdp/playlist.m3u8
    Note: The Apple iPhone 3GS (and older) and iPod touch devices require that video be encoded using the 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 by using the Safari web browser or QuickTime 10.x on a computer that is running Mac OS X Snow Leopard version 10.6 and later.
    Microsoft Silverlight (Smooth Streaming)

    In Wowza 3.5.0 and later, double-click [install-dir]/examples/LiveVideoStreaming/SilverlightPlayer/player.html, enter the information below, and then click Connect.

    Stream: http://[wowza-ip-address]:1935/live/myStream.sdp/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 3.1.2 and earlier, double-click [install-dir]/examples/LiveVideoStreaming/clientSilverlight/Default.html, enter the information below, and then click Play.
    Stream: http://[wowza-ip-address]:1935/live/myStream.sdp/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/myStream.sdp

    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, 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:
    Code:
    <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>
    You can see that 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:
    Code:
    <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>
    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 stream rendition, not the server-side SMIL file that is shown in this tutorial. They both also use the BWCheck module.
    Adobe Flash Player (San Jose/Adobe HDS)

    In Wowza 3.5.0 and later, double-click [install-dir]/examples/LiveVideoStreaming/FlashHTTPPlayer/player.html, enter the information below, and then click Connect.

    Stream: http://[wowza-ip-address]:1935/live/smil:myStream.smil/manifest.f4m

    Note: In Wowza 3.1.2 and earlier, double-click [install-dir]/examples/LiveVideoStreaming/clientOSMF/bin-release/LiveOSMFPlayer.html, enter the information below, and then click Play.
    Stream: http://[wowza-ip-address]:1935/live/smil:myStream.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:myStream.smil/playlist.m3u8

    Microsoft Silverlight (Smooth Streaming)

    In Wowza 3.5.0 and later, double-click [install-dir]/examples/LiveVideoStreaming/SilverlightPlayer/player.html, enter the information below, and then click Connect.

    Stream: http://[wowza-ip-address]:1935/live/smil:myStream.smil/Manifest

    Note: In Wowza 3.1.2 and earlier, double-click [install-dir]/examples/LiveVideoStreaming/clientSilverlight/Default.html, enter the information below, and then click Play.
    Stream: http://[wowza-ip-address]:1935/live/smil:myStream.smil/Manifest

    By default, Microsoft Smooth Streaming inspects the stream and dynamically calculates video and audio bitrates for the manifest data, based on these readings. If you want to configure Wowza Streaming Engine 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>
    When running in this mode, Wowza Streaming Engine will assume that the video and audio system-bitrate values are for the video and audio data only.

    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 Streaming Engine, it's best to turn on dynamic stream markers, which will provide more accurate realtime 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 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, set the Streams/StreamType property to:
    Code:
    <StreamType>rtp-live</StreamType>
    If you do this, then you won't need to use StreamManager (see Publishing the stream). The first Flash client that plays the stream will trigger Wowza Streaming Engine to start re-streaming.

    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 Streaming Engine.

    To properly configure Wowza Streaming Engine for RTSP/RTP streaming, carefully follow the instructions provided in How to troubleshoot RTSP/RTP playback.

    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. For more information, see How to generate and control MPEG-TS output for set-top boxes.

    Property to change AAC packetization method

    Wowza Streaming Engine 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 4.0 on 03-10-2014.

    Comments 11 Comments
    1. lisa_w -
      Added note with required parameters for playback with Microsoft Silverlight (Smooth Streaming). -Lisa
    1. Lime2404 -
      Hi dear wowza team! I've encountered with following trouble. According the Adaptive Bitrate Streaming algorytm I generate smil file and two .sdp files (1000kbps and 1500kbp/s streams) Then I start live streaming using following URL: http://10.10.30.129:1935/live/smil:m.../playlist.m3u8 but can't playback m3u8 playlist using my iPhone3G. It says, that operation is failed. However when I just try to playback video using following url: http://10.10.30.129:1935/live/myStre.../playlist.m3u8 , it was successful. Please, help me to find the mistake I made.
    1. randall -
      Hi Lime2404,

      Let's figure this out. So, you can play the stream directly, but the .smil file is not working. Try to provide more info:

      1. Post your .smil file.
      2. Any error messages? Post the relevant excerpts from your Wowza logs/console when you try to play the smil.
    1. Lime2404 -
      Sure. Here is the arhive with screenhots and smil file https://members.elecard.ru/dl/didpbr...99/myStreaming Lime2404.zip There is the warning server comment "Stream not found" look the screenhot "statistic when try to playback adaptive video streaming by IPhone 2" Unfortunatelly I can't just click on console window to select all and copy paste it here Thank you for your support
    1. Lime2404 -
      Sorry, here is the link https://members.elecard.ru/dl/bqebfl...g_Lime2404.zip
    1. Lime2404 -
      I have also a question. As I know, when WOWZA is receiving streams from any net renderer it should generate(save) 3 or 6 trimmed sample of received video on server storage for further broadcasting. After any receiving player will decode these samples, WOWZA is update trimmed video samples on next 3 or 6. Is it correct? Where can I find these sample video streams?
    1. arouaoui.med@hotmail.fr -
      Hi all
      i want to know if i want to manage many streams im obliged to create a sdp file for any streams or one sdp file can manage all streams if is the last how can i distingte between the streams
    1. rrlanham -
      Hi,

      You must use one sdp for each stream

      Richard
    1. arouaoui.med@hotmail.fr -
      thk you very match Richard
      but how can i send many streams and distinct between the sdp reciveres ???
      for exemple this sdp file in this form

      v=0
      s=Unnamed
      m=video 5004 RTP/AVP 96
      a=rtpmap:96 H264/90000
      a=fmtp:96 packetization-mode=1;profile-level-id=420016;sprop-parameter-sets=Z0IAFukBQHsg,aM4BDyA=;

      What I need to change to specify the rtp source ??
      Note (i use rtplive application )
    1. rrlanham -
      Perhaps this is what you mean:

      http://www.wowza.com/forums/content....tify-interface

      If so, there is nothing to do in the sdp file, the stream contains multiple tracks.

      Richard
    1. ChetanJoshi -
      Hi,
      I'm publishing stream using mystream.sdp,but not able to play the video at client side.Please help.

      Thanks,
      Chetan