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 chunks that are used as the video and audio partial segments needed for LL-HLS. The LL-HLS streams use the fMP4 container format and are delivered to players over HTTP/2.
Note: Using the CMAF packetizer includes some limitations. See About CMAF workflows in Wowza Streaming Engine for more information.
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.
Before you start
You should complete the following tasks:
- Configure your port for HTTPS playback with an SSL/TLS certificate according to Get SSL/TLS certificates from the Wowza Streaming Engine StreamLock service. LL-HLS playback does not work without an SSL/TLS secured port.
Configure a live application to deliver LL-HLS streams
To send streams from Wowza Streaming Engine to clients or Wowza Streaming Engine edge servers, use the Live application type. To connect to a CDN edge, such as the Fastly CDN, that can pull streams from the Wowza Streaming Engine origin application, use the Live HTTP Origin application type.
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.
Enable LL-HLS in Wowza Streaming Engine XML
The following steps enable transmuxing for CMAF packetization for LL-HLS delivery.
- Navigate to [install-dir]/conf/[application-name] and open the Application.xml file in a text editor.
- Add cmafstreamingpacketizer to the LiveStreamPacketizers property. You can add it to the prepopulated comma-separated list, or it can be the only packetizer specified.
<Streams> ... <LiveStreamPacketizers>cmafstreamingpacketizer</LiveStreamPacketizers> ... </Streams>
Note: If you enable cupertinostreamingpacketizer and cmafstreamingpacketizer, Wowza Streaming Engine generates both MPEG-TS segments (using cupertinostreamingpacketizer) and fMP4 segments (using cmafstreamingpacketizer).
- Add the cmafLLEnableLowLatency property to the LiveStreamPacketizer container element and set it to true.
<LiveStreamPacketizer> <Properties> <Property> <Name>cmafLLEnableLowLatency</Name> <Value>true</Value> <Type>Boolean</Type> </Property> </Properties> </LiveStreamPacketizer>
- For the HTTPStreamers property, make sure HLS (cupertinostreaming) is specified.
- Save your changes to Application.xml.
- Go to [install-dir]/conf/ and open the VHost.xml file in a text editor.
- Add the AllowHttp2 property to the <SSLConfig> container element in the <HostPort> you configured for SSL/TLS and set it to true.
<SSLConfig> ... <AllowHttp2>true</AllowHttp2> ... </SSLConfig>
- Save your changes to VHost.xml.
Your live application is configured to deliver LL-HLS streams. If desired, you can configure optional CMAF packetization properties. For information, see Configure CMAF live streaming packetization in Wowza Streaming Engine.
You can also configure the following optional properties to customize the LL-HLS partial segments and segments generated by the cmafstreamingpacketizer or to customize the media playlist.
Configure optional LL-HLS properties
Configuring the following properties is optional as Wowza Streaming Engine will use the property's default value for any of the properties that you do not configure.
Low latency CMAF packetization property reference
You can configure these custom properties in one of the following ways:
- From Wowza Streaming Engine Manager, add the properties from the Custom section of your LL-HLS application's Properties tab using the /Root/Application/LiveStreamPacketizer path.
- From the Application.xml file for your LL-HLS application ([install-dir]/conf/[application-name]), add the properties within the <LiveStreamPacketizer>/<Properties> container element.
See Add a custom property for more information about using custom properties.
Note: If partial segments are too small, servers can become overloaded with frequent media playlist requests and cause playback to be less reliable.
|Specifies the chunking scheme for low latency CMAF-packetized streams. Valid values are byFrame or byDuration. The default is byDuration.
If the value is byDuration, packetization is configured using the cmafLLChunkDurationTargetAudio and
If the value is byFrame, packetization is configured using the cmafLLChunkFrameCountTargetAudio and
|Specifies, in milliseconds, the target duration of each low latency CMAF audio chunk. The default is 1000 and is recommended. The duration cannot exceed the cmafSegmentDurationTarget value. This property is only available if cmafLLChunkingScheme is byDuration.
|Specifies, in milliseconds, the target duration of each low latency CMAF video chunk. The default is 1000 and is recommended. The duration cannot exceed the cmafSegmentDurationTarget value. This property is only available if cmafLLChunkingScheme is byDuration.
|Specifies the target number of audio frames to include in each low latency CMAF audio chunk. The default is 47 and is recommended. This property is only enabled if cmafLLChunkingScheme is byFrame.
|Specifies the target number of video frames to include in each low latency CMAF video chunk. The default is 30 and is recommended. This property is only enabled if cmafLLChunkingScheme is byFrame.
|Specifies, in milliseconds, the duration of the fMP4 segments in the stream. The default is 6000 (6 seconds) and is recommended. This property is configurable from the CMAF Streaming Packetizer properties section in Wowza Streaming Engine Manager.
Advanced LL-HLS property reference
For advanced tuning, you can configure the following custom property in one of the following ways:
- From Wowza Streaming Engine Manager, add the properties from the Custom section of your LL-HLS application's Properties tab using the /Root/Application/HTTPStreamer path.
- From the Application.xml file for your LL-HLS application ([install-dir]/conf/[application-name]), add the properties within the <HTTPStreamer>/<Properties> container element.
See Add a custom property for more information about using custom properties.
(4.8.0 and later)
|Specifies, in floating-point seconds, the server-recommended minimum distance from the live edge at which clients should begin to play or seek in a LL-HLS stream (the PART-HOLD-BACK attribute in media playlists). If you do not configure this property, Wowza Streaming Engine uses the default value, which is recommended. The default value is calculated as three times the maximum value of PART-TARGET out of all of a stream's variant media playlists.
Note: PART-TARGET is an attribute of the EXT-X-PART-INF tag in media playlists and is based on the target values set with the cmafLLChunkDurationTargetVideo and cmafLLChunkDurationTargetAudio properties or the cmafLLChunkFrameCountTargetVideo and cmafLLChunkFrameCountTargetAudio properties.Wowza Streaming Engine will adjust the PART-HOLD-BACK value to be equal to the maximum value of PART-TARGET (across all variant media playlists) if you set this property to less than a partial segment duration.
Transcoding considerations for LL-HLS
To bypass encoding streams with Transcoder, source streams should meet the following encoding recommendations. Otherwise, transcoding is recommended. Although a small amount of latency is introduced with transcoding, if your source stream does not meet the encoding recommendations, transcoding will ultimately improve reliability of LL-HLS streaming.
- CMAF-supported codecs (required)
- H.264, H.265
- AAC, AAC-LC, HE-AAC (AAC+ or aacPlus), HE-AACv2 (enhanced AAC+, aacPlus v2)
- Dolby Digital 5.1 Surround Sound (AC-3) and Dolby Digital Plus (Enhanced AC-3 or E-AC-3)
- GOP size: 1 or 2 seconds
- Closed GOPs
- H.264 and H.265 byte streams contain metadata about the GOP structure
- Constant frame rate video
A stream configured for transcoding and LL-HLS delivery cannot use Passthrough for the Video Codec of a stream rendition but not other renditions of the same stream. If you use Passthrough to pass a video source through to output without making any changes for any Video Codec in a stream's renditions, all of the video codecs must be set to Passthrough.
Stream name groups (NGRP) are not supported with LL-HLS. To group multiple stream renditions for LL-HLS, you need to create a SMIL file in accordance with CMAF HLS. See Set up adaptive bitrate CMAF streaming for how to do this.
Tune for latency
In addition to configuring the CMAF properties, there are steps you can take to tune streams for low latency, depending on the source and whether it needs to be transcoded.
- Open the Application.xml file for your application ([install-dir]/conf/[application-name]) in a text editor.
- In the <Streams> container element, set <StreamType> to live-lowlatency .
<Streams> <StreamType>live-lowlatency</StreamType> ... </Streams>
- Open your Transcoder template ([install-dir]/transcoder/templates) in a text editor.
- Disable the <SortBuffer> in the <PostProcess> container element by setting <Enable> to false.
<PostProcess> <SortBuffer> <Enable>false</Enable> ... </SortBuffer> </PostProcess>
- Save your changes to both files and restart Wowza Streaming Engine.
Scale LL-HLS with a CDN
Optionally, with your own CDN account, you can scale LL-HLS delivery by connecting a Wowza Streaming Engine Live HTTP Origin application to a CDN edge that can pull streams from the Wowza Streaming Engine origin application, such as the Fastly CDN.
To connect the Live HTTP Origin application to your CDN, provide the IP address or hostname of the Wowza Streaming Engine origin server in your CDN configuration. Also in your CDN configuration, enable connecting to the origin server over SSL/TLS using the port you configured for SSL/TLS in the Wowza Streaming Engine origin (default port 443).
See Configure Wowza Streaming Engine as an HTTP caching origin for information about HTTP origin applications.
Test stream playback
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. When the camera or encoder is connected and the live stream is active, test LL-HLS playback using a supported test player.
You can test LL-HLS streams by entering the playback URL in the Safari browser on iOS 14, other native apps on devices running iOS 14, or any player that supports LL-HLS. If a player supports HLS but not LL-HLS, it will default to playing LL-HLS streams as standard HLS.
To test LL-HLS live streams when only cmafstreamingpacketizer is enabled, specify the stream playback URL using one of the following formats:
If cmafstreamingpacketizer and cupertinostreamingpacketizer are enabled, specify the stream playback URL using one of the following formats:
- [address] is the IP address or domain and port (default port 443)
- [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 an adaptive bitrate LL-HLS stream that uses the address example.com, an application named myApplication, and the default stream name myStream is:
If cmafstreamingpacketizer and cupertinostreamingpacketizer are both enabled, the adaptive bitrate LL-HLS playlist URL for the same example is:
and the playback URL for the Cupertino HLS stream is either one of the following URLs, where _sfts indicates that the media playlist contains .ts segments: