Saved

Press the star next to a tool's name to save it.

All my tools

AVI to MP4 Converter

Use this AVI to MP4 converter to change an AVI video into an H.264 MP4 file that plays on phones and in browsers, with FFmpeg running in your browser.

Choose an AVI file and press Convert to MP4. The first time, the converter (about 10 MB) downloads. If the video is already H.264, it is copied into the MP4 in seconds; otherwise it is re-encoded, which in a browser is slow, so keep to short clips. Stop cancels the job.

Your video is converted on this device and is never uploaded.

This tool runs FFmpeg compiled to WebAssembly (ffmpeg.wasm), free software under the GNU General Public License version 2 or later. FFmpeg's source code is at https://ffmpeg.org/download.html and the ffmpeg.wasm project is at https://github.com/ffmpegwasm/ffmpeg.wasm.

Your MP4 video

Choose an AVI file and press Convert to MP4.

An AVI to MP4 converter changes an old AVI video into an MP4 file that plays on phones, tablets, televisions and in every modern browser. This tool does it in your browser with FFmpeg, the well-known video program, compiled to WebAssembly, so your video is never uploaded. If the video inside the AVI is already H.264, it is simply copied into an MP4, which takes seconds. Otherwise it is re-encoded, which takes much longer in a browser.

How to use the AVI to MP4 converter

  1. Choose your AVI file. The limit is 300 MB.
  2. Press Convert to MP4. The first time, the converter downloads, which is about 10 MB.
  3. Wait while the percentage rises. You can press Stop to cancel.
  4. Press Download .mp4 to save the video.

What AVI is

AVI, or Audio Video Interleave, was developed by Microsoft and released in November 1992 as part of Video for Windows. According to the Wikipedia page on it, it is a container format, a subformat of RIFF, and not a video codec, so an AVI file can hold video in many different codecs. A codec that is popularly used for AVI is MPEG-4 ASP, usually encoded by DivX or Xvid. The page also lists weaknesses of the format. It was not designed for codecs that need future frames, such as those with B-frames, it has no standard way to store the aspect ratio in its first version, and it cannot hold attachments such as subtitles. For these reasons, newer containers such as MP4 and Matroska replaced it.

What MP4 is

MP4, officially MPEG-4 Part 14, is a container format that is mostly used for video and audio, and which can also carry subtitles and still images. It extends the ISO base media file format. According to Wikipedia, the video codecs that MP4 players widely support include H.264, also called AVC, and the audio codec that they widely support is AAC. H.264 is the most commonly used video format, and it is covered by patents, with licensing run by a patent pool, which is something that software makers deal with and that does not change how you use this tool.

Copy or re-encode

The converter first reads the header of your AVI to see which video codec it holds. If the codec is H.264, the picture is copied into the MP4 as it is, with no loss of quality, and only the sound is converted to AAC, which is fast. If the video uses another codec, such as DivX, Xvid or MJPEG, it cannot go into an MP4 in a form that browsers and phones play, so it is re-encoded to H.264 with the x264 encoder at a quality that balances size and speed, with the dimensions made even as H.264 requires. The result page tells you which of the two happened.

Why re-encoding is slow

FFmpeg in the browser does not have the speed of the desktop program. The ffmpeg.wasm project measured the conversion of a ten-second 720p clip from WebM to MP4 at about 129 seconds, compared with about 5 seconds for the native program, which is around 25 times slower, and it also says that the converter has a hard memory limit of 2 GB. For this reason, the tool sets a limit of 300 MB, and it works best for short or small videos. For a long film, a desktop program such as FFmpeg itself or a video editor will be much faster.

Privacy and licence

The video stays on your device. Only the converter program downloads from this site, and your browser keeps it afterward. FFmpeg is free software under the GNU General Public License version 2 or later, and the page tells you where to find its source code.

If the conversion fails

If the converter says that the file is not valid, check that it is a real AVI file and that the download finished. If it runs out of memory, close other tabs and try again, or use a smaller file. Some very old or unusual codecs may not be readable by the converter, and then a desktop program may be the only choice.

Playing the result

An MP4 with H.264 video and AAC sound plays in all the major browsers and on phones, tablets and many televisions. You can upload it to video sites, send it by message or keep it in a media library. If your player still cannot open the result, try another player or check that the download finished before you opened the file.

Before you start

Close other tabs and applications so that the browser has as much memory as it can use, and keep the page open during the conversion. For a very old file with an unusual codec, try a short test clip first. If a clip converts well, you can then decide whether the full video is small enough to convert here.

Common mistakes

  • Converting a long film in the browser. It will take a very long time.
  • Leaving the page during the job. Stopping the tab stops the conversion.
  • Expecting a smaller file. A copied video stays about the same size.
  • Renaming a file to .avi. The extension does not change the format inside.

What next

Use this often? Add AVI to MP4 to your Home screen.

Frequently asked questions

What is an AVI to MP4 converter?

A tool that changes the container and, when needed, the video codec of an AVI file so that it becomes an MP4 file that most devices can play.

Is my video uploaded?

No. FFmpeg runs inside your browser, and the video stays on your device.

Why is the conversion slow?

FFmpeg in the browser is much slower than the desktop program. The ffmpeg.wasm project measured about 25 times slower for a short clip.

When is the video not re-encoded?

When the AVI already contains H.264 video, it is copied into the MP4 without loss, and only the sound is converted to AAC.

What is the file size limit?

300 MB, because the browser has a memory limit of about 2 GB for FFmpeg.

What went wrong?

We only receive the reason you pick, never what you typed into the tool.

Thanks for your feedback.

More Video & Audio Tools