Audio Video Interleave (.avi)
Microsoft StandardAudio Video Interleave (AVI) is a landmark multimedia container introduced by Microsoft in 1992 that interleaves audio and video streams for synchronized playback.
Inspect & Metadata
Operating systems and file analyzers identify AVI files by inspecting the leading binary byte sequence:
Byte-Level Header Signature (Magic Bytes)
Operating systems and file analyzers identify AVI files by inspecting the leading binary byte sequence:
HEX SIGNATURE (OFFSET 0):
52 49 46 46 00 00 00 00 41 56 49 20ASCII REPRESENTATION: RIFF....AVI
Standardization: Microsoft RIFF Specification / OpenDML Extension
Technical Specifications
| Container Architecture | Resource Interchange File Format (RIFF) interleaved chunk container |
| Compression | Interleaved streams supporting DivX, Xvid, Motion JPEG, raw uncompressed, and MP3 audio |
| Byte Endianness | Little-Endian (Intel x86 byte order) |
| Color Spaces | YUV 4:2:0, RGB, and palette colors |
| Channels & Structure | Stereo and multichannel audio streams |
| Max Dimensions | Unrestricted; OpenDML AVI extension supports 4K and multi-gigabyte streams |
| Transparency | Supported via RGBA uncompressed video streams |
| Streaming & Progressive | Index chunk placed at end of file; poorly suited for progressive web streaming |
Technical Comparison Matrix: AVI vs Competitors
| Technical Attribute | AVI (Current) | MP4 | MKV | MOV |
|---|---|---|---|---|
| Streaming Suitability | Poor; requires downloading entire file before seeking | Excellent (FastStart / HLS / DASH) | Good (Segmented EBML) | Excellent (FastStart) |
| HTML5 Web Playback | Unsupported natively by modern browsers | 100% universal across all browsers | Partial (Edge / Chrome) | Supported on Safari / Apple devices |
| Subtitle Embedding | Hack-dependent (requires external .srt files) | Native timed text (tx3g / VTT) | Full native support for ASS/SSA/SRT | Native Apple QuickTime subtitles |
| Variable Frame Rate | Strictly constant framerate (CFR) | Native VFR support | Native VFR support | Native VFR support |
Common Corruption Modes & Hex Recovery Guide
Media player can play the video but cannot seek or fast-forward, or reports 'Corrupt index'.
Root Cause: The trailing 'idx1' index chunk was truncated or deleted during an interrupted download.
Recovery: Rebuild the index using DivFix++, VLC ('Build index then play'), or 'ffmpeg -i broken.avi -c copy fixed.avi'.
Security Analysis & Parser Attack Vectors
AVI files contain complex chunk hierarchies and support countless obscure legacy video codecs, making un-sandboxed decoders susceptible to parser exploits.
Known Attack Vectors
- Heap buffer overflow in 'strh' (stream header) chunk parsing in legacy Windows media players.
- Integer overflow during index array allocation for maliciously crafted large frame count headers.
- Out-of-bounds read in Motion JPEG decompression within legacy DirectShow filters.
Defensive Best Practices: Transcode untrusted AVI files into modern sandboxed MP4 containers prior to ingestion.
Historical Origins & Milestones
Key Advantages & Pros
- Extremely wide legacy desktop support across Windows media software and video editors.
- Supports uncompressed raw frames for archival film scanning and scientific video analysis.
- Simple stream interleaving architecture with low container overhead.
Technical Limitations & Cons
- Lacks native support for modern video container features like variable framerates (VFR) and chapters.
- Poorly suited for web streaming because the master index chunk ('idx1') is stored at the end of the file.
- No native HTML5 video browser support without re-encoding to MP4 or WebM.
Interesting Technical Trivia
- In the early 2000s, DivX and Xvid AVI files were the primary format used by peer-to-peer file sharing networks.
- The original 1992 AVI specification could not exceed 2 GB due to 32-bit file offset pointers.
- The 'idx1' chunk at the end of an AVI file lists every single frame's byte offset for seeking.
Frequently Asked Technical Questions
Why can't I play AVI videos directly in web browsers?
Modern browsers standardize on MP4 (H.264/AV1) and WebM (VP9/AV1) because their container formats are optimized for progressive streaming. AVI lacks native web streaming features and is not supported in HTML5 <video>.
How can I fix an AVI file that won't seek or scrub?
AVI files rely on an index table at the end of the file. If incomplete, players cannot seek. Transcoding or re-indexing the file with File2File Video Converter restores full timeline scrubbing.
What is the difference between AVI and MP4?
AVI is a 1992 legacy container designed for local desktop playback. MP4 is a 2001 modern standard supporting web streaming, chapters, variable framerates, subtitles, and superior compression.