Deliver Low-Latency HLS live streams using Wowza Streaming Engine

Wowza Streaming Engine™ media server software version 4.7.8 and later can deliver Low-Latency HLS (LL-HLS) live streams. Low-Latency HLS streams conform to Apple’s preliminary protocol extension to the HLS spec.

About Low-Latency HLS streams


Wowza Streaming Engine generates Low-Latency HLS streams using the CMAF packetizer, cmafstreamingpacketizer. The packetizer creates the partial segments needed for LL-HLS. The LL-HLS streams use the fMP4 container format and are delivered to players over HTTP/2.

Note: In order to generate an LL-HLS streams you must first get a SSL certificate to secure your port and configure the port for HTTPS playback. LL-HLS playback does not work without an SSL secured port. For information on how to do this, refer to How to Get an SSL Certificate from the Streamlock Service.

To deliver LL-HLS streams from Wowza Streaming Engine you have to manually enable low latency CMAF packetization for live streaming, in the application, by editing the application's configuration in XML.

Note: LL-HLS streams don't support HLS sources ingested using MediaCaster.

Configure a live application to deliver LL-HLS 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: 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 LL-HLS 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 the 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. The XML looks like this:
<Streams>
    ...
    <LiveStreamPacketizers>cmafstreamingpacketizer</LiveStreamPacketizers>
    ...
</Streams>
  1. Add the cmafLLEnableLowLatency property to the LiveStreamPacketizer element and set it to true.
<LiveStreamPacketizer>
    <Properties>
        <Property>
            <Name>cmafLLEnableLowLatency</Name>
            <Value>true</Value>
            <Type>Boolean</Type>
        </Property>
    </Properties>
</LiveStreamPacketizer>
  1. For the HTTPStreamers property, make sure HLS (cupertinostreaming) is specified. The XML looks like this:
<HTTPStreamers>cupertinostreaming</HTTPStreamers>
  1. Go to [install-dir]/conf/  and open the VHost.xml file in a text editor.
  2. Add the AllowHttp2 parameter to the SSLConfig element and set it to true.
<SSLConfig>
    ...
    <AllowHttp2>true</AllowHttp2>
    ...
</SSLConfig>
  1. Save your changes.

Your live application is configured to deliver LL-HLS streams. If desired, you can edit optional CMAF packetization properties. For information, see Configure CMAF live streaming packetization in Wowza Streaming Engine. You can also edit optional packetization properties to customize the low latency chunks generated by the cmafstreamingpacketizer.

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

Configure optional low latency partial segment properties


Low latency CMAF property reference

You can configure any of these optional properties for the low latency chunks. These chunks, generated by the cmafstreamingpacketizer, are used as partial segments in the LL-HLS streams.

Name Type Description
cmafLLChunkingScheme String A value that specifies the chunking scheme for low latency CMAF-packetized streams. Valid values are byFrame or byDuration. The default is byFrame.

If the value is byFrame, packetization is configured using the cmafLLChunkFrameCountTargetAudio and 
cmafLLChunkFrameCountTargetVideo properties.

If the value is byDuration, packetization is configured using the cmafLLChunkDurationTargetAudio and
cmafLLChunkDurationTargetVideo properties.
cmafLLChunkFrameCountTargetAudio Integer

Specifies the number of audio frames to include in each low latency CMAF audio chunk. The default is 1, but the value should be updated in production environments to reflect the expected audio sample rate of the source media and your desired CMAF audio chunk duration. This property is only enabled if cmafLLChunkingScheme is byFrame

cmafLLChunkFrameCountTargetVideo Integer

Specifies the number of audio frames to include in each low latency CMAF audio chunk. The default is 1, but the value should be updated in production environments to reflect the expected video frame rate of the source media and your desired CMAF video chunk duration. This property is only enabled if cmafLLChunkingScheme is byFrame

cmafLLChunkDurationTargetAudio Integer

Specifies, in milliseconds, the duration of each low latency CMAF audio chunk. The default is 43, but we recommend using a value between 300 - 500 in production workflows.  The duration cannot exceed the cmafSegmentDurationTarget value.

cmafLLChunkDurationTargetVideo Integer

Specifies, in milliseconds, the duration of each low latency CMAF audio chunk. The default is 43, but we recommend using a value between 300 - 500 in production workflows. The duration cannot exceed the cmafSegmentDurationTarget value.

cmafSegmentDurationTarget Integer Specifies, in milliseconds, the duration of the fMP4 segments in the stream. The value must be greater than 0. The default is 10000 (10 seconds), but we recommend a value around 3000 for Low-Latency HLS streaming.

Configure properties

Configure the optional low latency CMAF chunk properties by editing the Application.xml file for your LL-HLS live stream application.

  1. Navigate to the Application.xml file for your LL-HLS live stream. If you're using the default live application that installs with Wowza Streaming Engine, navigate to [install-dir]/conf/live.
  2. Open Application.xml in a text editor.
  3. In the <LiveStreamPacketizer> container element, add the desired property or properties, making sure to specify a name, value, and type for each one. The XML looks like this:
<LiveStreamPacketizer>
    <Properties>
        <Property>
            <Name>...</Name>
            <Value>...</Value>
            <Type>...</Type>
        </Property>
        <Property>
            <Name>...</Name>
            <Value>...</Value>
            <Type>...</Type>
        </Property>
    </Properties>
</LiveStreamPacketizer>
 
  1. Save your changes and restart Wowza Streaming Engine.

Connect a live source


After your live application is configured to deliver an LL-HLS stream, 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 LL-HLS playback using a supported test player.

Test stream playback


LL-HLS streams can be played in native apps on devices running iOS 13.

To test LL-HLS live streams when 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 443)
  • [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 LL-HLS stream that uses the address mycompany.com, the default live application, and the default stream name myStream is:

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

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

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

and the playback URL for the Cupertino HLS stream is either:

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

or

http://mycompany.com/live/myStream/playlist_sfts.m3u8

where _sfts indicates that the media playlist contains .ts segments.

More resources