What Is an AVI File and How Do You Play or Convert It?
AVI (Audio Video Interleave) is a multimedia container format introduced by Microsoft in 1992. It packages video and audio streams into a single file, but it does not define how that video or audio is compressed — that job belongs to the codecs inside it. This distinction matters: an AVI file can hold many different codec combinations, which is why some AVI files play everywhere and others refuse to open. You can usually play AVI with VLC or another modern player, and you can convert it to MP4 with tools like HandBrake or FFmpeg when compatibility is the problem.
AVI as a container, not a codec
Think of AVI as a box. The box holds:
- A video stream compressed with a codec such as DivX, Xvid, or an older MPEG variant.
- One or more audio streams, often MP3 or AC3.
- Metadata such as frame rate, resolution, and timing information.
Because the container and the codec are separate, two files both labeled .avi can behave very differently. A file using Xvid video and MP3 audio is widely supported. A file using an obscure or newer codec inside an AVI wrapper may fail to play even in players that handle AVI fine.
AVI was designed for relatively simple, sequential playback. It lacks some of the features modern containers like MP4 and MKV handle more gracefully, such as advanced subtitle tracks, multiple audio tracks with clean switching, and efficient streaming. That is a large part of why MP4 became the default for web and mobile distribution.
How to play AVI files
On Windows
Windows Media Player may play some AVI files, but support depends on which codecs are installed. If a file fails, the usual cause is a missing codec rather than a broken file.
The most reliable approach is VLC media player, which ships with its own codecs and does not rely on the system's codec pack. Install VLC, then open the AVI file through Media → Open File or by dragging it onto the window. If VLC plays it, the file is fine and the problem was your default player's codec support.
Alternatives include MPC-HC and MPV, both of which also bundle broad codec support.
On Mac
QuickTime does not natively support most AVI files. Options:
- VLC for macOS — same approach as Windows.
- IINA — a modern Mac player built on MPV that handles AVI well.
- Perian was a popular QuickTime plugin historically, but it is no longer maintained, so treat it as a legacy option rather than a current recommendation.
On mobile
- Android: VLC for Android, MX Player, or Just Player handle most AVI files. MX Player sometimes needs its codec pack for certain audio formats.
- iOS/iPadOS: VLC for iOS and Infuse are common choices. The built-in Files app preview generally will not play AVI.
In a browser
Browsers do not play AVI natively. If you need AVI content on a web page, convert it to MP4 with H.264 video and AAC audio first.
How to convert AVI to MP4
Conversion is the fix when a device, editor, or platform will not accept AVI. The goal is usually to re-wrap or re-encode into MP4 with widely supported codecs.
Using HandBrake (graphical, cross-platform)
- Open HandBrake and choose Open Source to load your AVI file.
- Under Presets, pick a general preset such as Fast 1080p30 (adjust for your source resolution).
- On the Video tab, confirm the encoder is H.264 (or H.265 for smaller files at the cost of compatibility).
- On the Audio tab, set the codec to AAC.
- Set the output filename and click Start Encode.
Expected result: an .mp4 file that plays on phones, browsers, and most editors. HandBrake re-encodes, so quality can shift slightly and the process takes time proportional to file length.
Using FFmpeg (command line)
To re-wrap without re-encoding (fast, lossless, but only works if the internal codecs are already MP4-compatible):
ffmpeg -i input.avi -c copy output.mp4
If that produces a file that will not play, the codecs inside are not MP4-friendly. Re-encode instead:
ffmpeg -i input.avi -c:v libx264 -crf 23 -c:a aac -b:a 192k output.mp4
-c:v libx264sets H.264 video.-crf 23controls quality (lower is better quality and larger file).-c:a aac -b:a 192ksets AAC audio at 192 kbps.
Expected result: a broadly compatible MP4. The -c copy version finishes in seconds; the re-encode version takes longer but fixes compatibility.
Converting to other formats
- MKV: change the output extension or use
-c copyif the codecs are MKV-compatible. MKV is also a container, so the same codec logic applies. - MOV: useful for some Apple workflows; H.264/AAC inside MOV is well supported.
- GIF or image sequence: for short clips only; expect large files and no audio.
Troubleshooting common AVI problems
| Symptom | Likely cause | Fix |
|---|---|---|
| Video plays, no audio | Unsupported audio codec (e.g., AC3 in a player without it) | Use VLC, or convert audio to AAC |
| Audio plays, black screen | Unsupported video codec | Use VLC, or re-encode video to H.264 |
| File will not open at all | Corrupt download or wrong extension | Re-download; verify the file plays in VLC |
| Out-of-sync audio | Variable frame rate or timing issues in the AVI | Re-encode with HandBrake or FFmpeg |
| Player says "codec missing" | System lacks the codec | Install VLC or a codec pack, or convert the file |
A quick diagnostic: open the file in VLC. If VLC plays it correctly, the file is intact and the issue is your other player or device. If VLC also fails, the file is likely corrupt or uses an unusual codec, and conversion or re-download is the path forward.
AVI vs MP4: when to use which
| Dimension | AVI | MP4 |
|---|---|---|
| Age and origin | 1992, Microsoft | 2001+, MPEG-4 standard |
| Codec flexibility | High, but older design | High, modern codecs (H.264, H.265, AV1) |
| Browser playback | No | Yes |
| Mobile playback | Limited without third-party apps | Broad native support |
| Streaming | Poor | Good |
| Editing support | Varies by editor | Broad |
| Best for | Legacy files, some capture devices | Sharing, web, mobile, editing |
Choose AVI when you are working with an existing AVI file or a device that outputs AVI. Choose MP4 when you are distributing, uploading, or playing on phones and browsers. If you have an AVI you need to share widely, converting to MP4 is usually the simplest reliable step.
Where AVI files come from
AVI remains common as an output from older digital cameras, screen recorders, and some capture hardware, and it is a frequent format in peer-to-peer file sharing. On BitTorrent sites such as The Pirate Bay, AVI appears alongside MP3 and other formats as a common media type in listings. If you download an AVI from a torrent, the same rules apply: check that your player supports the internal codecs, and convert if it does not. Note that downloading copyrighted material without permission may be illegal in your jurisdiction, so verify the licensing and legality of any file before you download it.