Categories About Us Contact Us Become a Member

What Is an AVI File? A Box for Video, and the Box Is Not the Video

An AVI file is a video container from Microsoft. Jump to your question below, or read it through in order.

By Neeraj Singh ~20 min Updated Sep 2026 Checked against Microsoft's own reference
Short answer

An AVI file is a box that holds video and audio together. It is a multimedia container, Microsoft built it in 1992 and AVI stands for Audio Video Interleave.

The box does not compress anything. Something else inside it did that, and which something decides whether your player can show the video at all. That one idea answers most questions people bring to this page.

1 What is an AVI file? Microsoft's video container, from 1992 and still around

Microsoft released AVI on 10 November 1992 alongside Video for Windows, back when playing video on your PC was itself the achievement. It is one of the oldest video formats still in normal use.

That name describes the layout. Audio and video are interleaved: a slice of picture, then its sound, then the next slice. Read front to back and sound always arrives with the right frame. That mattered enormously when video streamed off a CD-ROM at walking pace.

AVI is the container. It carries video and audio; it does not produce them. Every question about quality, size and playback is really about what somebody put inside.

AVI file format at a glance

AVI file format at a glance
File extension
.avi
Stands for
Audio Video Interleave
Released by
Microsoft, 10 November 1992
Shipped with
Video for Windows
Category
Multimedia container
Built on
RIFF, the Resource Interchange File Format
Byte order
Little-endian
Signature
52 49 46 46, then AVI at byte 8
Original size limit
About 2GB
With OpenDML
Whatever the disk allows
Media type
None registered with IANA

This page used to print four header fields that do not exist. It listed a “time scale”, a “data rate”, a “starting time” and a “size of AVI data chunk” at bytes 40 to 52 of the main header.

Those sixteen bytes are dwReserved. Microsoft's reference describes them in five words: “Reserved. Set this array to zero.” The corrected table is in section 11.

Where an AVI file comes from

Camcorder tape captured to your computer. Screen recorders, old video editors, security cameras. Or downloads from the days when everything came as an AVI. Modern phones and cameras write MP4 instead.

That history matters, because an AVI from 2004 and an AVI from a preservation lab last week have almost nothing in common apart from the wrapper.

RIFF is a family, and AVI has relatives. A WAV audio file and a WebP image use the same outer structure. All three begin with the letters RIFF, and the four bytes at offset 8 are the form type that says which one you are holding. RIFF itself dates to 1991, a year before AVI.

Containers hold video. Codecs make it. AVI is the container, and DivX, Xvid, MJPEG or plain uncompressed video is the codec. Containers never touch video quality.

2 A container is not a codec The one confusion behind almost every AVI complaint

Search for AVI and you will be told it stores high quality video, that it compresses less than other formats and that it makes large files. All three describe the codec and give the credit to the container.

FI
From the file directory ranking first for this term

“The AVI video format can store high-quality video and audio and typically uses less compression than other similar video formats such as .MPEG and .MOV.”

Containers have no compression setting. Put Xvid video in an AVI and in an MP4 and picture data comes out byte for byte identical. MP4 runs a few megabytes smaller over a feature film because its bookkeeping is leaner, and that is the entire difference.

What a container does against what a codec does. The container AVI, MP4 or MKV decides how tracks are packed, indexed and labelled. The codec H.264, Xvid, DivX or MJPEG decides how large the video is and how it looks.
Only one of these two touches the picture, and it is never the container.

What the AVI container does, and what the codec does

The container

AVI, MP4, MKV. Decides how tracks are packed, indexed and labelled. Holds the streams, the timing and the index a player seeks with.

The codec

H.264, Xvid, DivX, MJPEG. Decides how big the video is and how it looks. Every frame you see came out of it, not out of the container.

AVI names its codec with a FourCC, four characters written into the stream header. XVID, DIVX, MJPG, DX50. From the 1990s you meet CVID for Cinepak or IV50 for Indeo. Microsoft calls the field fccHandler. Those letters say what made the video. The container does not supply it.

That is why an AVI can refuse to play while another opens fine. Your player read the FourCC, looked for that decoder and found nothing. The file is not broken, and section 5 covers what to do.

