How to Convert Old AVI Videos (Xvid, DivX, MJPEG) to MP4

Why old AVI files from cameras and archives won't play on phones and TVs, what Xvid, DivX and MJPEG are, and how to convert AVI to modern H.264 MP4.

Updated September 29, 2026 5 min read

Use the free AVI to MP4Convert old AVI (Xvid, DivX, MJPEG) videos to modern, compatible MP4

Somewhere in most family archives and company file shares there is a folder of .avi files: clips from an early digital camera, a converted DVD, training videos from years ago, or recordings from a security system. They may play on an old laptop, but a phone says the format is not supported, a smart TV skips them, and modern editors import them with the wrong aspect ratio or no sound.

This guide explains what an AVI actually contains, why it has aged badly, and how to move those files to MP4 with H.264, the combination that plays on practically every current device. It also covers the quirks of old video, such as interlacing and odd frame rates, that a simple conversion may not fix.

Why AVI files cause problems today

AVI (Audio Video Interleave) is a Microsoft container from the early 1990s. It is simple and robust, but it predates many features modern players rely on, and it was typically filled with codecs that are now obsolete:

Codec often found in AVI What it is Typical source
Xvid / DivX MPEG-4 Part 2 (ASP) video Ripped DVDs, downloads from the 2000s
MJPEG Every frame is a separate JPEG Early digital cameras, webcams, some CCTV
DV Standard-definition tape camcorder video MiniDV capture, often interlaced
Cinepak, Indeo Very old codecs Multimedia CD-ROMs
MP3, PCM, AC-3 Audio Various

Phones and TVs decode H.264 and HEVC in hardware, but support for MPEG-4 Part 2 has become unreliable and MJPEG files are very large. Converting to H.264 in an MP4 makes the files playable almost anywhere and, for MJPEG and DV sources, usually much smaller.

Remux or re-encode?

Some newer AVI files already contain H.264 video. Those can be remuxed: the video is copied into an MP4 container without re-compression, so there is no quality loss. Most AVI files, however, contain Xvid, DivX or MJPEG, and those need a re-encode: each frame is decoded and compressed again with H.264.

Re-encoding is always slightly lossy. With old, low-resolution material the loss is rarely visible at a good quality setting, but it is worth keeping the original AVI files as the archive copy.

Convert AVI to MP4 in your browser

The AVI to MP4 converter works locally with ffmpeg compiled to WebAssembly, which is useful for private home videos and internal footage.

  1. Open AVI to MP4 and drop the .avi file on the upload box. Your browser may say it cannot preview the file; the tool can still read and convert it.
  2. Keep Conversion on Automatic (recommended). If the AVI contains H.264 video with AAC or MP3 audio, it is remuxed; otherwise it is re-encoded to H.264 and AAC.
  3. Choose Quality if re-encoding. For small, old videos, High keeps the most detail and the file stays modest because the resolution is low. Good is the recommended default.
  4. Click Convert to MP4. The note under the result shows the source codecs, for example mpeg4 + mp3, so you know what was inside.
  5. Preview and download the MP4.

The tool processes one file at a time and runs single-threaded, so a long file converts more slowly than in a desktop app. It also keeps only the first video and audio track, and it does not deinterlace. For a large archive or interlaced camcorder footage, use one of the desktop options below.

Other ways to convert AVI

ffmpeg, one file

ffmpeg -i clip.avi -c:v libx264 -crf 20 -preset medium -c:a aac -b:a 160k -movflags +faststart clip.mp4

If the AVI already contains H.264 video but its audio is PCM or AC-3, you can copy the video and convert only the audio:

ffmpeg -i clip.avi -c:v copy -c:a aac -b:a 160k clip.mp4

ffmpeg, a whole folder

On Windows (Command Prompt):

for %f in (*.avi) do ffmpeg -i "%f" -c:v libx264 -crf 20 -c:a aac -b:a 160k "%~nf.mp4"

On macOS or Linux:

for f in *.avi; do ffmpeg -i "$f" -c:v libx264 -crf 20 -c:a aac -b:a 160k "${f%.avi}.mp4"; done

HandBrake

HandBrake is the friendliest choice for batches. Add a folder, pick a preset, and it offers deinterlacing and detelecine filters for tape-era footage. It always re-encodes.

VLC

VLC plays nearly every AVI ever made. If you only need to watch the files on a computer, installing VLC may be all you need.

Problems specific to old video

Combing lines on movement

DV camcorders and TV captures are often interlaced: each frame holds two half-pictures captured at slightly different moments. Modern screens show this as comb-like stripes on moving edges. Deinterlace while converting:

ffmpeg -i tape.avi -vf yadif -c:v libx264 -crf 20 -c:a aac tape.mp4

HandBrake's "Decomb" or "Deinterlace" filters do the same thing.

The picture is squashed or stretched

Standard-definition video frequently uses non-square pixels: a 720×576 or 720×480 frame is meant to be shown at 4:3 or 16:9. If a player ignores the aspect flag, the image looks distorted. You can fix it by scaling to square pixels, for example -vf scale=768:576,setsar=1 for 4:3 PAL, or with Resize Video using a custom size.

Sound drifts out of sync

Some AVI files with variable-bitrate MP3 audio have unreliable timestamps. A full re-encode, as the browser tool performs, usually repairs this. If not, try ffmpeg with -fflags +genpts before -i.

Very large MJPEG files

MJPEG from old cameras can be many times larger than the equivalent H.264. After converting, the file may still be larger than you want to send; run it through Compress Video. For long recordings, cut out the unwanted parts first with Trim Video to save time.

For Matroska files see MKV to MP4, and for Apple formats read MOV vs MP4.

Frequently asked questions

Will converting AVI to MP4 improve quality?

No. Conversion cannot add detail that was never recorded. It improves compatibility and usually reduces file size, but the picture will at best look the same as the original.

Why does my AVI play on my computer but not my phone?

Your computer probably has a player such as VLC with its own decoders. Phones rely on built-in hardware decoders that target H.264 and HEVC, not Xvid, DivX or MJPEG.

What is the difference between Xvid and DivX?

Both are implementations of the same MPEG-4 Part 2 standard. Xvid is open source and DivX was a commercial product; files made with either are handled the same way when converting.

Should I delete the AVI files after converting?

Keep them if they are irreplaceable. Re-encoding is lossy, and a future tool or better settings might produce a better conversion from the original.

Can the browser tool deinterlace old camcorder footage?

No. It converts the frames as they are. Use HandBrake's decomb filter or ffmpeg's yadif filter for interlaced sources.

Try it now: AVI to MP4

Loading tool…