Encapsulating PCM and Opus Audio with AV1

This article explains how uncompressed PCM and high-resolution Opus audio streams are paired and encapsulated alongside AV1 video. Because AV1 is strictly a video coding format rather than a multimedia container, it does not package audio on its own. Instead, it relies on standardized container formats—primarily the ISO Base Media File Format (MP4) and Matroska (MKV/WebM)—to interleave, synchronize, and transport AV1 video tracks with audio data.

The Role of AV1 and Media Containers

AOMedia Video 1 (AV1) defines only the bitstream syntax and decoding process for video frames. Audio codecs like Opus and uncompressed Linear Pulse-Code Modulation (LPCM) operate entirely independently of the AV1 compression engine. To play audio and AV1 video together, multiplexers wrap the individual elementary streams into container tracks using specific track headers, sample descriptions, and timestamps.

Encapsulating Opus with AV1

Opus is a lossy, low-latency audio format capable of handling high-resolution signals up to a 48 kHz sampling rate with dynamic bitrates. Encapsulating Opus alongside AV1 varies by container:

Encapsulating Uncompressed PCM with AV1

PCM audio contains raw, uncompressed sample values that require precise format definitions regarding endianness, bit depth, and layout.

Synchronization and Multiplexing

Synchronization between AV1 video and the chosen audio stream is maintained at the container level through common timebases and presentation timestamps: