AVI, short for Audio Video Interleave, is a multimedia container format introduced by Microsoft in 1992 for Video for Windows. In the field of video containers & formats, it is one of the oldest still-recognized wrappers: it stores audio and video streams in interleaved chunks inside a single file, without defining how either stream is compressed.
AVI is built on the Resource Interchange File Format (RIFF), the same chunk structure used by WAV audio files. Its simplicity made it a de facto standard on Windows for more than a decade, but its lack of native support for modern features such as B-frame timestamps, subtitles and streaming has pushed most workflows toward MP4, MOV and MKV.
How the AVI file structure works
An AVI file is a tree of RIFF chunks, each consisting of a four-character code, a size field and data. The top-level RIFF form of type AVI contains three main parts: a header list (hdrl), a movie list (movi) that holds the actual audio and video data, and an optional index chunk (idx1) that lists the location of every frame.
Inside the header list, a main header describes global properties such as frame rate and dimensions, and each stream receives a stream header (strh) and stream format (strf) chunk. The format chunk names the codec with a FourCC code, for example DIVX, XVID, MJPG or a raw format identifier, which tells the player which decoder to load.
| Chunk | Location | Purpose |
|---|---|---|
| RIFF AVI | File root | Identifies the file and its total size |
| hdrl | Header list | Holds global and per-stream headers |
| strh and strf | Inside hdrl | Stream type, timing and codec FourCC |
| movi | Main data list | Interleaved audio and video chunks |
| idx1 | After movi | Index for seeking to frames |
| AVIX and indx | OpenDML extension | Larger files and hierarchical index |
The term interleave describes how the movi list alternates small blocks of video and audio, so a player reading the file sequentially receives both streams roughly in sync. Poor interleaving forces a player to jump back and forth on disk, which caused stuttering on the slow drives of the 1990s.
Size limits and the OpenDML extension
The original RIFF format uses 32-bit size fields, which limits a classic AVI file to about 1 GB in practice and 2 GB to 4 GB in theory, depending on the software. This was a serious problem for capture of uncompressed or lightly compressed video, where 1 GB fills in minutes.
The OpenDML AVI 2.0 extension, developed by Matrox and other vendors in the mid-1990s, solves this by chaining additional RIFF lists of type AVIX and adding a hierarchical index. Files in this form can grow far beyond 4 GB while older players can still read the first segment.
| Property | AVI 1.0 | OpenDML AVI 2.0 |
|---|---|---|
| File size | About 1 GB to 4 GB | Practically unlimited |
| Index | Single idx1 list | Hierarchical indx super index |
| Compatibility | Every AVI reader | Most modern players and editors |
| Typical use | Short clips and legacy files | Long captures and archives |
How AVI compares with modern containers
As a container format, AVI only wraps streams; the image quality depends on the codec inside, not on the container. Its weaknesses are structural: AVI has no proper timestamps per frame, so codecs with B-frames such as H.264 need workarounds like packed bitstreams, and variable frame rate is hard to represent.
| Container | Timestamps and B-frames | Subtitles and chapters | Streaming suitability |
|---|---|---|---|
| AVI | Weak, needs workarounds | Not standardized | Poor |
| MP4 | Full support | Limited subtitles, chapters | Very good, including fragmented MP4 |
| MOV | Full support | Timecode and text tracks | Good |
| MKV | Full support | Rich subtitles and chapters | Moderate |
| MXF | Full support | Professional metadata | Not intended for delivery |
When an AVI file is converted to MP4 or MKV, the streams can often be moved without re-encoding, a process called remuxing. Full transcoding is needed only when the target platform does not support the codec inside, such as old Indeo or Cinepak material.
Codecs commonly stored in AVI
Because AVI identifies codecs only by a FourCC code, almost any frame-based codec of its era could be stored in it. The resulting files look identical from the outside, yet one AVI may contain uncompressed RGB video while another holds heavily compressed MPEG-4 Part 2 material, which explains why playback success varies so much between files.
Audio is described by a WAVEFORMATEX structure borrowed from WAV files. Typical payloads are PCM, MP3 and AC-3. Variable bitrate MP3 audio was never cleanly defined for AVI, which is a frequent root cause of gradual audio drift in files from the DivX period.
Modern codecs such as H.264 or HEVC can technically be placed in AVI, but the result is fragile. Editors and players may misread frame order, so MP4 or MKV is the correct home for long-GOP codecs today.
Where AVI is still used
AVI survives in niches where its simple, predictable structure is an advantage. Scientific and industrial cameras, microscopy software and machine vision systems often write uncompressed or Motion JPEG AVI, because every frame is self-contained and easy to parse.
- Legacy archives: home video and DivX or Xvid collections from the 2000s.
- Lab and inspection systems: frame-accurate uncompressed recording for analysis.
- Intermediate files: some older capture cards and Windows tools still export AVI.
- Simple devices: dash cameras and inexpensive cameras that record Motion JPEG.
Common problems with AVI files
Most AVI trouble comes from the mismatch between an old container and newer codecs or from damaged indexes. The table below links frequent symptoms to their causes and practical fixes.
| Symptom | Likely cause | Fix |
|---|---|---|
| Plays but cannot seek | Missing or broken idx1 index | Rebuild the index or remux |
| Audio drifts out of sync | Variable bitrate audio or poor interleaving | Remux to MKV or MP4 |
| Video does not play | Missing decoder for the FourCC | Install the decoder or transcode |
| File stops at 2 GB | Writer without OpenDML support | Use AVI 2.0 or another container |
Stripped to the essentials
AVI is an old box for video. The box holds pictures and sound and keeps them next to each other so they play together. It does not decide how the pictures are compressed. That job belongs to the codec placed inside.
The box is simple and sturdy, which is why some cameras and labs still use it. However, it lacks many modern compartments, such as proper slots for subtitles or precise timing. That is why newer formats like MP4 and MKV have mostly replaced AVI.
Where it is applied
A materials research lab films crack growth in metal samples with a high-speed industrial camera at 500 frames per second. The acquisition software saves each test as an uncompressed AVI file using the OpenDML extension, because uncompressed frames preserve every pixel value and the analysis software reads AVI directly.
A single ten-second test produces several gigabytes. The researchers measure crack length frame by frame, then remux selected clips into MP4 after compressing them with H.264 for presentations. The outcome is a clear split: AVI stays the lossless working format for measurement, while MP4 serves sharing and playback on any device.