Why AVIF Primary Item Reference Prevents Video Playback

This article explains how the ISO Base Media File Format (ISOBMFF) architecture distinguishes still image formats like AVIF from continuous video files like AV1 MP4s. While both formats share the same container structure and video compression codecs, the primary item reference (pitm) box within the structural header signals to parsers that the payload is a discrete, untimed image item rather than a continuous video stream, effectively preventing media engines from treating the file as playable video.

Tracks Versus Items in ISOBMFF

The fundamental architecture of ISOBMFF defines media data in two distinct ways: tracks and items.

Because AVIF relies on the AV1 video codec to encode pixel data, the encoded data resembles an intra-frame (keyframe) from a video stream. However, its structural encapsulation in the container dictates how a parser processes it.

The Role of the Primary Item Reference (pitm)

The primary item reference is declared inside the pitm box, which sits inside the top-level meta box. The pitm structure contains a single 16-bit or 32-bit field: the item_ID of the file's primary image.

When an ISOBMFF-compliant parser loads a media file, it reads the header boxes to determine the presentation pipeline:

  1. Identity Declaration: The parser inspects the meta box and locates the pitm box.
  2. Target Isolation: The pitm box explicitly declares that the primary visual representation of the file is a specific item referenced in the item information box (iinf), not a sequence of samples in a media track.
  3. Pipeline Routing: By resolving the target item_ID, the parser directs the underlying AV1 decoder to treat the payload as a static, single-frame extraction rather than feeding frames sequentially into a display buffer synchronized with an audio or system clock.

Preventing Playback Loops and Video Execution

Video players rely on the presence of a playable track (trak) configured with a visual media handler (vide). In a compliant, single-image AVIF:

Even if an AVIF file contains image sequences (such as animated AVIFs) or thumbnail tracks alongside the main image, the parser evaluates pitm first to identify the definitive static presentation. If a video player ignores the meta structure and looks strictly for a moov box containing timed video tracks, it will either find no tracks to initialize or fail to find the presentation stream designated by pitm, halting video playback execution before it starts.