How to Configure libaom to Output an IVF File?

Configuring the libaom encoder to output an IVF (Indeo Video Format) file is a straightforward process that primarily depends on how you interface with the encoder. Because libaom is the reference software library for the AV1 video coding format, it is most commonly utilized through command-line tools like aomenc or the popular multimedia framework FFmpeg. This article provides a quick overview and step-by-step instructions on how to explicitly force libaom to wrap its compressed AV1 raw bitstream into an IVF container using both methods.

Using the Native aomenc CLI

When using the native aomenc command-line tool provided directly by the AOMedia Project, container selection is determined by your output file extension. The tool automatically detects that you want an IVF container when you specify .ivf at the end of your output file name.

An example command looks like this:

aomenc --codec=av1 input.y4m -o output.ivf

In this command, aomenc reads the raw video input and directly multiplexes the AV1 frames into the IVF format because of the -o output.ivf designation.

Using FFmpeg with libaom

If you are using FFmpeg compiled with libaom support (--enable-libaom), the process is similarly driven by the output file extension. FFmpeg maps the extension to its internal muxer.

To encode a video to AV1 using libaom and target an IVF container, use the following syntax:

ffmpeg -i input.mp4 -c:v libaom-av1 output.ivf

Why Choose the IVF Container for AV1?

The IVF container is highly favored during development, testing, and debugging phases of AV1 encoding. Unlike complex containers like MP4 or MKV, IVF is a very lightweight format that introduces minimal overhead. It consists of a simple 32-byte file header followed by 12-byte headers for each frame, making it easy to parse and ideal for verifying raw encoder output before final distribution muxing.