What Is an Animated AVIF Image Sequence?
An animated AVIF sequence is a modern, highly compressed image format that provides smooth, multi-frame animations with superior visual quality and smaller file sizes than legacy formats like GIF and animated WebP. This article breaks down what an animated AVIF sequence is, how it leverages the AV1 video codec within the ISO Base Media File Format container, and how the Alliance for Open Media specification defines its structure, tracks, and metadata.
Understanding Animated AVIF
An animated AVIF sequence is essentially a short, lightweight AV1 video bitstream wrapped inside an image container. While standard AVIF files store individual still photographs, animated sequences store a succession of frames capable of looping or playing back at specified intervals.
Because it uses the AV1 compression standard, an animated AVIF sequence supports modern visual features, including high dynamic range (HDR), wide color gamuts (P3, Rec. 2020), 8-bit to 12-bit color depths, and full alpha-channel transparency. Compared to the 256-color limit of the decades-old GIF format, animated AVIF retains photorealistic color accuracy while typically reducing payload sizes by over 80 percent.
The Specification and Container Architecture
The Alliance for Open Media (AOMedia) formally defines the AVIF format by combining the AV1 bitstream with the ISO Base Media File Format (ISOBMFF), drawing heavily from the Multi-Image Application Format (MIAF) standard.
Within the specification, an animated AVIF sequence is not treated simply as a collection of loose still images. Instead, it is defined as a constrained, single-track or multi-track video presentation.
The File Type Box
(ftyp)
The specification dictates that any file containing an animated AVIF
sequence must signal its compatibility in the File Type Box
(ftyp):
- Major/Compatible Brand: Animated AVIF files must
identify with the structural brand
avis(AV1 Image Sequence). - Static Fallback: The file may also list
avifin the compatible brands list if a standalone primary image item is also included for decoders that do not support animated playback.
Structural Differences: Meta Box vs. Movie Box
The primary distinction between a static AVIF and an animated sequence within the specification is how frame data is indexed:
- Static AVIF: Employs the
metabox to define individual items, locating compressed AV1 intra-frames using an Item Location Box (iloc). - Animated AVIF Sequence: Uses standard ISOBMFF
temporal structures. The file contains a Movie Box (
moov) housing one or more Track Boxes (trak). Frame media data is stored sequentially in Media Data Boxes (mdat).
The video track uses the av01 sample entry to parse the
incoming AV1 video stream. This allows the decoder to employ temporal
prediction (inter-frames), enabling inter-frame delta compression
(P-frames and B-frames) that drastically shrinks file sizes relative to
formats that only compress frames independently.
Handling Alpha Channels
When an animated AVIF sequence includes transparency, the specification mandates the use of an auxiliary track rather than blending color and transparency into a single stream.
- Color Track: Contains the primary YUV or RGB AV1 video data.
- Auxiliary Track: Contains a secondary, monochrome AV1 video stream representing the alpha mask.
- Track Reference (
tref): Links the auxiliary alpha track to the primary visual track using anauxlreference type.
A conforming AVIF reader synchronizes the playback of both tracks simultaneously, applying the alpha mask per frame at runtime.
Timing and Looping Controls
Animated sequences rely on the standard temporal properties defined
by ISOBMFF. Frame durations and playback cadences are defined using the
Time-to-Sample Box (stts), allowing sequences to feature
variable frame rates (VFR). Looping behaviors can be communicated to
presentation engines via application-level handling or standardized
media extension boxes, ensuring predictable behavior in web browsers and
native media players.