So why are AVI files big? Because of what people put in them. AVI carried uncompressed and DV footage for years, and both are enormous by design. A modern codec in an AVI gives a modern file size.

Three parts. hdrl describes the streams, movi holds the actual audio and video, then idx1 indexes it so a player can jump to the middle.

3 What is inside an AVI file A description, the data and a map

RIFF stores everything in labelled blocks called chunks. Every chunk begins with four characters naming it and four bytes giving its length, so a reader that meets something unfamiliar can step over it and carry on.

The three top-level parts of an AVI file. The hdrl chunk describes the streams, the movi chunk holds slices of video and audio alternating, and the optional idx1 chunk records where every slice sits so a player can seek.
A description, the data and a map. Lose the map and you lose seeking, not the video.

The three parts of an AVI file

The top-level parts of an AVI file, in the order they appear.
ChunkWhat it holds
hdrlThe description. Width, height, frame timing, how many streams and which codec every one uses
moviThe data. Slices of video and audio alternating, which is the interleaving in the name
idx1The map. Where every slice sits, so a player can seek. Optional, and its absence is why some files will not scrub

Inside hdrl sits avih, the main header, plus one strl list per stream. Every strl carries strh to say what kind of stream it is, then strf to describe its format.

How a chunk of data is labelled

Inside movi, every piece is named by two digits for the stream number and two letters for the kind. Microsoft documents four kinds.

The two-letter codes on data chunks, from Microsoft's reference.
CodeMeaningExample
dcCompressed video frame00dc is video on stream 0
dbUncompressed video frame00db on the same stream
wbAudio data01wb is audio on stream 1
pcPalette changeRare, and only in old 256-color files

You will also meet chunks labelled JUNK. Those are padding, put there so real data lands on tidy boundaries for the disk. Microsoft is direct about them: applications “should ignore the contents of a ‘JUNK’ chunk”.

The index is why a damaged AVI often still plays. Lose idx1 and a player can usually still read movi from the start. You lose seeking, not the video. Tools that repair AVI files mostly just rebuild that index.

Install VLC. It carries its own decoders, so it plays the old DivX and Xvid files that built-in players choke on, and it is free on every system including phones.

4 What opens an AVI file One answer covers almost everybody

Built-in players open AVI files fine. Where they fall down is the codec, because Microsoft Windows and macOS ship with a short list and most AVI files in the world were made with something outside it.

Players that open an AVI file

What plays an AVI on every system, and what to expect from it.
SoftwareCostWhat to expect
VLC media playerFree, open sourceThe reliable answer. Brings its own decoders, runs on Windows, macOS, Linux, Android and iOS
Media Player, Films & TVBuilt in to WindowsOpens most AVI files. Gives audio only when the codec is not installed
QuickTime on macOSBuilt inHandles simple AVI files and refuses most DivX and Xvid ones
mpv, IINAFree, open sourceLight and fast. IINA is the Mac-native face of mpv
KodiFreeBuilt for a library of files on a television rather than one file on a desk
FFmpegFree, open sourceNot a player. The engine underneath most of the above, and the tool for converting

Phones have no built-in answer. Neither iOS nor Android opens AVI files reliably on its own. VLC for Android and VLC for iOS are both free.

Never install a codec pack a website tells you to install. A page that will not play a video and offers a download to fix it is running the oldest trick on the internet.

VLC and FFmpeg need nothing extra, ever. If VLC cannot play it, another codec pack will not help either. The download will not be a codec.

Handling other video on the same machine? MP4 video files and MKV video files are what most of your library will be, and the same players cover all three.

Sound but no picture. Picture but no sound. Or flat refusal. All three usually mean the codec is missing, and all three usually end the moment you open your file in VLC.

5 When an AVI file will not play What the symptom means, and what to try first

An AVI fails in oddly specific ways, and the way it fails tells you which half is missing. Players that open the container but lack the video decoder show you a black rectangle with perfect sound.

What the AVI symptom is telling you

Common AVI symptoms and where the fault actually sits.
What you seeWhat it usually meansStart with
Audio only, no video, black or green pictureThe video codec is not installedVLC, which brings its own
Picture plays, no soundThe audio codec is missingVLC again. Often an old AC-3 track
Player refuses the file outrightCodec not installed, or a damaged headerVLC, then a rebuild if it still fails
Plays but will not scrub or seekThe idx1 index is missing or wrongLet it play through, or rebuild the index
Sound drifts out of sync as it runsVariable bitrate audio in a container built for constantConvert it, which fixes the timing
Stops partway, every time, same spotA truncated download or a bad copyThe source file, before anything else

Work down this list, not up it

1 Open it in VLC. This ends it most of the time, and it costs nothing. Do this before reading any further.
2 Check the file size. A video that stops at the same second every time is usually a download that never finished. Nothing below helps with that.
3 Look at what VLC reports. Tools, Codec Information names the video and audio codecs it found. That tells you what the file actually holds.
4 Convert it and keep the copy. If VLC plays it, FFmpeg or HandBrake can turn it into an MP4 that everything else plays. See section 8.
5 Rebuild the index, only for seeking faults. A file that plays start to finish but will not scrub has an index problem, and that is repairable.

Real AVI files are messier than the specification. The reference that free software is built from says of the header flags: “Ignore it. Really. It's broken in too many files.” Index tables disagree with chunk headers, and sizes are often wrong. Players cope by not trusting the file, which is also why VLC succeeds where stricter software gives up.

Original AVI stops near 2GB, and a hard ceiling sits at 4GB. OpenDML, informally AVI 2.0, gets past both by chaining extra RIFF chunks tagged AVIX.

6 The 2GB limit, and how OpenDML got around it The most practical fact about AVI, and most guides skip it

Capture an hour of video to AVI on old software and it stops. Not with an error you can act on, just a file that ends. This caught everybody digitising tape, and it has two separate causes.

The AVI file size ceilings. About 2 gigabytes comes from the FAT16 filesystem and from software reading the size field as signed. 4 gigabytes is the format itself, because sizes and index offsets are 32-bit. OpenDML chains extra RIFF chunks and the ceiling becomes the disk.
Two different limits, and only the second one belongs to AVI itself.

Two AVI size ceilings, from two different places

Where the AVI size limits come from, and which one you are hitting.
CeilingWhere it comes fromWho hits it
About 2GBThe FAT16 filesystem, plus software reading the size field as signedOld capture software, old drives
4 GBThe format itself. Sizes and index offsets are 32-bitAnything writing plain AVI, even today
Whatever the disk allowsOpenDML, by chaining more RIFF chunksModern software, which writes this by default

The Library of Congress puts the original problem plainly. AVI had “an effective limit in a FAT16 filesystem of 2 GB, small for a high resolution video file”.

What OpenDML changed

A group tied to Matrox Electronic Systems published extensions that stop any file being one RIFF chunk. Extra chunks tagged AVIX chain on behind it. The index moves from idx1 to a larger indx which, as the Library of Congress notes, identifies “the locations of video fields as well as frames”.

Version 1.02 arrived in 1997. People call this AVI 2.0 and the original AVI 1.0, though neither name is official. In practice your ceiling becomes the filesystem, and one specialist put NTFS at 32 terabytes.

Digitising tape, or capturing long footage? Your software almost certainly writes OpenDML now and the old limit will not bite. Software old enough to hit it is old enough that the 2GB stop is the least of its problems.

An AVI over 4GB is still an AVI. Nothing about the extension or the opening bytes changes, so players that do not understand AVIX read the first chunk, play it and stop early with no error. That is a rare fault now, and a baffling one when it happens.

No subtitles, no chapters, no fonts, no alpha. Add trouble with modern video and variable bitrate audio, and you have the reason MP4 and MKV took over.

7 What an AVI file cannot do The honest list, and it is the reason for MP4

AVI was designed before most of what we now expect from video existed. It holds streams next to one another and nothing else, which was the right answer in 1992 and is a short list of gaps now.

What AVI cannot carry, and what the modern containers do instead.
What is missingWhat it means for you
SubtitlesNo attachments at all, so subtitles ride along as a separate SRT file or get burned into the picture
Chapters and menusNo way to mark scenes. MP4 and MKV both have them
B-framesAVI was never meant to hold video that refers to frames ahead of itself, which is how modern codecs save space
Variable bitrate audioVBR is unreliable here, and the classic result is sound drifting out of sync over a long file
Aspect ratioAbsent from the original spec, so widescreen video can play squashed. OpenDML added a method
Alpha channelNo transparency, which rules AVI out for a lot of graphics work
Real metadataAlmost nothing. No proper title, date or camera fields

The B-frame problem, and the hack around it

Modern video codecs save space by letting frames refer to frames that come later. AVI has nowhere to record that, because it assumes every chunk is one frame shown in order.

DivX and Xvid wanted those frames anyway, so they invented packed bitstream: stuff more than one frame into every chunk and let the decoder sort it out. Built as a hack to get B-frames through Video for Windows, it worked. It also left thousands of files that some players count wrong.

There is also a quiet tax. An AVI carrying a standard-definition feature film gives up roughly 5MB an hour in overhead, because every chunk carries its own header.

Four things AVI is not. It is not a codec. It is not MP4. It is not compressed by the container, whatever you read elsewhere. It is not streaming, because it was built to read off a disk. And it is not one thing, because what sits inside changes everything.

None of this makes AVI broken. It is a 1992 answer to a 1992 question, still doing that job. The formats that replaced it did not fix AVI; they were designed once the problems were known.

HandBrake for clicking, FFmpeg for typing. Convert AVI to MP4 and it plays everywhere, and if the video inside is already modern you can remux in seconds and lose nothing.

8 Converting an AVI file Two routes, and one of them is free of quality loss

There are two genuinely different operations here, and knowing which one you need saves both time and picture quality.

Remux against re-encode, for an AVI file

Remux

Swap the box, keep the video. Seconds, and nothing is lost. Works when the codec inside is one MP4 accepts, which usually means H.264.

Re-encode

Rebuild the video. Minutes or hours, and quality drops a little. Needed for Xvid, DivX and anything uncompressed.

Try the fast one first. If FFmpeg accepts the copy, you are finished in seconds with an identical picture.

Remux, if the codec allows it ffmpeg -i input.avi -c copy output.mp4 Copies both streams untouched. Fails with a clear message when MP4 will not take the codec, and then you re-encode.
Re-encode, when it will not copy ffmpeg -i input.avi -c:v libx264 -crf 20 -c:a aac output.mp4 Lower the number after crf for better quality and a larger file. 18 is close to invisible, 23 is the default.

Converting an AVI without typing anything

HandBrake is free and runs on Windows, macOS and Linux. Its Fast 1080p30 preset is a sensible answer for almost any old AVI. Drop the file in, choose MP4, start.

Think twice before using an online converter on anything private. Your video is uploaded to somebody else's server, sits there, then stays out of your hands.

HandBrake and FFmpeg run on your own machine and cost nothing. For holiday footage it hardly matters. For anything from a camera in your home it does.

Deciding where to send it? What an MP4 file is covers where most of it should end up, and the MKV container holds subtitles and multiple audio tracks that AVI cannot. Pulling out just the sound gives you an MP3 audio file.

The US National Archives wraps its uncompressed video masters in AVI. This format lost on sharing and won on archiving, for exactly one reason: it barely touches your data.

9 Why archives still choose AVI Obsolete for sending, current for keeping

Every guide tells you AVI is dead. The people whose job is keeping video readable in fifty years disagree, and they are not being sentimental.

NA
The US National Archives, on preserving standard-definition video

“Currently, the Video Preservation Lab creates uncompressed video streams in an AVI (Audio Video Interleaved) wrapper for the SD preservation master product option.”

The reasoning inverts every complaint on this page. AVI has no chapters, no subtitle tracks, no metadata scheme and no clever compression, so there is almost nothing in it to misread later.

Paired with a lossless or uncompressed codec, what goes in comes back out. It is simple, it is documented and free software has read it correctly for thirty years.

Formats that do very little make poor delivery and good storage. That is the entire argument, and it is why AVI has outlived formats that beat it comfortably on every feature list.

Digitising family tape? Capture to AVI if your software offers it, keep that file untouched and convert a copy to MP4 for watching. The big file is the negative and the small one is the print.

This is the opposite of the usual advice, and both are right. For sending video to somebody, use MP4 and do not think about it. For the only copy of something that cannot be recaptured, simple and boring beats clever.

DV AVI holds footage captured off a digital camcorder. Type 1 keeps audio and video as one stream. Type 2 splits them, stores the audio twice and works with older software.

10 DV AVI, and why there are two types The files that come off a camcorder tape

Capture MiniDV tape to your computer and what lands is a DV AVI, an ordinary AVI wrapped around the DV format the camera recorded. One hour fills about 13GB, which is why the 2GB limit hurt so many people.

DV puts audio and video into one interleaved stream on the tape. That left Microsoft choosing how to store it in a container built around separate streams, and rather than choose, it allowed both.

The two DV AVI layouts, as Microsoft documents them.
LayoutHow it stores the audioTrade-off
Type 1One stream, exactly as the tape recorded itNothing duplicated, so files are smaller. Video for Windows cannot read it
Type 2Two streams, with the audio also left inside the videoThe audio is stored twice, so files are larger. Older software reads it

Microsoft is blunt about the catch in Type 1: “the type-1 format is not compatible with Microsoft Video for Windows”. In Type 2, audio still sits inside the video stream as well, and, in Microsoft's words, “the audio is simply hidden by labeling the stream as video”.

Microsoft supplies both directions. A Type 2 file becomes Type 1 through the DV Muxer filter, and a Type 1 file becomes Type 2 through the DV Splitter filter. Older software that wants VFW compatibility needs Type 2.

Sitting on old camcorder captures? Either type converts to the other, and either one converts to MP4. Keep the original DV file if the tape is gone, because it is the closest thing left to the recording.

DV AVI is one of the good reasons a large AVI exists. Around 13GB an hour is not the container being wasteful. DV records a fixed amount per second by design, which is exactly why it survives generations of editing without falling apart.

Documented by Microsoft, open to read and never registered with IANA. The main header is 56 bytes, and the last sixteen of them are reserved.

11 AVI format and structure Skip this unless you are reading a file by hand

You do not need this section to play anything. It is here for two reasons. The old version of this page got part of it wrong for years. And AVI is unusual among the formats on this site, because it is closed in no way at all.

What is known about the AVI format

What can be said about the AVI format with a source behind it.
PropertyValue
Published specificationYes. Microsoft documents it publicly
Media typeNone registered with IANA. No AVI type appears in the registry
Quoted in the wildMIME video/x-msvideo, unregistered. The x- prefix marks a type nobody registered
Container familyRIFF, shared with WAV and WebP
Byte orderLittle-endian
Signature52 49 46 46 at offset 0, then AVI at offset 8
Main headeravih, 56 bytes of data
Codec named byA FourCC in the stream header
Indexidx1, or indx under OpenDML

Note the trailing space in AVI . A FourCC is always four characters, so a three-letter name is padded. Code that tests for the three letters alone will match things that are not AVI files.

The AVI main header layout. Offsets 0 through 36 hold the frame timing, data rate, padding, flags, frame counts, stream count, buffer hint, width and height. Offsets 40 through 52 are dwReserved, which Microsoft says to set to zero.
Ten real fields, then sixteen bytes that hold nothing at all.

The main header, corrected

This is where the old page invented fields. Real layout comes from Microsoft's own reference, and those last four entries are the correction.

The AVI main header, from Microsoft's AVIMAINHEADER reference.
OffsetFieldWhat it holds
0dwMicroSecPerFrameMicroseconds between frames, which is the frame rate upside down
4dwMaxBytesPerSecRoughly the highest data rate in the file
8dwPaddingGranularityWhat to pad data out to, in bytes
12dwFlagsOption bits. Widely wrong in real files
16dwTotalFramesHow many frames there are
20dwInitialFramesZero, except in some interleaved files
24dwStreamsHow many streams. Not limited to two
28dwSuggestedBufferSizeA hint for the reader
32dwWidthWidth in pixels
36dwHeightHeight in pixels
40 to 52dwReserved[4]Reserved. Microsoft: “Set this array to zero”

Sixteen bytes of nothing, and the old version of this page gave all four of them names and meanings. Any table of AVI header fields listing a time scale or a starting time at those offsets came from the same wrong source.

AVI is the rare open one here. Most formats on this site were reverse-engineered because nobody published anything. Microsoft published this. The trouble with AVI was never secrecy. The specification left too much optional, and thirty years of software filled the gaps differently.

Frequently asked questions about AVI files

What is an AVI file?
An AVI file is a multimedia container from Microsoft, released with Video for Windows in 1992. AVI stands for Audio Video Interleave. It holds a video track and one or more audio tracks side by side, but it does not compress them itself.
Why will my AVI file not play?
Almost always a missing codec rather than a damaged file. AVI names the codec inside but does not carry it, so your player needs that codec installed. VLC ships with its own decoders and plays files that Windows Media Player cannot.
What does AVI stand for?
Audio Video Interleave. The name describes how the file is laid out. Small pieces of video and audio alternate all the way through, so a player reading front to back always has the sound that belongs with the picture.
Is AVI better than MP4?
For sending a video to somebody, no. MP4 is smaller at the same quality and plays on phones, browsers and televisions. AVI still wins for archiving uncompressed footage, which is why the US National Archives uses it as a preservation wrapper.
Why is my AVI file so large?
Because of what is inside it, not the container. AVI was popular for uncompressed and DV footage, which is enormous by design. The same video encoded with a modern codec is the same size in an AVI as it is in an MP4.
What is the AVI 2GB limit?
Original AVI files hit a wall around 2GB, from the FAT16 filesystem and from software treating a size field as signed. The OpenDML extensions, informally AVI 2.0, get past it by chaining extra RIFF chunks tagged AVIX.
How do I convert an AVI to MP4?
HandBrake is free and converts AVI to MP4 in a few clicks, and one FFmpeg command does the same. If the video inside is already H.264, FFmpeg can remux it into MP4 in seconds without re-encoding, so nothing is lost.
Can AVI files have subtitles?
Not inside the file. AVI carries no attachments, so subtitles either travel as a separate SRT file or are burned into the picture. MP4 and MKV both hold subtitle tracks, which is one reason they replaced AVI.
What is inside an AVI file?
Three parts. A header list called hdrl describes the streams. A movi list holds the interleaved audio and video. An index called idx1 usually follows, saying where every piece sits so a player can seek.
Is AVI still used in 2026?
Rarely for sharing, regularly for archiving. The US National Archives wraps its uncompressed standard-definition masters in AVI, and video editors still write it. For anything you plan to send, MP4 is the answer.
What is DV AVI, and what are Type 1 and Type 2?
DV AVI holds footage captured from a digital camcorder. Type 1 keeps the audio and video interleaved as one stream. Type 2 splits them into two, which wastes space but works with older Windows software.
Is an AVI file safe to open?
The video data itself cannot run. The real risks are a file named movie.avi.exe, which is a program, plus sites that demand you install a codec pack to watch something. Use VLC, which needs no extra codecs.

Still stuck with an AVI file?

Two questions sort out most of what is left. Answer them in order.

Have you tried VLC?

Do that first. It is free, it brings its own decoders and it ends most AVI problems on its own. See section 4.

Does it play at all?

Then convert and keep the copy. An MP4 plays on everything, and section 8 has the one command that does it.

Sorting out a folder of mixed video? The MP4 file format is where most of it belongs. MKV files hold subtitles and several audio tracks, and FLV video files are the other format from that era you will find.

Only after the sound? MP3 audio files are what an extraction gives you, and WMA audio is the Windows equivalent from the same years.

Working with the pictures instead? The TGA image format and PCX picture files come from the same era of PC graphics, and DDS texture files are where uncompressed frames ended up in games.

Stuck on your player rather than your file? Our Windows fixes and macOS guides cover the system side.

New to all of this? What a file format is covers the ground underneath, and our file format guides list the rest.

Found something here that does not match your own file? Send us the exact wording on screen and we will check it against Microsoft's reference.

Was this page helpful? Thanks for your feedback!