AVI Video Format: Complete Guide
AVI — Audio Video Interleave — is one of the oldest container formats for digital video. Introduced by Microsoft in November 1992 as part of the Video for Windows framework, it was designed to store synchronized audio and video streams in a single file. Thirty years later, AVI files are still everywhere: on old hard drives, in digital cameras from the 2000s, on surveillance systems, and in legacy editing pipelines.
What Is an AVI File?
AVI is a container format, not a codec. The .avi extension tells you about the wrapper, not the compression used inside. A single AVI file can contain:
- Video streams: DivX, Xvid, H.264, MPEG-4 Part 2, MPEG-2, Cinepak, Indeo, or uncompressed video
- Audio streams: MP3, PCM (uncompressed), AC3, AAC, or WMA
- Subtitle tracks: limited support (OpenDML extension)
This flexibility is both a strength and a weakness. An AVI with H.264 video and MP3 audio is nearly identical to an MP4 with the same streams — the difference is just the container metadata.
Technical Specifications
| Property | Details |
|---|---|
| Full name | Audio Video Interleave |
| Extension | .avi |
| MIME type | video/x-msvideo |
| Introduced | 1992 (Microsoft) |
| Max file size | 2 GB (original) / virtually unlimited (OpenDML/AVI 2.0) |
| Max resolution | Depends on codec — up to 4K with H.264 |
| Streaming | Poor — not designed for HTTP streaming |
| Chapters | Not supported |
| Subtitles | External only (original spec) |
AVI vs MP4 vs MKV
| Feature | AVI | MP4 | MKV |
|---|---|---|---|
| Age | 1992 | 2001 | 2002 |
| Streaming | ❌ Poor | ✅ Excellent | ⚠️ Limited |
| Chapters | ❌ No | ✅ Yes | ✅ Yes |
| Subtitles | ❌ External | ✅ Embedded | ✅ Multiple tracks |
| Browser playback | ❌ No | ✅ Yes | ❌ No |
| Max file size | ⚠️ 2 GB (old) | ✅ Unlimited | ✅ Unlimited |
| Codec support | Medium | Wide | Widest |
| Universal player | ✅ Very high | ✅ Very high | ✅ High |
Software That Opens AVI Files
Windows: Windows Media Player, VLC, MPC-HC, PotPlayer macOS: VLC (QuickTime may fail depending on codec), IINA Linux: VLC, mpv, Totem Mobile: VLC for Android/iOS, MX Player Online: KaijuConverter, CloudConvert
If an AVI file refuses to play, the problem is almost always the codec, not the container. Installing the K-Lite Codec Pack (Windows) or using VLC (cross-platform) resolves 95% of playback issues.
How to Convert AVI to MP4 (FFmpeg)
# Fast re-mux — no re-encoding (only works if video is already H.264)
ffmpeg -i input.avi -c:v copy -c:a copy output.mp4
# Full re-encode to H.264 + AAC (maximum compatibility)
ffmpeg -i input.avi -c:v libx264 -preset slow -crf 22 -c:a aac -b:a 192k output.mp4
# Re-encode for web (add faststart for streaming)
ffmpeg -i input.avi -c:v libx264 -preset slow -crf 22 \
-c:a aac -b:a 192k -movflags +faststart output.mp4
# Convert to H.265/HEVC for smaller files (modern devices)
ffmpeg -i input.avi -c:v libx265 -crf 28 -c:a aac -b:a 192k output.mp4
How to Convert AVI to MKV
# Re-mux without quality loss (keeps original codec)
ffmpeg -i input.avi -c copy output.mkv
# Re-encode to H.264 inside MKV
ffmpeg -i input.avi -c:v libx264 -crf 22 -c:a libmp3lame -q:a 2 output.mkv
Batch Convert AVI to MP4 (All Files in a Folder)
# Linux / macOS
for f in *.avi; do
ffmpeg -i "$f" -c:v libx264 -crf 22 -c:a aac -b:a 192k "${f%.avi}.mp4"
done
# Windows PowerShell
Get-ChildItem *.avi | ForEach-Object {
ffmpeg -i $_.FullName -c:v libx264 -crf 22 -c:a aac -b:a 192k ($_.BaseName + ".mp4")
}
Why AVI Files Are So Large
AVI files are often much larger than equivalent MP4/MKV files for several reasons:
- Uncompressed or lightly compressed audio — PCM audio adds ~10 MB per minute
- Older, less efficient codecs — Xvid and DivX compress less than H.264 or H.265
- Padding bytes — the AVI format adds interleave padding for seeking
- No B-frames in some profiles — reduces compression efficiency
Converting to H.264 in an MP4 container typically reduces file size by 30–60% with no perceptible quality loss.
Common AVI Problems and Fixes
| Problem | Cause | Fix |
|---|---|---|
| "Codec not found" error | Missing codec pack | Install VLC or K-Lite |
| Audio out of sync | Bad interleave | Re-encode with FFmpeg |
| File stops at 2 GB | Old format limit | Check if OpenDML extension is used |
| No subtitles | Container limitation | Use MKV instead |
| Won't play on phone | DivX/Xvid not supported | Convert to H.264 MP4 |
When to Keep AVI vs Convert
Keep AVI when:
- The file is already high quality and you don't need to re-encode
- You're working in a legacy editing environment that requires AVI
- You just need to archive the file and storage isn't a concern
Convert to MP4 when:
- You want to play it on a phone, TV, or share online
- You want smaller file sizes
- You need streaming or web playback
Convert to MKV when:
- You want multiple audio tracks or subtitle tracks
- You're archiving video with maximum codec flexibility
Related conversions
Common video conversions that pair well with this guide: