• How to re-stream an unprotected stream from Adobe Media Server or a CDN

    This tutorial provides the basic steps for re-streaming an Adobe Media Server stream that supports H.264 and AAC through Wowza Media Server®. Use this tutorial to set up an application named live to stream live content to Adobe® Flash® Player, Microsoft® Silverlight® player, Apple® iOS devices, and RTSP/RTP-based players.

    Contents



    Tutorial


    Troubleshooting


    Related Articles


    Tutorial



    Configuration


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

    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</HTTPStreamers>
      3. Set the Streams/LiveStreamPacketizers property to:
        Code:
        <LiveStreamPacketizers>cupertinostreamingpacketizer,smoothstreamingpacketizer,sanjosestreamingpacketizer</LiveStreamPacketizers>
      4. Set the RTP/Authentication/PlayMethod property to:
        Code:
        <PlayMethod>none</PlayMethod>
      5. Add the following property to the MediaCaster/Properties container (be sure to get the correct <Properties> container, there are several in the Application.xml file):
        Code:
        <Property>
        	<Name>callFCSubscribe</Name>
        	<Value>true</Value>
        	<Type>Boolean</Type>
        </Property>


    Publishing the stream


    This section provides the basic steps for creating a .stream file to publish your live stream to Wowza Media Server.

    1. Use a text editor to create the file [install-dir]/content/rtmp.stream and set the contents of this file to the full RTMP URL of the stream that you want to re-stream (for example: rtmp://cp12345.live.edgefcs.net/live/myStream@2440). The file must have a .stream filename extension.

    2. Using a text editor, edit the file [install-dir]/conf/admin.password and add a username and password that will be used to start and stop the publishing of the 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
    3. Start Wowza Media Server.

    4. 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: liverepeater

      5. In the Stream Name field, enter rtmp.stream.

      6. Click OK.


    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: rtmp.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.

    Server: rtmp://[wowza-ip-address]/live
    Stream: rtmp.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/rtmp.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.

    Stream: http://[wowza-ip-address]:1935/live/rtmp.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/rtmp.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/rtmp.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.

    Stream: http://[wowza-ip-address]:1935/live/rtmp.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/rtmp.stream

    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>
    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 Media Server 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 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 rtmp.stream filename. This will result in an error message similar to the following:

    SDP file missing: c:/program files/wowzamediasystems/wowzamediaserver[version]/content/rtmp.stream

    To fix this, go to the [install-dir]/content folder and remove the .txt filename extension from the file.

    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>




    Comments 4 Comments
    1. ianbeyer -
      make sure that in rtmp.stream you put a newline character at the end of the URL, otherwise it will throw an UnresolvedAddressException.
    1. jacreater -
      I read the playlist.m3u8 file and have a question. Can I download the ts file from wowza server like media_19.ts?wowzasessionid=1735878375?
      And what's the useful of wowzasessionid parameter?
    1. rrlanham -
      wowzasessionid is used for managing a session and logging.

      You can download a ts file, follow these example steps

      Download:
      http://localhost:1935/vod/_definst_/.../playlist.m3u8

      Open the downloaded playlist.m3u8 file. You will see a URL like this:
      http://localhost:1935/vod/sample.mp4...nid=1447208153

      Then change "playlist.m3u8" to "media_1.ts", like this:
      http://localhost:1935/vod/sample.mp4...nid=1447208153

      Then you can download the above ts file, in this case the first one "media_1.ts". You can play this file in VLC.

      To see all the ts files in the playlist, use the url in the first playlist:
      http://localhost:1935/vod/sample.mp4...nid=1447208153

      Another playlist.m3u8 file will download which lists all the ts files being sent to the client.

      This works the same for live stream.

      Richard
    1. lisa_w -
      Added note with required parameters for playback with Microsoft Silverlight (Smooth Streaming). -Lisa