Low-Latency CMAF Requirements for Live AV1 Delivery
Delivering live video using the AV1 codec over Common Media Application Format (CMAF) with low latency requires a coordinated setup across encoding, packaging, distribution, and playback. This article outlines the essential technical requirements for implementing low-latency CMAF for live AV1 streaming, focusing on chunked transfer encoding, precise GOP configurations, AV1 real-time profiles, packaging standards, and manifest signaling for sub-three-second glass-to-glass latency.
1. CMAF Chunking and Segment Structure
CMAF achieves low latency by breaking standard media segments into smaller, independently addressable units called chunks.
- Fragmented MP4 (fMP4): Media must be packaged using
fMP4 structures consisting of consecutive
moof(Movie Fragment) andmdat(Media Data) box pairs. - Chunk Duration: Chunks typically range from 200 to 500 milliseconds, allowing the player to decode and render frames before an entire multi-second segment is fully generated.
- Segment Duration: Segments should generally be 1 to 2 seconds long, composed of multiple consecutive CMAF chunks, ending with an independent boundary.
2. Live AV1 Encoding Parameters
AV1 is computationally demanding, making proper encoder configuration critical for real-time delivery without introducing ingest latency or frame drops.
- Real-Time Mode: The encoder (such as SVT-AV1 in
real-time mode or libaom with
usage=realtime) must operate at speed presets optimized for live streaming (typically presets 7 through 10 in SVT-AV1). - GOP (Group of Pictures) Configuration: Closed GOP structures with a fixed duration (1 to 2 seconds) are required. Random Access Points (RAP) must align precisely with the start of each CMAF segment.
- Reference Frames and B-Frames: To prevent encoding delay, lookahead buffers must be minimized (zero or few frames), and deep hierarchical B-frame structures must be constrained or disabled.
- Rate Control: Constant Bitrate (CBR) or strictly constrained Variable Bitrate (VBR) with a tight Video Buffer Verifier (VBV) prevents bitrate spikes that could stall low-latency playback buffers.
3. ISOBMFF and AV1 CMAF Binding
The stream must conform to the official CMAF specifications for AV1 encapsulation.
- CMAF Brand: Media tracks should indicate compliance using the appropriate CMAF profile brand.
- Track Initialization: The CMAF Header must contain
an
ftypbox and anmoovbox with anav01sample entry inside thestsdbox. - OBU Encapsulation: The AV1 bitstream, structured as
Open Bitstream Units (OBUs), must be properly encapsulated. Crucially,
the AV1 Sequence Header OBU must reside within the
av1Cconfiguration box in the CMAF track header, while Frame OBUs are carried in themdatboxes.
4. Manifest Signaling (LL-DASH and LL-HLS)
Packaging must expose the chunk-level structure to clients via modern streaming protocols.
- Low-Latency DASH (LL-DASH):
- Uses the
@availabilityTimeOffset(ATO) attribute to signal that chunks are accessible before the complete segment is finalized. - Employs
UTCTimingelements to synchronize client and server clocks. - Uses the
ServiceDescriptionelement to define target latency, minimum latency, and maximum latency boundaries.
- Uses the
- Low-Latency HLS (LL-HLS):
- Uses partial segments (
EXT-X-PART) referencing individual CMAF chunks. - Implements delta updates (
EXT-X-SKIP) and blocking playlist reloads to reduce signaling overhead. - Injects pre-announcements (
EXT-X-PRELOAD-HINT) for the next anticipated media part.
- Uses partial segments (
5. Transport and CDN Infrastructure
The network layer must support immediate frame propagation through the delivery chain.
- Chunked Transfer Encoding (CTE): Origin servers and CDNs must support HTTP/1.1 Chunked Transfer Encoding or HTTP/2/3 framing to push CMAF chunks down the connection as they are generated.
- Persistent Connections: HTTP/2 or HTTP/3 should be utilized to eliminate TCP handshake latency and head-of-line blocking across parallel segment and manifest requests.
- Zero-Delay Caching: CDN edge nodes must be configured to pass incomplete chunks directly to clients rather than buffering entire segments before egress.
6. Client Player Requirements
The receiving client must be capable of processing fragmented data in near-real-time.
- Decoder Performance: Software decoders (such as dav1d) or dedicated AV1 hardware decoders must sustain playback at target resolutions without causing frame rendering stalls.
- Buffer Management: Player algorithms must maintain shallow playback buffers (often between 1 and 2 seconds) and implement rate-adjusting catch-up mechanisms to correct for network fluctuations without rebuffering.