AVIF Parsing: Still Image vs Image Collection

An AVIF parser distinguishes between a single still image and an image collection by analyzing the structural metadata defined in the ISO Base Media File Format (ISOBMFF) and the High Efficiency Image File Format (HEIF) specifications. By inspecting key boxes within the file—specifically the File Type Box (ftyp), the Meta Box (meta), the Primary Item Box (pitm), and the Item Information Box (iinf)—the parser determines whether the file contains one primary visual item with optional auxiliary data or multiple independent images meant to be treated as a collection.

1. Evaluating Brands in the File Type Box (ftyp)

The parser begins at the ftyp box to identify the file's major and compatible brands:

While ftyp signals general format support, it does not fully resolve whether a file contains a single still or an image collection, as both can share the avif structural brand. To make this determination, the parser must inspect the structural layout within the meta box.

2. Inspecting the Primary Item Box (pitm)

Inside the meta box, the parser checks for the presence of a Primary Item Box (pitm).

3. Analyzing the Item Information Box (iinf) and Item Types

The parser inspects the iinf box, which catalogues all items in the file via Item Info Entry (infe) boxes. The parser filters items by their item_type:

If the parser finds only one top-level, non-auxiliary image item, the file is classified as a single still image. If multiple independent master image items exist, the parser looks further to identify their relationships.

4. Resolving Item References (iref)

To confirm whether multiple items represent a single image or an image collection, the parser checks the Item Reference Box (iref):

5. Meta Items vs. Movie Tracks (moov)

The parser checks if the file uses track-based storage via a Movie Box (moov):