Stream using a CMAF live stream repeater in Wowza Streaming Engine

Stream using a CMAF live stream repeater (origin/edge) configuration in Wowza Streaming Engine™ media server software version 4.7.8 or later. A live stream repeater uses origin and edge servers to deliver a live stream at scale to viewers. 

Notes:

Configure origin/edge applications in XML


Configure CMAF live stream repeater applications on the origin and edge servers.

Configure the CMAF live application on the origin server 

  1. On the origin server, create the application folder [install-dir]/applications/liveorigin.
     
  2. Create the configuration folder [install-dir]/conf/liveorigin and copy [install-dir]/conf/Application.xml to this new folder.
     
  3. Open the newly copied Application.xml file in a text editor and set the StreamType property to live:
    <StreamType>live</StreamType>
  1. Add cmafstreamingpacketizer to the LiveStreamPacketizers property. You can add it to the prepopulated comma-separated list, or you can add it as the only packetizer specified. For a workflow that only delivers only CMAF streams, the XML looks like this:
<Streams>
    ...
    <LiveStreamPacketizers>cmafstreamingpacketizer</LiveStreamPacketizers>
    ...
</Streams>
  1. (Optional) If you want to enable playback from the origin server, set the HTTPStreamers property, to one or both of the following playback types you'd like to use: HLS (cupertinostreaming) and MPEG-DASH (mpegdashstreaming). If using both, the XML looks like this:
<HTTPStreamers>cupertinostreaming, mpegdashstreaming</HTTPStreamers>
  1. Save your changes.
  1. Edit the [install-dir]/conf/publish.password file and add a publisher user name and password that will be used to control RTMP and RTSP publishing access. The following example shows the file with myPublisherName and myPassword:
    # Publish password file (format [username][space][password])
    # username password
    myPublisherName myPassword
  2. Restart Wowza Streaming Engine.

Configure the edge server(s)

Perform the following steps on each edge server:

  1. Create the application folder [install-dir]/applications/liveedge.
     
  2. Create the configuration folder [install-dir]/conf/liveedge and copy [install-dir]/conf/Application.xml to this new folder.
     
  3. Open the newly copied Application.xml file in a text editor and set the StreamType property to liverepeater-edge:
    <StreamType>liverepeater-edge</StreamType>
  4. Specify the cmafstreamingrepeater repeater packetizer on each Wowza Streaming Engine edge server. This enables CMAF live stream repeater for iOS-based devices and DASH-compatible players.

    To specify the repeater packetizer, add cmafstreamingrepeater to the Streams/LiveStreamPacketizers list in /conf/liveedge/Application.xml:
    <LiveStreamPacketizers>cmafstreamingrepeater</LiveStreamPacketizers>
  5. For the HTTPStreamers property, specify one or both of the following playback types you'd like to use: HLS (cupertinostreaming) and MPEG-DASH (mpegdashstreaming). If using both, the XML looks like this:
    <HTTPStreamers>cupertinostreaming, mpegdashstreaming</HTTPStreamers>
    
  6. Locate the Repeater/OriginURL element and add the origin server URL.
    <Repeater>
        <OriginURL>wowz://[wowza-origin-address]:1935/liveorigin</OriginURL>
        <QueryString><![CDATA[]]></QueryString>
    </Repeater>

    For redundancy, you can define multiple Wowza Streaming Engine origin servers for a single stream by specifying two origin URLs separated by the pipe ( | ) character. For example:
    <Repeater>
        <OriginURL>wowz://[wowza-origin-address]:1935/liveorigin|wowz://[wowza-alternate-origin-address]:1935/backuporigin</OriginURL>
        <QueryString><![CDATA[]]></QueryString>
    </Repeater>

    All origin URLs must use the wowz, wowzs, rtmp, or rtmps prefix.
  7. Restart Wowza Streaming Engine.

Important: If you use wowzs to address the origin server, be aware of the following requirements for SSL encryption:

  • The SSL certificate must be from a certificate authority (see Request an SSL certificate for Wowza Streaming Engine from a certificate authority). Self-signed certificates aren't supported. Wowza StreamLock™ certificates are fully supported (see Get SSL certificates for Wowza Streaming Engine from the StreamLock service).
  • You must specify the domain name when addressing the origin server. The origin IP address can't be used.
  • If you don't specify a port value when addressing the origin server, port 443 is used.
  • The live stream repeater will fail to connect to a non-SSL-protected destination port on the origin server. It will repeatedly try to connect. Connection failures like the following will be reported in the Wowza Streaming Engine logs:

    WARN server comment - LiveMediaStreamReceiver.secureConnectionValidation: SSL Connection was not established: wowzs://[wowza-ip-address]:1935/live/_definst_/myStream

The above setup defines a single Wowza Streaming Engine origin server per-application. Each stream that's played through that application uses the OriginURL value to locate the Wowza Streaming Engine origin server for the stream.

