• How to set up live streaming using an RTMP-based encoder

    This tutorial provides the basic steps that show how to use Wowza Streaming Engine™ software to publish a live stream from RTMP-based encoders for playback on all supported player technologies.

    Contents


    Tutorial
    Configuration
    Publishing the stream
    Playback
    Adaptive bitrate streaming

    Troubleshooting
    RTSP/RTP
    Property to force output to MPEG-TS (set-top box)
    Property to change the AAC packetization method

    Related Articles
    How to play your first live stream (video tutorial)
    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 live streaming. Wowza Streaming Engine software administrators can configure live streaming applications by using UI options in Wowza Streaming Engine Manager or by setting properties in Application.xml. Both configuration methods have the same result. Wowza Media Server® software administrators must configure live streaming applications in the Application.xml file.

    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 Wowza Streaming Engine software installations. If you want to create a new live streaming application, you can use this same procedure.

    You can use Streaming Engine Manager with the latest versions of most web browsers that support HTML5 and Cascading Style Sheets level 3 (CSS 3). We recommend the Google Chrome browser.

    1. Start Wowza Streaming Engine Manager.

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

    3. Configure the live application:

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


      2. Select all of the Playback Types, and then click Save.



        The following alert appears after every configuration change. You can wait until all changes are completed before you restart.


    4. Configure outgoing (playback) authentication:

      1. In the contents pane, click Outgoing Security, and then click Edit.


      2. Under Client restrictions, select No client restrictions, and then click Save.

    5. Configure encoder publishing authentication:

      1. In the contents pane, click Incoming Security, and then click Edit.


      2. The Incoming Security page is displayed. Configure the following options, and then click Save.

        • Under RTMP Publishing, select Require password authentication.

        • Under Client Restrictions, select No client restrictions.


      3. Restart the application.


      The application runs whenever Wowza Streaming Engine software is running.

    6. Configure the publisher name and password to publish to this application:

      1. In the Server contents pane, click Publishers, and then click Add Publisher.


      2. In Publishers page, enter values for Publisher Name and Password, and then click Add.


    XML configuration


    This section shows you how to configure the live application by editing the Application.xml configuration file in a text editor.

    Note: If you created your application by following the previous section, skip this section. If you make changes to Application.xml and you're using the Wowza Streaming Engine™ software, any supported settings will be displayed in the manager the next time it's started. Wowza Media Server® software doesn't support Wowza Streaming Engine Manager, so you must edit Application.xml in a text editor if you're running Wowza Media Server.
    1. Create the application folder [install-dir]/applications/live.

    2. Create the 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</LiveStreamPacketizers>
      4. Set the RTP/Authentication/PlayMethod property to:
        Code:
        <PlayMethod>none</PlayMethod>
    4. Edit the [install-dir]/conf/publish.password file and add a publisher name and password that will be used to control RTMP publishing access. Following is an example of the file with the publisher name publisherName and a password:
      Code:
      # Publish password file (format [username][space][password])
      # username password
      publisherName [password]
    5. Start the Wowza server.

    Publishing the stream

    In your encoder, enter the following information, and then click Publish or Start:

    Server URL: rtmp://[wowza-ip-address]/live
    Stream Name: myStream
    User: publisherName
    password: [password]

    Note: The steps for publishing a stream from your encoder to Wowza Streaming Engine software will vary depending on the encoder that you are using. For more information about how to configure your encoder, see Specific Encoding Technologies in the Wowza forum or the documentation for your encoder.

    Playback

    Note: In the following examples, [wowza-ip-address] is the IP address or domain name of the Wowza server.

    Wowza Streaming Engine Manager


    In Streaming Engine Manager, click Test Players in the upper-right corner of the live application page. The Test Application window that opens includes test players that are preconfigured to stream the live stream named myStream over various streaming formats.

    Each tab in the Test Application window either hosts a test player that you can use to play the live stream or provides instructions for playing the live stream. For example, to use the Adobe HDS protocol to play myStream, click the Adobe HDS tab, and then click Start.



    The test players are also 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:


    Adaptive bitrate streaming

    Adaptive bitrate (ABR) live streaming to Adobe Flash Player, Apple iOS devices, Microsoft Silverlight, and MPEG-DASH players require 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 more information, see How to do adaptive bitrate streaming.

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

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

    Property to force output to MPEG-TS (set-top box)

    When you use 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 How to generate and control MPEG-TS output for set-top boxes.

    Property to change the AAC packetization method

    Streaming Engine software can use the mpeg4-generic and mp4a-latm (3gpp) packetization methods to output AAC audio. The default packetization method is mpeg4-generic.

    Wowza Streaming Engine Manager configuration


    To switch to mp4a-latm (3gpp), do the following:

    1. In the Streaming Engine Manager contents pane, click live.

    2. On the live application page Properties tab, click Custom in the Quick Links bar or scroll to the bottom of the page.

      Note: Access to the Properties tab is limited to administrators with advanced permissions. For more information, see Managing Sign-In credentials.
    3. In the Custom area, click Edit.

    4. Click Add Custom Property, and then do the following:

      1. Add the audioPacketizerAAC property with the following values:

        • Path: Select /Root/Application/RTP.

        • Name: Enter audioPacketizerAAC.

        • Type: Select String.

        • Value: Enter com.wowza.wms.rtp.packetizer.RTPPacketizerMPEG4LATM.

      2. Click Add.

    5. On the Properties tab, click Save.

    6. Click Restart in the upper-right corner of the live application page to restart the application.

    XML configuration


    To switch to mp4a-latm (3gpp), add the following property to the RTP/Properties container in [install-dir]/[application]/Application.xml (be sure to use 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 Streaming Engine 4.0 on 03-10-2014

    Comments 68 Comments
    1. mwolffs -
      Are these instructions assuming the source of the stream is colocated with the wowza server (on the same box)?

      If this is not the case, what would be the modifications?
    1. ianbeyer -
      No, the source of the stream would generally not be on the same box.

      If it is, you'd just use the localhost address to publish.
    1. cnynracer1 -
      If I am understanding this correctly, this eliminates the need for complex transcoding solutions such as http://tinyurl.com/2a8o9f7. Is that correct?

      Does the source need to be H.264. We are trying to re-stream from a webcam (Flash player encoder) to all of these sources (cuppertino, rtsp).

      Thank you.
    1. rogerlittin -
      The encoder built into Flash player doesn't do H.264 so the streams produced will only work to other flash players. There is a browser plugin available to stream you webcam in H.264 using a Flash player to control it. http://www.nanocosmos.de/
    1. cnynracer1 -
      Thanks Roger. Yes I understand Flash player doesn't encode in H.264, but I am curious if we can do this without asking our users to download a plugin such as this.
    1. rogerlittin -
      Encoding is very cpu intensive so anything that runs on the client would have to be downloaded. To do it on the server you would need a lot of resources available to do the transcoding and would only be able to handle a few streams at the same time.
    1. shthap3ns -
      I'm noticing that the multi-bitrate live streaming instructions are saying to use the /vod application. Is that correct? How do we access a multi bitrate live stream using live repeater origin/edge?
    1. rrlanham -
      I updated the Live tutorial to use application named "live" instead of "vod". It was a mistake, thanks for pointing that out. Of course the application name is arbitrary, what matters is the Application.xml StreamType.

      To do multi-bitrate on a edge server, create smil file in the edge content folder, something like
      Code:
      <smil>
      	<head>
      	</head>
      	<body>
      		<switch>
      			<video src="origin1.stream" system-bitrate="200000"/>
      			<video src="origin2.stream" system-bitrate="500000"/>
      		</switch>
      	</body>
      </smil>
      Where origin1.stream and origin2.stream are text files in the edge content folder (alongside the smil) that contain the full url to the origin stream, something like:
      Code:
      rtmp://[wowza-origin-address]/live/myStream1
      If you are doing HTTP streaming (Cupertino, Smooth or Sanjose), or the origin stream is a MediaCaster type (e.g., a rtsp stream from an IP camera), then use StreamManager or /conf/StartUpStreams.xml on the edge to start the streams (origin1.stream and origin2.stream) with MediaCaster Type "liverepeater".

      Richard
    1. latalata -
      workiing with adobe media encoder? for me not working.
    1. latalata -
      Apple iphone, Can it use another port? or only 1935
      Ex: http://&#91;wowza-address]:5000/live/myS.../playlist.m3u8
    1. charlie -
      You can use port 80 (which is the default) port. Edit [install-dir]/VHost.xml and add 80 to the list of HostPort/Ports. Be sure to re-start Wowza and that you are not running a web server on the same machine.

      Charlie
    1. benbiles -
      I can use this player fine to play fmle rtmp stream

      [install-dir]/examples/LiveVideoStreaming/clientSilverlight/Default.html

      Is there a normal player other than this that will work for live streams?

      JWplayer not working., Expressions player templates not working.,

      Is it possible to edit the example player and make a normal unbranded player?

      Or is silverlight just not really working yet for live streaming?
    1. rrlanham -
      The key frame interval must be between 1 and 4 seconds. 2 seconds is best. Click the wrench icon next to "h.264" setting. The default is 5 seconds and that will not work in Silverlight.

      Also make sure you have an audio track. Video without audio is unreliable. Audio without video does not work at all.

      Richard
    1. latalata -
      got to work with android, flash, iphone but I can not work with the black berry 554 use port 32 kbs aac Any help?
    1. nublaii -
      I am only planning on offering a live stream for flash players and iOS. Do I still need to add all the packetizers?, like

      <HTTPStreamers>cupertinostreaming,smoothstreaming,sanjosestreaming</HTTPStreamers>

      Or can I just put

      <HTTPStreamers>cupertinostreaming</HTTPStreamers>

      Can I safely omit all the packetizers if I am setting up a repeater?
    1. rrlanham -
      You can remove those if you are not going to use. For live, you need to configure Application.xml /Streams /LiveStreamPacketizers. See this post, at bottom shows what live packetizers you need for origin and edge.
      http://www.wowzamedia.com/forums/con...er-Quick-Start

      Richard
    1. digitalfin -
      Does the publish.password file only support one pair of username/password or as many as we need?
    1. rrlanham -
      You can have many lines, no practical limit that I know of. One username password per line.

      Richard
    1. phattran911 -
      For dynamic streaming, does the FMLE need to publish multiple bitrate live stream to wowza servers? I don't see such option in the FMLE so I guess not.
    1. rrlanham -
      FMLE interface allows you to enter multiple bitrate definitions, it's in the lower-left, you have to check a box for each added. Then you have to add "%i" to the stream name, e.g., "myStream%i". Then FMLE will publish myStream1, myStream2, etc..

      Richard