Embedding EXIF Metadata in AVIF Containers

Embedding Exchangeable Image File Format (EXIF) metadata into an AV1 Image File Format (AVIF) container requires adhering strictly to the ISO Base Media File Format (ISOBMFF) and HEIF (ISO/IEC 23008-12) specifications. This technical overview details the required structural boxes, data formatting, item associations, and binary payload constraints needed to correctly package EXIF data within an AVIF file so that decoders and parsers can extract it without errors.

1. The Metadata Box (meta) Structure

All metadata in an AVIF container must reside inside the top-level meta box (FourCC: meta). Within this container, the file must define a Handler Box (hdlr) with a handler_type set to 'pict', signaling that the metadata box manages image-related items.

2. Item Information Entry (infe)

The EXIF data block must be registered as an item in the Item Information Box (iinf):

3. Item Reference Box (iref)

Because metadata belongs to a specific image, you must establish an explicit structural link between the EXIF item and the target image item:

4. Binary Payload Format and the TIFF Header Offset

The raw binary payload of the EXIF item does not follow the traditional JPEG structure. Decoders expect the following byte configuration:

5. Item Location (iloc)

The physical location and length of the EXIF payload must be declared inside the Item Location Box (iloc):