The Role of ISOBMFF in AVIF Image Structure
The AV1 Image File Format (AVIF) relies on the ISO Base Media File Format (ISOBMFF) as its foundational container architecture. While the AV1 codec handles the compression of image data, ISOBMFF provides the standardized, structural framework needed to organize, store, and interpret that compressed data. By acting as the container, ISOBMFF defines how image payloads, metadata, color profiles, and multi-frame sequences coexist within a single file.
The Box-Based Structural Hierarchy
At the core of ISOBMFF is an object-oriented building block known as a "box" (historically referred to as an "atom"). Every AVIF file is constructed as a sequence of these nested boxes, each defined by a four-character code (FourCC) and a size header.
Key boxes used in an AVIF file include:
ftyp(File Type Box): Placed at the beginning of the file to identify the file format, minor version, and compatible brands (such asaviffor single images oravisfor sequences).meta(Metadata Box): Contains structural declarations, item locations, item associations, and descriptive metadata without holding the raw media itself.mdat(Media Data Box): Holds the raw, compressed AV1 bitstreams for the images, alpha channels, or auxiliary data.
This box-based arrangement enables parsers to quickly read high-level information about the image without decoding the entire payload.
Separation of Data and Metadata
ISOBMFF separates structural metadata from the actual binary payload.
In an AVIF file, the meta box indexes various "items" using
the Item Location Box (iloc) and Item Properties Box
(iprp).
The iloc box specifies exact byte offsets and lengths
for data chunks stored in the mdat box. This mechanism
allows a decoder to parse the image's dimensions, color characteristics,
and transform properties before retrieving or decompressing the actual
AV1 pixel data, improving parsing efficiency and enabling selective data
retrieval.
Support for Complex Assets and Auxiliary Layers
Through the ISOBMFF item reference mechanisms, AVIF supports complex, multi-layered images. It does not treat an image merely as a flat pixel array; instead, it can associate multiple independent items:
- Alpha Channels: Transparency is stored as an auxiliary image item linked to the primary image item, allowing independent compression parameters.
- Depth and Gain Maps: Auxiliary items can also contain depth information or HDR gain maps used for tone-mapping on compatible displays.
- Non-Visual Metadata: Standard metadata formats, such as Exif and XMP, are stored as separate items mapped directly to the primary image.
Image Sequences and Animations
Because ISOBMFF was originally engineered for timed media like MP4
video, AVIF inherits native support for image sequences and animated
images. Animated AVIF files utilize the movie box (moov)
and track box (trak) structures common in video playback.
This enables AVIF to support animations with precise frame timing,
looping controls, and efficient temporal compression while using
standard media pipeline parsers.
Interoperability via the HEIF Standard
AVIF is technically a specific profile of the High Efficiency Image File Format (HEIF), which itself is a derivative of ISOBMFF. By leveraging ISOBMFF, AVIF benefits from decades of container standardizations. Browsers, operating systems, and media frameworks that already implement ISOBMFF and HEIF parsing can integrate AVIF demuxing with minimal architectural changes, requiring only the addition of an AV1 decompression module.