RedpandaCompress Blog

Free Video Compression for Everyone.

AVI to MP4: How to Modernize Old Video Files Without Losing Quality

You dig out an old hard drive, a burned DVD-R or a folder your parents copied off a camcorder, and everything inside is .avi. Double-click it on a modern Mac and QuickTime shrugs. Drop it into your phone’s photo library and it refuses. Upload it to a website and you get “unsupported format”. The footage is fine — the container around it is thirty years old.

Converting AVI to MP4 fixes it permanently, and it usually makes the file dramatically smaller at the same time. Here’s what is actually inside those files, what you gain and lose in the conversion, and how to do it without uploading decades of family video to somebody else’s server.

Why your AVI files stopped playing

AVI (Audio Video Interleave) is a Microsoft container from 1992. A container doesn’t compress anything — it’s a box that says “here is a video track, here is an audio track, here is how they line up.” The problem isn’t the box itself. It’s that the codecs people put inside AVI files in 1998–2010 are the ones modern software quietly dropped support for.

Windows Media Player used to lean on system-wide codec packs, so any AVI played as long as you’d installed the right one. Browsers, phones and modern editors don’t work that way. They ship a fixed, small list of decoders — essentially H.264, HEVC, VP9 and AV1 — and anything else is simply not readable. Your DivX file didn’t break; the decoder that used to open it is no longer installed anywhere.

AVI also has real structural limits that modern containers don’t: no native support for modern variable frame rates, awkward handling of B-frames, a 2GB ceiling in the original spec (raised, but inconsistently implemented), and no standard place to store the rotation flag or chapter data. MP4 handles all of it.

What is actually inside your AVI file

“AVI” tells you almost nothing about the video. Before you convert, it helps to know which of these you have — it predicts both how much smaller the MP4 will be and whether quality is a concern at all.

Codec inside the AVIWhere it came fromTypical sizeWhat conversion changes
DV / DVCPROMiniDV camcorder tapes captured over FireWire~13 GB per hourHuge size win — 85–95% smaller, no visible loss
MJPEGEarly digital cameras, webcams, some dashcams~4–6 GB per hourBig size win — every frame is a separate JPEG, so there’s a lot of redundancy to remove
DivX / Xvid (MPEG-4 Part 2)Downloaded video and DVD rips, roughly 1999–2010700 MB–1.4 GB per movieModest size win, mainly a compatibility fix
MPEG-1 / MPEG-2Video CDs, DVD extractions, TV capture cards~2–4 GB per hourLarge size win, no visible loss
WMV / VC-1Windows Movie Maker exports, old screen recordersVaries widelyCompatibility fix; size depends on the original bitrate
Uncompressed / rawScientific capture, some editing intermediates50 GB+ per hourEnormous size win — often 99% smaller

The pattern: the older and less compressed the codec, the more you gain. Files that were already aggressively compressed (DivX, Xvid) convert mostly for compatibility, and you should not expect them to shrink much without giving up quality.

A worked example: 20 minutes of camcorder tape

The most common “why is this file so enormous” case is DV-AVI — footage captured off a MiniDV camcorder. DV is a fixed-bitrate format: 25 Mbit/s for video plus uncompressed audio, which works out to roughly 216 MB per minute no matter what you shot.

  • Source: 20-minute DV-AVI, 720×480, 4.3 GB
  • Output: H.264 MP4 at about 2.5 Mbit/s with AAC audio — roughly 380 MB
  • Result: ~91% smaller, and it now plays on a phone, in a browser and in every editor

That is not a trick. DV was designed in the early 1990s to be edited frame-by-frame off tape, so it compresses each frame independently and never looks at the frame before it. H.264 encodes the differences between frames instead, which is why an interview where only the subject’s face moves compresses so well. You’re not throwing away detail so much as stopping the file from storing a nearly identical picture 30 times a second.

The same logic applies to MJPEG from old cameras: it’s literally a sequence of JPEG stills, and a modern codec finds enormous redundancy between them.

How to convert AVI to MP4 in your browser

Old home video is exactly the kind of footage you don’t want sitting in a stranger’s upload queue. Most online converters take your file, send it to a server, process it there and hand you back a download link — which means a copy of your family archive lives somewhere you can’t audit, for as long as their retention policy says.

The AVI to MP4 converter on RedPandaCompress works differently: the conversion runs entirely inside your browser tab using WebAssembly FFmpeg. Nothing is uploaded, nothing is queued, and there’s no per-file pricing because we’re not paying for the compute — your own machine does the work.

  1. Open the converter and drop your AVI onto the page — or pick several at once.
  2. Conversion starts immediately. There’s no upload progress bar because there’s no upload; the first thing you see is the encoder working.
  3. Download the MP4. Output is always H.264 video with AAC audio — the combination that plays on effectively every device made in the last fifteen years.

Files up to 8 GB work on desktop browsers and 2 GB on mobile, with no signup, watermark or daily quota. Recognized inputs cover the codecs in the table above — MPEG-4/DivX/Xvid, MJPEG, MPEG-1/2, WMV/VC-1, DV and raw video, with MP3 or PCM audio. If a file uses something genuinely exotic you get a clear error rather than a silently broken output.

If your archive is a mix of formats, the same engine handles MOV, MKV, WebM and WMV in one place — see our converter overview for the full set.

Will converting cost you quality?

Honest answer: technically yes, practically almost never for AVI sources.

Some conversions are lossless. When a file already contains H.264 video — most MOV and MKV files, for instance — the streams can simply be moved into an MP4 container without being decoded, which is instant and bit-identical. AVI almost never holds H.264, so an AVI conversion is a real re-encode: decode the old codec, encode H.264.

What saves you is the gap in efficiency. H.264 is roughly two to three times more efficient than MPEG-4 Part 2 (DivX/Xvid) and far ahead of DV or MJPEG, so an H.264 encode at a fraction of the original bitrate still holds more detail than the source ever did. The one case to be careful about is a DivX or Xvid file that was already compressed hard — squeezing it further will show. For those, convert for compatibility and leave the bitrate generous rather than chasing a smaller number.

If you’re curious why H.264 and not something newer, we compared the options in H.264 vs H.265 vs AV1. The short version: newer codecs are smaller, but H.264 is the only one you can hand to anyone and be confident it just plays.

AVI vs MP4 at a glance

AVIMP4
Released19922001
Plays on phonesRarelyEverywhere
Plays in browsersNoYes
Accepted by messengers and web uploadsUsually rejectedStandard
Typical codecsDivX, Xvid, MJPEG, DV, MPEG-2H.264, HEVC, AV1
Streaming-friendlyNoYes (fast-start)
File size for the same footageBaselineOften 50–95% smaller

Frequently asked questions

Can I convert AVI to MP4 without re-encoding?

Only in the rare case where the AVI already contains H.264 video — some capture cards and screen recorders produced these. Nearly all real-world AVI files hold DivX, Xvid, MJPEG, DV or MPEG-2, none of which MP4 players can decode, so the video has to be re-encoded. That’s also where the size savings come from.

Why is my AVI file so large compared to a modern video?

Because the old codecs mostly compress each frame on its own instead of storing only what changed between frames. DV runs at a fixed 25 Mbit/s regardless of content; a modern H.264 encode of the same shot might need 2–3 Mbit/s. Same picture, a fraction of the data.

Is it safe to convert old family videos online?

It depends entirely on whether the tool uploads your file. Server-side converters transmit and store a copy of your footage. RedPandaCompress runs the conversion locally in your browser with WebAssembly — the file never leaves your device, so there’s nothing to store, leak or delete later. You can confirm it by disconnecting from the network once the page has loaded; the conversion still finishes.

What happens to the audio track?

MP3 audio is carried over unchanged where possible. Uncompressed PCM audio — common in DV and MJPEG captures, and a real contributor to those file sizes — is converted to AAC, which is inaudibly different and a fraction of the size. The result is a single MP4 with one video and one audio track.

Convert the archive once, keep it forever

An AVI file is a countdown: every year, fewer programs can open it. Converting to H.264 MP4 gets your footage into the one format that phones, browsers, TVs, editors and every upload form agree on — and for camcorder and camera-era files, it typically reclaims 80–95% of the disk space at the same time.

Convert your AVI files to MP4 free at RedPandaCompress — unlimited, no signup, no watermark, and nothing ever leaves your computer.

How an In-Browser Audio Converter Actually Works

Every online audio converter says roughly the same thing on its homepage: fast, free, private. Almost all of them mean the same thing by it — your file is uploaded to a server, converted there, and handed back as a download link. “Private” means they promise to delete it later.

Ours works differently, and the difference is architectural rather than a policy: the file is never sent anywhere, because the converter itself runs inside your browser tab. This post is the engineering walkthrough — what actually executes, the one trick that makes multi-gigabyte files possible, and the honest trade-offs of building it this way.

The conventional design, and what it costs

A server-side converter has a fixed sequence: upload the whole file, wait in a queue, convert, download the result. The conversion is usually the fastest part. The upload is the part you actually feel.

A 600MB WAV export on a typical 20Mbps upstream connection takes about four minutes to upload before any work begins — and that number is on the optimistic side of what home connections actually deliver. Then it sits on infrastructure you do not control, subject to whatever retention window is written in a policy page.

Removing the upload removes all of it at once: the wait, the queue, the retention question, and the per-file cost that forces other converters to cap free usage. That is the whole motivation.

What actually runs: FFmpeg, compiled to WebAssembly

The engine is FFmpeg — the same project that sits underneath most desktop and server-side media tooling — compiled from C to WebAssembly with Emscripten. It ships as a roughly 7.5MB .wasm binary plus a small JavaScript loader, downloaded once and then cached by the browser.

Two details matter more than they might look:

  • It runs in a Web Worker, not on the page’s main thread. Audio encoding is a long, CPU-bound loop; on the main thread it would freeze the interface completely. In a worker, the page stays responsive and progress can be reported while the encode runs.
  • It is real FFmpeg, not a re-implementation. The build includes LAME for MP3, the native AAC encoder, PCM for WAV output, and the ipod muxer that produces proper M4A files. The command lines are ordinary FFmpeg arguments — the same ones you would type in a terminal.

The worker is started lazily, while the page sits idle waiting for you to choose a file, so the binary is usually already warm by the time it is needed.

The trick that makes gigabyte files possible

This is the part that most in-browser converters get wrong, and it is the reason many of them quietly cap you at 100MB or 500MB.

The obvious implementation is to read the selected file into memory as an ArrayBuffer and hand that array to the WebAssembly module. It works beautifully in testing — and then dies on a real 3GB lecture recording, because you have just asked the browser to hold the entire file in the WebAssembly heap, on top of whatever the encoder itself needs.

Instead, the file is mounted as a virtual filesystem inside the worker using Emscripten’s WORKERFS. FFmpeg sees an ordinary path it can open and seek around in. Underneath, every read is served by slicing the browser’s File object and reading just that slice synchronously — the bytes are pulled off disk on demand, in the order the demuxer asks for them, and are never all resident at once.

Two consequences fall out of that:

  • Memory use tracks the working set, not the file size. An 8GB source is not meaningfully harder on memory than a 200MB one.
  • Conversion starts immediately. There is no read-the-whole-file step before work begins — the first bytes are read the moment FFmpeg wants them.
ApproachTime before work startsPractical size ceilingWhere your file goes
Upload to a serverFull upload + queueWhatever the free tier allowsTheir infrastructure
In-browser, read whole file into memorySeconds to minutesHundreds of MBStays local
In-browser + WORKERFS (what we use)Essentially none8GB desktop / 2GB mobileStays local

Step one: probe, then decide

Before converting anything, the worker runs FFmpeg once with just -i pointed at the mounted file. That prints the input banner — container, streams, codecs, duration — which gets parsed out of the worker’s stderr messages.

That one cheap run pays for three things:

  1. A real progress bar. FFmpeg reports its position as a timestamp, not a percentage. Knowing the total duration up front is what turns time=00:04:11 into a meaningful number on screen.
  2. A useful error instead of a cryptic one. If the file has no audio stream at all, you get told that in plain language rather than watching a conversion fail deep inside the encoder.
  3. The copy-versus-encode decision, which is the difference between seconds and minutes.

Copy versus encode

Converting audio does not always mean re-encoding it. When the source stream is already in the codec the target container wants, the stream can simply be lifted out and rewrapped — no decoding, no encoding, no quality loss whatsoever.

