What Are Open Bitstream Units in AV1?
Open Bitstream Units (OBUs) are the foundational structural syntax elements used to package, format, and deliver video data within the AOMedia Video 1 (AV1) codec specification. This article breaks down the architecture of OBUs in AV1, explains their internal structure, details the primary OBU types, and highlights how this modular design enhances streaming flexibility, error resilience, and temporal or spatial scalability.
The Role of OBUs in the AV1 Bitstream
In AV1, an encoded bitstream is not a single contiguous block of video data. Instead, it is structured as a sequence of discrete data packets called Open Bitstream Units.
Functionally, OBUs serve a similar role to Network Abstraction Layer (NAL) units in legacy standards like AVC (H.264) and HEVC (H.265). However, OBUs are engineered specifically for modern internet protocols and container formats, allowing decoders and parsers to inspect, extract, or discard specific sections of the bitstream without needing to decode the entire payload.
Structure of an Open Bitstream Unit
Every OBU consists of a standardized header followed by an optional payload. The header defines the type of data contained within the unit and provides instructions on how parsers should handle it.
OBU Header (1 to 2 bytes):
obu_type(4 bits): Identifies the category of data (e.g., Sequence Header, Frame, Tile Group, Metadata).obu_extension_flag(1 bit): Indicates whether an extension header follows.obu_has_size_field(1 bit): Specifies whether the length of the payload is explicitly stated in the OBU.- Reserved bits (2 bits): Reserved for future syntax expansion.
OBU Extension Header (Optional, 1 byte):
- Present only when
obu_extension_flagis set. - Contains the
temporal_id(3 bits) andspatial_id(2 bits), which enable native support for Scalable Video Coding (SVC). Parsers can drop higher temporal or spatial layers during network congestion without parsing the compressed video payload.
- Present only when
OBU Payload Size (Optional):
- Encoded using a variable-length format (LEB128). It defines the byte length of the subsequent payload, allowing non-decoding network middleboxes to skip unneeded units efficiently.
OBU Payload:
- The actual payload data corresponding to the specified
obu_type.
- The actual payload data corresponding to the specified
Core OBU Types
The AV1 specification defines several distinct OBU types, each responsible for a specific function within the decoding pipeline:
- Sequence Header OBU: Contains stream-wide parameters required to initialize the decoder, such as the AV1 profile, level, bit depth, color space, and maximum frame dimensions. A decoder must read this unit before processing frames.
- Frame Header OBU: Supplies frame-level parameters, including display dimensions, frame type (key frame, inter frame, intra-only frame), reference frame indices, loop filter strengths, and quantization parameters.
- Tile Group OBU: Contains the compressed transform coefficients, motion vectors, and prediction data for one or more tiles within a frame.
- Frame OBU: A composite unit that bundles a Frame Header OBU and a Tile Group OBU together. This optimizes transmission by reducing header overhead for standard non-tiled or simple frame deliveries.
- Metadata OBU: Transports non-visual information, such as High Dynamic Range (HDR) static metadata (SMPTE 2086), dynamic metadata (such as HDR10+), or user-defined private data.
- Temporal Delimiter OBU: Signifies the boundary between distinct temporal units (display time instances). It ensures synchronization when streaming over packet-based networks.
- Tile List OBU: Used for specific large-scale tile architectures, enabling random-access decoding of isolated tiles (useful in 360-degree video streaming).
- Padding OBU: Contains filler bytes used for constant bitrate (CBR) stuffing or byte alignment without affecting the decoded image.
Key Advantages of the OBU Architecture
The OBU syntax provides several operational advantages:
- Forward Compatibility: If an older decoder
encounters an unknown
obu_type, the size field allows the decoder to safely skip the unit without failing or corrupting the stream. - Transport Independence: OBUs can be stored directly inside container formats like MP4 (ISOBMFF) and Matroska/WebM, or packaged directly into RTP packets for real-time WebRTC communications without requiring format restructuring.
- Efficient Scalability: The explicit separation of temporal and spatial identifiers in the extension header allows selective forwarding units (SFUs) in video conferencing systems to adapt streams dynamically based on client bandwidth.