Stream using CMAF with Wowza Streaming Engine

Wowza Streaming Engine™ media server software version 4.7.8 and later can deliver live streams using CMAF, the open, extensible standard that allows streams to be played over both the HLS and MPEG-DASH protocols. CMAF is disabled by default. CMAF live streams must be enabled manually, by editing an application's configuration in XML.

Configure a live application to deliver CMAF streams


You can use the default live application that installs with Wowza Streaming Engine, or create and use a custom live application.

Note: If you're trying to use the CMAF packetizer to deliver LL-HLS and HLS or MPEG-DASH streams, you must use two separate live applications in Wowza Streaming Engine: one configured specifically for LL-HLS and another for CMAF-packetized HLS and MPEG-DASH.

(Optional) Create a custom live application

Although all of the new files and folders must be in place for your custom live application, to enable CMAF live streaming, all you need to edit is the application's XML configuration file.

Configure the live application's setup in XML

  1. Navigate to [install-dir]/conf/live or [install-dir]/conf/[custom live application] and open Application.xml file in a text editor.
  2. In the <Streams> container element, make sure the <StreamType> property is live. The XML looks like this:
<Streams>
    ...
    <StreamType>live</StreamType>
    ...
</Streams>
  1. Add cmafstreamingpacketizer to the <LiveStreamPacketizers> property. You can add it to the prepopulated comma-separated list, or it can be the only packetizer specified. For a workflow that only delivers only CMAF streams, the XML looks like this:
<Streams>
    ...
    <LiveStreamPacketizers>cmafstreamingpacketizer</LiveStreamPacketizers>
    ...
</Streams>
  1. For the HTTPStreamers property, make sure both HLS (cupertinostreaming) and MPEG-DASH (mpegdashstreaming) are specified. The XML looks like this:
<HTTPStreamers>cupertinostreaming, mpegdashstreaming</HTTPStreamers>
  1. Save your changes.

Your live application is configured to deliver CMAF streams to players. If desired, you can edit the packetization properties. For information, see Configure CMAF live streaming packetization in Wowza Streaming Engine. Otherwise, connect your source encoder to Wowza Streaming Engine and publish the live stream.

Note: If you enable cupertinostreamingpacketizer and cmafstreamingpacketizer, Wowza Streaming Engine generates both MPEG-TS segments (using cupertinostreamingpacketizer) and fMP4 segments (using cmafstreamingpacketizer).

Enabling mepgdashstreamingpacketizer and cmafstreamingpacketizer is valid but redundant, as both create fMP4 segments. If both are defined in Application.xml, Wowza Streaming Engine ignores mpegdashstreamingpacketizer and produces one set of fMP4 segments using cmafstreamingpacketizer.

Connect a live source to Wowza Streaming Engine


After your live application is configured to deliver CMAF streams, complete the stream setup by connecting a source encoder or IP camera to Wowza Streaming Engine and publishing the live source stream to the server. Although you enabled CMAF packetization in the Application.xml configuration file, your live 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 stream playback


Test CMAF HLS stream playback

To test CMAF-packetized HLS live streams generated by Wowza Streaming Engine, use the Akamai HLS test player.

If only cmafstreamingpacketizer is enabled, specify the stream playback URL using the format: 

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

If cmafstreamingpacketizer and cupertinostreamingpacketizer are enabled, use the format:

http://[wowza-ip-address]/[application]/[application-instance]/[stream-name]/playlist_sfm4s.m3u8

Where:

  • [wowza-ip-address] is the IP address or domain and port of Wowza Streaming Engine (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

So, for example, if only cmafstreamingpacketizer is enabled, the playlist URL for a CMAF HLS stream that uses the address mycompany.com, the default live application, and the default stream name myStream is:

http://mycompany.com:1935/live/myStream/playlist.m3u8

If cmafstreamingpacketizer and cupertinostreamingpacketizer are enabled, the CMAF HLS playlist URL for the same example is:

http://mycompany.com:1935/live/myStream/playlist_sfm4s.m3u8

Test CMAF MPEG-DASH stream playback

To test CMAF-packetized MPEG-DASH live streams generated by Wowza Streaming Engine, you can use 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 the Akamai DASH.js test player. Wowza Player does not support MPEG-DASH.

  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-ip-address]/[application]/[application-instance]/[stream-name]/manifest.mpd

Where:

  • [wowza-ip-address] is the IP address or domain and port of Wowza Streaming Engine (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 address mycompany.com, the default live application, and the default stream name myStream is: 

http://mycompany.com:1935/live/myStream/manifest.mpd 

  1. Click Start.

More resources