Source → targetWhat runsSpeedQuality effect
MP3 → MP3-c:a copySeconds, any sizeNone — bit-identical stream
AAC (most MP4/MOV) → M4A-c:a copySeconds, any sizeNone — bit-identical stream
Anything → MP3Decode + LAME at 192kbpsMuch faster than real timeOne lossy generation
Anything → M4ADecode + AAC at 192kbpsMuch faster than real timeOne lossy generation
Anything → WAVDecode + PCM 16-bitFast; output is largeNone beyond the source’s own

Worked example. Pulling the audio out of a 2-hour, 3GB MP4 lecture recording: the video stream is discarded with -vn, and because the audio inside an MP4 is nearly always AAC, choosing M4A output takes the copy path — a few seconds, and roughly 170MB out. Choosing MP3 instead forces a decode-and-re-encode, which takes a couple of minutes and lands in the same size range. Same file, same page, two very different amounts of work, decided automatically by what the probe found.

This is also why the honest advice about output format is not “always pick the biggest number”. If you want the details of that trade-off, we wrote them up separately in WAV vs MP3: which audio format should you use.

Getting the file back out

FFmpeg writes its output into the WebAssembly module’s in-memory filesystem. When the run finishes, the worker posts that buffer back to the page, where it becomes a Blob and then an object URL that the download button points at. No network request is involved in any of it.

One detail here cost real debugging time and is worth passing on. The buffer that comes back can be padded with trailing zero bytes. Tolerant players — VLC, Chrome — happily ignore the padding. Strict demuxers do not: macOS QuickLook and Windows Media Foundation would reject a file that played perfectly elsewhere. The fix is to walk the MP4 box headers from the start of the buffer, follow each box’s declared size to find where the last real box ends, and truncate there. Payloads that are not MP4-structured simply fall through unchanged.

“It plays in my player” is not the same as “it is a valid file”, and only one of those is good enough to ship.

The honest trade-offs

Running locally is not free of downsides, and it would be dishonest to present it as pure upside.

  • You pay a one-time download of about 7.5MB for the engine, on first use.
  • It uses your CPU and your battery, not a rack somewhere. On a very old phone, a long re-encode is genuinely slower than a server would be.
  • Audio conversion here runs single-threaded, one file at a time — a batch is processed serially rather than in parallel.
  • There is still a size ceiling, because browsers impose their own limits on how much a tab may allocate. It is 8GB on desktop and 2GB on mobile rather than 100MB, but it is not infinite.

What you get in exchange: no upload wait, no queue, no account, no watermark, no per-file pricing, and no copy of your recording sitting on someone else’s disk. For voice memos, client interviews, medical or legal recordings and unreleased music, that last point is not a nice-to-have.

Frequently asked questions

How can I verify my file really is not uploaded?

Check it yourself, which is the point of an architecture like this. Open your browser’s developer tools, switch to the Network tab, and convert a file. You will see the page’s own assets and the engine binary load, and no request carrying your audio. For a stronger test, disconnect from the network after the page has finished loading — the conversion still completes, because nothing about it needs a server.

Is WebAssembly slower than a real server?

For the encode step itself, somewhat — WebAssembly typically lands within a small factor of native code, and this build is single-threaded. But end-to-end, the comparison usually favours running locally, because the server route has to move the file across your connection twice before it can start. For a large file, the upload alone tends to exceed the entire local conversion.

Why does the same file sometimes convert in seconds and sometimes take minutes?

That is the copy-versus-encode split above. If the source stream already matches the output container — MP3 into MP3, AAC into M4A — it is rewrapped without re-encoding and finishes almost instantly. Any other combination has to decode and re-encode the audio, which is real work proportional to the recording’s length.

Which formats can it read?

Audio: MP3, M4A/AAC, WAV, FLAC, OGG, Opus and WMA. Video: MP4, MOV, MKV, AVI, WebM, WMV, TS, MPG, FLV and 3GP, with the audio track extracted. Output is MP3, M4A or WAV. Because the engine is real FFmpeg, the input list is a matter of which demuxers were compiled in rather than a hand-written parser per format.

Try it

The whole cluster runs on the pipeline described above: the audio converter if you want to choose the output format, or a fixed-output page like WAV to MP3, MP4 to MP3 or M4A to MP3 if you would rather not make one.

Free, unlimited, no signup — and the file stays on your machine, which you can confirm with the Network tab rather than taking our word for it. More tools at RedPandaCompress.

« Older posts