AVI is a box, and the codec inside it is the real problem
AVI (Audio Video Interleave) is a container. It records where the video frames and audio samples sit in the file and very little else; what decides whether the file plays is the codec used for the streams it wraps. AVI files from the DivX and XviD years almost always hold MPEG-4 Part 2 video alongside MP3 or AC-3 audio, and older ones can hold Cinepak, Indeo or Microsoft Video 1, decoders that shipped with a desktop operating system two decades ago and were quietly dropped along the way.
That combination is why an AVI can play perfectly on the machine that produced it and do nothing at all on a phone, a smart TV or a browser tab. Converting to MP4 replaces both halves at once: the wrapper becomes the one every player expects, and the streams are re-encoded to H.264 video and AAC audio, the pairing hardware decoders have been built around for well over a decade.
What the Quality select is really setting
The three choices under Quality map to a single number in the encode command, libx264’s Constant Rate Factor:
- High quality (larger file) runs CRF 18.
- Balanced (recommended) runs CRF 23, which is also the value an unrecognised setting falls back to.
- Smaller file (lower quality) runs CRF 28.
CRF targets a perceived quality level rather than a file size, so a lower number means better quality and the resulting size depends entirely on how hard the footage is to compress. A static screen recording at CRF 23 can land at a fraction of the source; a grainy tape transfer at CRF 18 can land above it. All three settings use the fast x264 preset, which gives up a little compression efficiency in exchange for encode time, and all three write the MP4 with +faststart, so the file’s index sits at the front and a browser can start playing before the download completes.
Putting an AVI through it
- Drop the AVI onto the box above, or use Choose a file. The drop zone accepts
.aviand nothing else, so a file with any other extension is refused with a message naming what it will take. - Set Quality, or leave it on Balanced.
- Click Convert AVI to MP4 and watch the percentage. The first run in a fresh page load also has to fetch and start the WebAssembly FFmpeg core, so the counter can sit at zero for a while before it starts moving.
- Download the result. The name is your original with the extension swapped, so
holiday-2004.avicomes back asholiday-2004.mp4.
The audio is re-encoded whatever you choose
Quality only touches the video stream. Audio is always encoded to AAC at 128 kbps regardless of the setting, which is a sensible default for speech and camcorder sound and a slightly stingy one for music. It is worth knowing if the AVI is a concert recording or a ripped music video, because picking High quality will not buy the soundtrack anything at all.
The command also sets no explicit stream mapping, so FFmpeg’s default selection takes one video stream and one audio stream. Nearly every AVI holds exactly that, but a rare multi-language capture will come out with a single audio track. If the sound was all you wanted, converting first and then running the MP4 through MP4 to MP3 works, at the cost of a second lossy pass; what that second pass costs you is laid out in the guide on why re-encoding loses quality.
There is no stream-copy shortcut for AVI
MKV to MP4 attempts a stream copy before it re-encodes anything, because an MKV usually already holds H.264 or HEVC video that an MP4 container can carry across untouched. AVI rarely does. Its typical payload is MPEG-4 Part 2 with MP3 audio, and while that can technically be placed inside an MP4, the result is a file plenty of phones and browsers still refuse to play, which defeats the point of converting in the first place. So this page always re-encodes, and a full re-encode on a single-threaded WebAssembly FFmpeg build is genuinely slow work: minutes for a long clip, running on your own CPU, with the tab left open.
In practice the thing that catches people out is expecting AVI to behave like MKV here. It cannot, and a converter that promised an instant remux for AVI would mostly be producing files that still do not play.
What the MP4 unlocks afterwards
The output is a plain H.264 MP4, which is exactly what the tools that refuse an AVI are waiting for. Compress Video accepts .mp4 only, with presets aimed at email, WhatsApp and Discord attachment limits. Trim Video accepts .mp4, .mov, .m4v and .webm, so a converted clip can be cut down without a second full encode. And if MP4 was not the target at all, the Video Converter hub takes an AVI directly and offers MP4, WebM or GIF, though its MP4 path runs one fixed quality level with no dial to turn.