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 can be enabled in Wowza Streaming Engine Manager or by editing an application's configuration in XML.

Configure a live application to deliver CMAF streams in Wowza Streaming Engine Manager


Use the following steps to configure a live application to deliver a CMAF stream in Wowza Streaming Engine Manager.

  1. In Wowza Streaming Engine Manager, click Applications in the top navigation menu.
  2. In the Applications contents panel, select the name of your live application.
  3. Go to the Setup tab for your live application and click Edit.
  4. From the Playback Types section, you must select MPEG-DASH and/or Apple HLS.

  1. From the CMAF Packetizer section, click the CMAF option. This enables the CMAF packetizer for your live stream and packages the stream for playback over the Apple HLS and MPEG-DASH protocols. With this setting enabled, these CMAF packetization properties are selected by default.
  2. Save your changes.

Note: When you use Wowza Streaming Engine Manager to enable the CMAF packetizer, you can't use the Apple HLS and MPEG-DASH packetizers at the same time. You must create a separate application to use those packetizers for your live stream.

Configure a live application to deliver CMAF streams using XML


Use these steps to configure a live application to deliver a CMAF stream using an Application.xml file.

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.

  1. Navigate to [install-dir]/conf/[application-name] and open Application.xml file in a text editor.
  2. In the <Streams> container element, make sure the <StreamType> property is live.
<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 CMAF streams, the XML looks like this:
<Streams>
    ...
    <LiveStreamPacketizers>cmafstreamingpacketizer</LiveStreamPacketizers>
    ...
</Streams>
 

Note: When you use the Application.xml to enable the CMAF packetizer, you aren't able to use the MPEG-DASH packetizer at the same time.

  1. For the HTTPStreamers property, make sure HLS (cupertinostreaming) and/or MPEG-DASH (mpegdashstreaming) is specified.
<!--For HLS-->
<HTTPStreamers>cupertinostreaming</HTTPStreamers>

<!--For MPEG-DASH-->
<HTTPStreamers>mpegdashstreaming</HTTPStreamers>

<!--For HLS and MPEG-DASH-->
<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 mpegdashstreamingpacketizer and cmafstreamingpacketizer at the same time is not recommended and may cause unexpected results.

Test stream playback


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

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://[address]/[application-name]/[application-instance]/[stream-name]/playlist.m3u8

If cmafstreamingpacketizer and cupertinostreamingpacketizer are enabled, use the format:

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

Where:

  • [address] is the IP address or domain and port of Wowza Streaming Engine (default port 1935)
  • [application-name] 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 example.com, an application named myApplication, and the default stream name myStream is:

http://example.com:1935/myApplication/myStream/playlist.m3u8

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

http://example.com:1935/myApplication/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 MPEG-DASH test player on the Video Test Players webpage, which is based on the Shaka Player library.

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

  1. On the Video Test Players webpage, click the MPEG-DASH tab.
  2. Enter the CMAF DASH playback URL for your stream using the format:

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

Where:

  • [address] is the IP address or domain and port of Wowza Streaming Engine (default port 1935)
  • [application-name] 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 example.com, an application named myApplication, and the default stream name myStream is: 

http://example.com:1935/myApplication/myStream/manifest.mpd 

  1. Click Start.

More resources