Introduction
AVI is the video container Microsoft introduced with Video for Windows in 1992. It interleaves video and audio in one file so they can be read from disk together. AVI was the standard video file on Windows for many years and is still common for older video, capture devices and uncompressed footage.
The original format is limited to files of about 1 GB to 4 GB. The OpenDML extension, sometimes called AVI 2.0, adds further RIFF sections and a two-level index so files can be much larger.
Structure
An AVI file is a RIFF file with the form type AVI (with a trailing
space). RIFF chunks are a four-letter ID, a 32-bit little-endian size and the data,
padded to an even length. LIST chunks group other chunks under a type of
their own.
The hdrl list comes first. It holds the main header avih,
with the frame rate, frame size and number of streams, and one strl list
per stream, each with a stream header strh and a format strf
that names the codec. The movi list holds the data chunks, whose IDs give
the stream number and the kind of data: 00dc is compressed video for
stream 0, and 01wb is audio for stream 1. The idx1 chunk at
the end indexes every data chunk for seeking.
0RIFF chunk ID, size, form typeAVI12 bytes12LIST hdrl the main header and onestrlper streamvaries…LIST movi the video and audio chunks, interleavedvaries…idx1 an index entry for every data chunkvaries
Links
Software
- VLC media player (Windows, macOS, Linux, mobile)
- mpv (Windows, macOS, Linux)
- VirtualDub (Windows)
- Avidemux (Windows, macOS, Linux)
- HandBrake (Windows, macOS, Linux)
- FFmpeg (Windows, macOS, Linux)
- Adobe Premiere Pro (Windows, macOS)
Developers
- libavformat, C, FFmpeg’s container library
Reference
- AVI RIFF file reference, Microsoft