AVI to MP4
In your browser, no upload
MP4
DivX · Xvid · MJPEG → H.264 · re-encoded
Video
AVI → MP4Specification
7 rows| Item | Value | Notes |
|---|---|---|
| Input | AVI | Or any video FFmpeg reads |
| Output | MP4, H.264 + AAC | Plays on phones, browsers and editors |
| Picture | Re-encoded as H.264 | x264, veryfast preset, CRF 23 |
| Sound | AAC | Copied when it is already AAC or MP3, else AAC 128 kbps |
| Time | Measured before it starts | A 2-second test encode on this device |
| Engine | This browser’s own encoder, or FFmpeg (16.8 MB) | FFmpeg is downloaded only when the browser cannot do the job, and only when you press the button that says so |
| Processed in | This browser | Not sent to a server |
What happens
5What happens, and why
AVI is the container Microsoft introduced in 1992, and the files still found in it are mostly from the years after: DivX and Xvid downloads, clips from compact cameras in Motion JPEG, captures from old editing software. Phones, browsers and current editors mostly will not open them, and the codecs inside are often ones nothing current decodes. FFmpeg decodes nearly all of them.
The picture is re-encoded as H.264, which is what makes the file play anywhere. The sound is often already MP3 in an AVI, and MP4 can hold MP3 as it is, so when it is MP3 or AAC it is copied across untouched and only the picture is re-encoded; other sound — uncompressed PCM, for instance — is re-encoded as AAC at 128 kbps. The line under the result says which happened.
First the page asks the browser itself. Browsers carry the video encoders they use for calls and screen recording — H.264, VP9, AAC, Opus, often on the graphics chip — and when this browser can read your file and write the result with them, that is what happens: nothing is downloaded, the time is measured here first, and the line under the badge says the browser’s encoder did the work. MP4, MOV, WebM and MKV files usually qualify. AVI, WMV and FLV do not, and neither does an MP3, so those go the way below.
The work is done by FFmpeg, the program most video software is built on, compiled to WebAssembly so that it runs inside this page. It is large — 16.8 MB — and it is not downloaded until you press the button that says so. Then it reads your file, encodes 2 seconds from the middle of it as a test, and tells you how long the whole file will take on this device, before anything starts. That figure is measured here rather than taken from a table: the same engine and settings, your processor, your video. It is still an estimate, and it is labelled as one.
It is slower than a program installed on a computer. Here FFmpeg runs on one processor core, because a browser only lets a page use more when the site is served with particular security headers, and it cannot use the graphics chip’s video encoder at all. A long high-resolution video can take many minutes, and longer on a phone. The estimate says so before you commit to it, the progress line shows the time left as it goes, and Cancel stops it at once. When the browser’s own encoder can do the job, it is far quicker, and nothing is downloaded.
FAQ
4Why not just rename the file to .mp4
Because the container is different: an AVI renamed .mp4 is still an AVI inside, and a player that reads the file rather than the name refuses it. And the picture codec in most AVI files — DivX, Xvid, Motion JPEG — is not one an MP4 player plays anyway.
Does it lose quality
A little, as any re-encode does, and the badge says so. The picture is encoded with x264 at CRF 23, a constant-quality setting that spends bits where the picture needs them; at normal viewing most people cannot tell it from the source. What is lost is not recovered by converting back.
Why does it take so long
Every frame is decoded and encoded again, on one core of your processor, inside the browser. Installed programs use every core and usually the graphics chip’s encoder; a web page gets neither by default. The page measures how long it will be on your device before you start, so the wait is never a surprise.
Is the video uploaded
No. The engine is downloaded to your browser, and your file is read and written there. There is no upload endpoint on this site, so there is nowhere for the video to go.