PDFMove
The Old Audio Codecs Inside AVI and Conversion to MP3
Guide

The Old Audio Codecs Inside AVI and Conversion to MP3

7 min read

Why the inside of an AVI is a surprise box

AVI (Audio Video Interleave) is a container Microsoft introduced in the early nineties. Its design philosophy suited its era: a flexible, loose structure able to carry the output of any codec installed on Windows.

That flexibility kept AVI widespread for many years, but it also made it unpredictable. Two AVI files can look completely identical from the outside, and yet the audio inside one may be MP3 and inside the other uncompressed PCM. One file may open on your computer without trouble while another throws a "codec not found" error.

Most people who come across AVI today are dealing with an old archive: film folders on an external drive, digitised VHS tapes, old camera recordings, in-game videos. When you want to pull audio out of those files, the only thing that determines the quality of the result is which codec is sitting inside the container.

The container and codec distinction, in AVI's case

Let us recall the basic principle: a container is a box, a codec is how the things inside the box are compressed. The .avi extension tells you the type of the box; it tells you nothing about the format of the audio inside.

An AVI file typically holds one video track and one audio track. AVI is not as flexible as MKV; multiple audio tracks are technically possible but rare in practice. So the "which language do I take" question you get with MKV usually does not arise with AVI.

AVI's own distinctive question is this one instead: which codec was the audio inside compressed with?

The audio codecs you will find inside AVI

MP3 — the luckiest scenario

The period when AVI became widespread was also MP3's golden age. In the nineties and two thousands, a very large proportion of film and series files compressed with DivX or Xvid carried their audio as MP3.

For audio extraction this is a genuinely important advantage. If the audio inside is already compressed with the MP3 codec, pulling that data out of the container and writing it into a .mp3 file is pure copying. The audio is not decoded, not recompressed, no information is thrown away. Quality loss is zero and the process finishes very quickly, because the compression algorithm never runs at all.

This is a concrete advantage that sets AVI apart from MOV, MKV and especially WEBM. In those other containers this scenario is either rare or not possible at all.

One important warning: this does not mean you can change the extension by hand. The AVI container's own header and index structures sit inside the file and do not match the structure an MP3 file expects. The audio track genuinely has to be separated from the container — but that separation can be done losslessly.

AC3 (Dolby Digital) — the DVD legacy

In AVI files transferred from DVDs, AC3 is a frequently encountered codec and is usually multichannel (5.1, for example).

Turning AC3 into MP3 is a re-encode. The audio is decoded first, then compressed again with the MP3 algorithm. Because AC3 is already a lossy format, you get a double-encoding situation here: AC3 has thrown away some information according to its own model, and the MP3 encoder takes that already-reduced audio and applies its own reduction on top. Some quality loss is unavoidable, and the effects of the two losses do not cancel each other out, they accumulate.

On top of that, channel downmixing comes into play. MP3 is in practice a stereo format, so a 5.1 AC3 track is reduced to two channels. The dialogue in the centre channel now shares the same space as effects and music; that is why speech sounds more buried on headphones.

PCM — uncompressed raw audio

Old camera recordings, VHS digitisations and some raw footage files carry the audio without compressing it at all. PCM tracks take up a lot of space, but no information has been thrown away.

Turning PCM into MP3 is also a loss — MP3 is a lossy format, and by definition it discards information. But this scenario is more favourable than AC3: the compression starts from a clean source and does not have to wrestle with the traces of a previous lossy format. The result usually comes out better than an AC3 to MP3 conversion at the same bitrate.

ADPCM — a modest intermediate form

ADPCM is a lightly compressed variant of PCM. You see it in old game videos, low-capacity recording devices and some early multimedia files. Its compression ratio is low and the sound quality is usually modest.

Converting to MP3 is again a re-encode. But the real limit here is the source itself: ADPCM tracks are frequently low sample rate and single channel. Choosing a high MP3 bitrate does not fix that.

WMA — the Windows side's trace

Rarer, but some AVI files of Windows origin contain a WMA audio track. WMA is a lossy format as well, so moving to MP3 is again a double encode and involves a small loss.

The practical outcome: what should you expect?

If you do not know what is inside the AVI you have, you are facing two broad possibilities:

The good possibility (common): There is MP3 inside. Extraction is a lossless copy, it is fast, and your audio is bit for bit identical to the original.

The other possibility: There is AC3, PCM, ADPCM or WMA inside. A re-encode is needed and there will be a small quality loss. You cannot reduce that loss to zero, but you can keep it below the threshold of audibility with a sensible bitrate — 128-192 kbps for speech, 256 kbps and above for recordings containing music.

You do not have to make that determination by hand; our AVI to MP3 extractor reads the audio track inside the container and follows the appropriate route.

The unchanging truth about old archives

Finally, a point that is often forgotten when working with archive files: conversion cannot make the audio better than its source. The audio track in an AVI file from the nineties was compressed according to the disk and bandwidth constraints of that period. It is entirely normal to run into a recording that is low sample rate, mono and narrow in frequency range.

Turning such a source into a 320 kbps MP3 does not bring back the lost information, it only makes the file bigger. With old archives the right strategy is to pick a target that suits the quality of the source and, wherever possible, to allow the lossless copying route to be used.

In summary

AVI is an old, flexible container whose contents cannot be worked out from the outside. On the audio side it can carry MP3, AC3, PCM, ADPCM and, rarely, WMA. Only the first of those codecs allows lossless extraction — and the good news is that MP3 really is common in old AVI archives. In every other case, moving to MP3 is a re-encode and involves a small but real quality loss. Knowing that distinction when you work with your AVI files lets you set the right expectation of the result and of which bitrate makes sense.

Frequently Asked Questions

Why can AVI carry so many different audio codecs?

Because AVI is a flexible but loose container built on top of Windows' general media infrastructure. It was designed to carry the output of any audio codec installed on the system, so almost every audio format that appeared in the nineties and two thousands can be found inside an AVI file. That flexibility suited the needs of the era, but it was also the source of problems such as an AVI file opening on one computer and refusing to open on another.

If the audio inside is already MP3, is changing the file extension enough?

No, it is not enough. Changing the extension from .avi to .mp3 does not change the structure inside the file; the AVI container's own header and index structures are still there, and they do not match the structure an MP3 file expects. Most players will either refuse to open such a file at all or read corrupted data at the beginning. The audio track genuinely has to be separated from the container; that separation can be lossless, but it is not the same thing as changing the extension.

What is ADPCM and what happens when you convert it to MP3?

ADPCM is a lightly compressed variant of raw PCM audio, and you come across it in old game videos and low-capacity recording devices. Its compression ratio is low and the sound quality is usually modest. Converting to MP3 is a re-encode and brings some loss; but the real limiting factor is the quality of the source itself. Choosing a high MP3 bitrate does not improve a weak ADPCM track.

Why do dialogue lines sometimes become harder to follow when AC3 audio is turned into MP3?

AC3 tracks in AVI files sourced from DVDs are frequently multichannel, and in that mix the dialogue usually sits separately in the centre channel. Because MP3 is in practice a stereo format, the channels are downmixed to two and the dialogue now shares the same space as the music and effects. Add the wide dynamic range designed for cinema and speech can sound more buried on headphones. This is not a conversion fault, it is the natural consequence of channel downmixing.

Try this out right away with AVI → MP3 Dönüştür.

Try AVI → MP3 Dönüştür