Notes:
  • If the primary Wowza Streaming Engine origin server fails, clients may experience up to a 12-second timeout before failover to the backup origin server is completed. Use the above method only for failover purposes.
     
  • WOWZ is a TCP-based messaging protocol is used for Wowza Streaming Engine server-to-server communication. It's enabled by default. If one of the Wowza Streaming Engine servers in the origin/edge configuration is running an earlier version of the software, an RTMP connection is established between the servers instead.
     
  • The origin server must have the Adobe RTMP playback type enabled so that edge server(s) can connect using WOWZ, WOWZS, RTMP or RTMPS.

Connect a live source to Wowza Streaming Engine


Complete the source stream setup by connecting a source encoder or IP camera to the liveorigin application on the origin server. Although you enabled CMAF packetization in the Application.xml configuration file, your liveorigin application is available in Wowza Streaming Engine Manager, where you can establish a connection to a live source.

  1. In Wowza Streaming Engine Manager, click Applications in the menu bar and select your live application in the contents panel.
  2. Click Sources (Live) in the contents panel.
  3. Select the encoder or camera you want to use as your source. Click Learn more under any tile for detailed instructions on how to connect that encoder or camera, including how to configure source authentication.

If your encoder or camera isn't listed, click Other Encoders or use the Application Connection Settings in the Help panel to publish the stream to Wowza Streaming Engine. For more information about how to enter the connection settings in your source encoder or camera, consult that device or software's documentation. These articles may also help:

When the camera or encoder is connected and the live stream is active, preview CMAF playback using a supported test player.

Test playback from a CMAF live stream repeater


Test CMAF HLS stream playback

To test CMAF-packetized HLS live streams generated from CMAF live repeater applications, use the Akamai HLS test player.

Specify the stream playback URL using the format: 

http://[wowza-edge-address]:[port]/[application]/[application-instance]/[stream-name]/playlist.m3u8

Where:

  • [wowza-edge-address] is the IP address or domain of the Wowza Streaming Engine edge server (default port 1935)
  • [application] is the application name
  • [application-instance] is the name of the application instance (if omitted, defaults to _definst_)
  • [stream-name] is the stream name

For example, the playlist URL for a CMAF HLS stream that uses the Wowza Streaming Engine edge server address mycompany.com/edge, the default liveedge application, and the default stream name myStream is:

http://mycompany.com/edge:1935/liveedge/myStream/playlist.m3u8

Note: You can also test playback from the origin server by substituting [wowza-origin-address]  and liveorigin in the playback URLs.

Test CMAF MPEG-DASH stream playback

To test CMAF-packetized MPEG-DASH live streams generated from CMAF live repeater applications, you can use the the example player that installs with Wowza Streaming Engine for testing live MPEG-DASH streams, or you can use the MPEG-DASH test player in Wowza Streaming Engine Manager. The players are interchangeable; they’re both based on the Shaka Player library.

Note: Alternatively, you can test CMAF DASH playback using Akamai's DASH.js test player.

  1. Open the Wowza Streaming Engine DASH test player of your choice by doing one of the following:
     
    • Navigate to [install-dir]/examples/LiveVideoStreaming/MPEGDASHPlayer and double-click player.html.
    • On the Home page of Wowza Streaming Engine Manager, click Test Players, and then click the MPEG DASH tab of the Test Players window.
  2. In the Stream field, enter the CMAF DASH playback URL for your stream using the format:

http://[wowza-edge-address]:[port]/[application]/[application-instance]/[stream-name]/manifest.mpd

Where:

  • [wowza-edge-address] is the IP address or domain of the Wowza Streaming Engine edge server (default port 1935)
  • [application] is the application name
  • [application-instance] is the name of the application instance (if omitted, defaults to _definst_)
  • [stream-nameis the stream name

For example, the playback URL for an MPEG-DASH stream that uses the Wowza Streaming Engine edge server address mycompany.com/edge, the default liveedge application, and the default stream name myStream is: 

http://mycompany.com/edge:1935/liveedge/myStream/manifest.mpd 

  1. Click Start.

Secure encryption keys for MPEG-DASH CENC live repeater


Wowza Streaming Engine supports MPEG-DASH streaming in a live repeater configuration. Common Encryption (CENC) can be applied to CMAF MPEG-DASH streams.

When MPEG-DASH streams are encrypted with CENC in a live repeater configuration, the origin instance is configured to acquire the encryption keys, and the DASH chunks are built and encrypted on the edge instances. This requires that the AES-128 encryption keys used in the CENC encryption are sent from the origin to the edge instances. Wowza Streaming Engine performs an extra encryption on the key information to secure this transmission, using the liveRepeaterEncryptionSharedSecret property. This property provides a unique encryption key for each stream served by the origin. The default shared secret can be used, or you can define your own Custom Property on the application properties page.

Add the shared secret property using the XML configuration

  1. Go to [install-dir]/conf/liveorigin/.
     
  2. Open Application.xml in a text editor.
     
  3. In the child element Properties of the Application element, add the liveRepeaterEncryptionSharedSecret property.
    <Property>
        <Name>liveRepeaterEncryptionSharedSecret</Name>
        <Type>String</Type>
        <Value>[mySecret]</Value>
    </Property>
  4. Restart Wowza Streaming Engine.
     
  5. Repeat these steps on each Wowza Streaming Engine edge server (using the XML file in the liveedge directory).

More resources