Can librav1e Multiplex Audio and Video?

This article explains whether librav1e can natively multiplex audio streams with video or if its functionality is strictly limited to video processing. You will learn about the design of librav1e, its limitations regarding audio, and the standard methods used to combine its AV1 video output with audio tracks into a final media container.

librav1e is Strictly a Video Encoder

The short answer is no: librav1e cannot natively multiplex audio streams. In fact, it cannot process, decode, or encode audio at all.

librav1e is the C-compatible library wrapper for rav1e, an AV1 video encoder written in Rust. Its sole responsibility is to take raw, uncompressed video frames (such as YUV sequences) and compress them into an AV1 elementary video stream. Because it is designed strictly as a video encoder, it does not contain any code for handling audio data, nor does it have the built-in capability to package audio and video together.

The Need for External Multiplexing

Multiplexing (or “muxing”) is the process of interleaving separate audio and video streams into a single container format, such as MP4, MKV, or WebM.

Because librav1e only outputs raw AV1 video packets (often wrapped in simple IVF or OBU formats), you must use an external multiplexer or media framework to combine this video with an audio track.

To create a complete media file with both sound and picture, developers typically use one of the following integration methods: