Compress AVI

Compress one AVI up to 50 MB on your own device. The default re-encodes it to a smaller H.264 MP4; Keep AVI is there for players that only read AVI, and can come out no smaller.

Drop files here or choose files
One AVI up to 50 MB — old DivX, Xvid and camcorder files included. Compressed on your device, never uploaded; the default output is a smaller MP4.
Output format

Convert to MP4 re-encodes to H.264, which gives the smallest file and plays on phones, computers and web pages. Keep AVI writes MPEG-4 + MP3 for car stereos, DVD players and old TVs that only read AVI, and comes out considerably larger than MP4. Both re-encode the picture.

Quality

Converting to MP4 uses H.264's constant rate factor (CRF 23 / 28 / 32); keeping AVI uses the MPEG-4 quantizer (3 / 5 / 8). Either way a higher number means a smaller file and a softer picture, and Recommended sits between the two.

Resolution

A video already below the cap you pick is never enlarged, so a 640×480 recording comes out the same whichever step you choose. Keep original resolution still rounds odd dimensions down to even ones (641×481 → 640×480). The higher the resolution, the slower the browser re-encodes it.

Ticked, only the date the clip was shot is kept, so a photo library still sorts it by the original date; unticked, all of the metadata is kept.

Subtitle tracks, timecode tracks and any video track beyond the first (an embedded cover image, for example) are not written to the result.

How to use

  1. Choose one AVI: Drop a .avi onto the box or click to pick it. One file per run, up to 50 MB. Any video is accepted, but if the file isn't an AVI the page says so and points you at the general video compressor instead.
  2. Pick the output format: Leave Output format on Convert to MP4 (recommended, smallest) for the smallest file and the widest playback, or choose Keep AVI (for old devices) when a car stereo, DVD player or old TV only reads AVI. Both options re-encode the picture.
  3. Set quality and resolution: Quality runs High (larger file), Recommended (balanced) and Smaller (size first). Resolution stays on Keep original resolution by default, because an old AVI is usually 640×480 and has nothing to shrink; Up to 1080p and Up to 720p cap the short edge and never enlarge anything.
  4. Compress, check the sizes, save: Click Compress AVI. The first run spends a while fetching the engine before any percentage appears, and Cancel works throughout. When it finishes you see the size before and after, a preview player when the browser can decode the result or a download card when it can't, and Download — Save to device on a phone.

How to compress an AVI without uploading it

Pick one AVI of up to 50 MB, leave the output on MP4 or switch it to Keep AVI, choose a quality step, and this page hands back a re-encoded file along with the size before and after. The work happens inside the browser tab, so the recording never leaves your computer or phone, and nothing is kept — close the tab and the result is gone.

The engine is ffmpeg.wasm, a build of FFmpeg compiled to WebAssembly and served from this site. There is no server fallback anywhere in the code: a file your device can't manage ends in an error message, not in an upload. The first run has to fetch about 31 MB of engine, which is unrelated to how big your video is; that download starts the moment you pick a file, but the progress bar and any error only begin after you press Compress AVI.

After that click, the file gets a single inspection pass that works out its length, codec, resolution, rotation and track list. A half-finished download, something that only wears an .avi extension, or an audio file with no picture in it fails at that point with a message saying so, rather than after minutes of pointless encoding. The inspection runs once and its findings are handed straight to the encoder.

Re-encoding needs the multi-threaded build of the engine, which needs SharedArrayBuffer, so this page is served with cross-origin isolation. An up-to-date Chrome, Edge or Firefox supports it; private windows and some in-app browsers switch it off, and the tool checks on the click — before spending 31 MB on an engine that could not have run. Cancel covers every stage, including the engine download and the inspection, and returns you to the form with no error line. One honest limitation: cancelling while the engine is still downloading does not abort that network request.

Convert to MP4 or Keep AVI, and which quality step to choose

Convert to MP4 (default) → .mp4, H.264 video + AAC audio, fast-start index
Keep AVI → .avi, MPEG-4 Part 2 tagged XVID + MP3 audio; existing MP3 is copied, other audio is encoded at 128 kbps; no fast-start index
High → CRF 23 (MP4) · quantizer 3 (AVI)
Recommended → CRF 28 (MP4) · quantizer 5 (AVI)
Smaller → CRF 32 (MP4) · quantizer 8 (AVI)
Resolution: Keep original (default) · Up to 1080p · Up to 720p — short edge, shrink only

Convert to MP4 is the default because it fixes both halves of the AVI problem at once. An AVI from an early camcorder, a DV capture, a monitoring system or a DivX download typically carries MPEG-4 Part 2, MJPEG or even uncompressed video, which needs far more data than H.264 for the same picture — and which plenty of phones, smart TVs and browsers refuse to open at all. Re-encoding to H.264 inside an MP4 produces a much smaller file that those devices play directly.

Keep AVI exists for the opposite case: hardware that only reads AVI, such as a car stereo, a DVD player or an old television. It writes MPEG-4 Part 2 tagged XVID with MP3 audio, the combination old players are most likely to list in their specifications — we have no device testing of our own here, so check the player's manual rather than taking that as a promise.

Neither option is a container swap in disguise: both genuinely re-encode the picture, so an existing DivX or Xvid stream is not copied across. With Keep AVI that costs size, because MPEG-4 Part 2 cannot pack a picture as tightly as H.264, and when the source is already MPEG-4 Part 2 there may be nothing left to win. Nothing in the tool compares the output against the input and stops, in either format, so the result can come out barely smaller or larger than what you started with — read the before-and-after figures on the result line.

Quality is the encoder's own quality dial: H.264's constant rate factor when the output is MP4, and the MPEG-4 quantizer when it stays AVI. In both cases a higher number means a smaller file and a softer picture. Smaller prioritizes file size, Recommended balances size and detail, and High prioritizes detail. Check the actual output size after encoding.

The resolution cap applies to the short edge, so Up to 1080p limits a landscape clip to 1080 pixels tall and a portrait one to 1080 wide. It only ever shrinks: footage already below the cap is never enlarged, which is why picking Up to 720p for a 640×480 recording changes nothing at all — in our reference run it produced a file with exactly the same byte count as Keep original resolution. Keep original is not quite untouched either, since odd dimensions are rounded down to even ones (641×481 comes out 640×480), because 4:2:0 colour needs even numbers. Higher resolutions re-encode more slowly in a browser; we have no measured speed figure, so this page doesn't quote one.

Got an MP4, MOV, MKV or WebM instead? Compress Video runs the same encode without the AVI-specific options.

How much smaller the file gets, and what that depends on

Desktop FFmpeg 9.0.2 parameter check — not a browser benchmark, not real camera footage
Source → synthetic 6-second 640×480 AVI, MPEG-4 Part 2 (DIVX) + mono MP3, 2.26 MiB
Convert to MP4 · Recommended → 416 KB (−82%)
Convert to MP4 · High → 674 KB (−72%)
Convert to MP4 · Smaller → 317 KB (−87%)
Keep AVI · Recommended → 1.60 MiB (−29%)
Keep AVI · High → 2.39 MiB (+6%, larger than the source)
Keep AVI · Smaller → 1.23 MiB (−46%)

Output size depends on the source bitrate and codec, how much detail the scenes carry, the quality step and the resolution cap, so it can be far smaller, barely different, or bigger. The mechanism worth stating as a general rule is the codec gap: H.264 needs fewer bits than MPEG-4 Part 2 for a comparable picture, so Convert to MP4 lands well below Keep AVI on the same footage at the same quality step.

The block above is a parameter check, not a forecast. This tool's exact arguments were run in desktop FFmpeg 9.0.2 on a generated test pattern — six seconds, 640×480, encoded as MPEG-4 Part 2 at a fairly generous quality — and a synthetic pattern compresses very differently from real footage. Real DivX or Xvid downloads are often encoded at a much lower bitrate than that sample, leaving less to recover, while MJPEG and uncompressed AVI sit far above it and have much more. Treat the percentages as an illustration of which lever matters, and read your own numbers off the result line.

The one row to look at twice is Keep AVI at High: it came back 6% larger than the source. That is the codec gap working against you — asking MPEG-4 Part 2 for high quality can cost more bits than the original encoder spent. When the result isn't smaller, the page says so on the result line and suggests keeping your original file or converting to MP4 instead, rather than quietly handing you something useless.

There is no overall time limit on a run: a slow job that is still making progress is left alone. If the encoder goes 75 seconds without any sign of life it is treated as stuck and stopped. A first failure is automatically retried once with faster, simpler encoder settings when the output is MP4 — with Keep AVI there is no equivalent setting to drop, so that path makes one attempt only and reports the error.

Need to hit a specific size rather than pick a quality step? Use Compress Video to Target Size.

What survives the compression, and what doesn't

Kept: the first real video track, the first audio track, the date and time the clip was shot, and the orientation — a portrait video stays portrait. Sound depends on the output. In an MP4, audio that is already AAC is copied across untouched and anything else is re-encoded to AAC at 128 kbps for mono or stereo, or 64 kbps per channel up to 384 kbps for multichannel. With Keep AVI, MP3 audio is copied as-is and anything else becomes MP3 at 128 kbps. A clip with no sound comes out silent; no track is invented.

Removed by default: the GPS coordinates, the device make and model, the software name and the rest of the global metadata. Only the shoot date is written back, deliberately, so the file still sorts by its original date in a photo library. One caveat specific to this format: the AVI container itself barely holds such tags — in our reference run FFmpeg's AVI output carried nothing but a software field — so the shoot date mainly matters when you output MP4. Untick Remove location, device model and other capture details if you would rather keep everything; then nothing but the shoot date is touched.

Dropped whatever you choose: every audio track after the first, so a dual-language AVI loses the second soundtrack — the result card tells you how many there were — plus subtitle tracks, timecode and data tracks, and any video track beyond the first, such as an embedded cover image. The original codec and bit depth are not preserved: output is always 8-bit, either H.264 or MPEG-4 Part 2, and an existing DivX, Xvid or MJPEG stream is re-encoded rather than carried over. There is no lossless mode and no option to change only the container.

HDR is the one case the quality steps can't fix. Output is 8-bit YUV 4:2:0 and no tone mapping is applied, so HDR footage may come back looking grey or flat on some screens; the tool warns you when it detects HDR and the output is an MP4. HDR in an AVI is vanishingly rare, so this is mostly inherited behaviour. Finally, the MP4 output gets its playback index written to the front, so it can start playing while it is still downloading from a chat or a shared drive; the AVI output doesn't, because that is an MP4 feature. On a phone, Save to device opens the system share sheet when the browser offers one and simply downloads the file when it doesn't, so it isn't guaranteed to be a share menu.

Need to keep an MKV, its subtitles or a chosen audio track? Compress MKV is the page with those options.

AVIs that won't seek, and the 50 MB ceiling

An AVI whose progress bar won't move is worth running through this page, because the output is written with a fresh index. In our reference run we stripped the index from the sample file, after which FFmpeg reported a nonsense duration of over six hours and a bitrate of zero; compressed to MP4 with the default settings, the same footage read back correctly as 6.04 seconds, with the same byte count as the intact source produced. That was a synthetic case rather than a genuinely damaged recording, so treat it as worth trying, not as a repair guarantee. A file too broken to inspect at all is rejected with an error instead.

The hard ceiling is 50 MB per file, one file per run. Anything larger is skipped with a note, and this page has no trimming of its own — shorten or export a smaller version of the clip first. That rules out a whole DV tape or hours of monitoring footage; what fits is a clip or an edited segment of a few dozen megabytes. The second constraint is your device's memory, since the entire video is handled inside the tab: if the browser runs out, you get an error saying so, with nothing uploaded, and closing other tabs or using a shorter clip is the usual way forward.

If you are compressing to get under a limit, start from the limit itself. A personal Gmail account refuses attachments over 25 MB and offers a Drive link instead, and chat apps, school portals and job sites each apply their own caps. Within the 50 MB this page accepts, Convert to MP4 at Recommended is the setting to try first; if it isn't enough, press Start over and run the original again at Smaller, optionally with Up to 720p. Don't compress the output a second time — each extra encode discards more detail, so always go back to the original when comparing settings.

Frequently asked questions

How do I compress an AVI file without uploading it anywhere?
Pick the file on this page and press Compress AVI — the encoding runs in your browser tab using ffmpeg.wasm, a WebAssembly build of FFmpeg. The code has no server fallback at all, so a file your device can't finish produces an error rather than an upload. Nothing is stored either: close the tab and the result is gone. One file per run, up to 50 MB.
Should I convert the AVI to MP4 or keep the AVI container?
Convert to MP4 unless a specific device demands .avi. H.264 inside an MP4 is both much smaller and far more widely playable, which is why it is the default here. Keep AVI writes MPEG-4 Part 2 with MP3 audio for car stereos, DVD players and old TVs that only read AVI — expect a considerably larger file, and in some cases no saving at all.
Why is my AVI file so large in the first place?
Because of what is inside it. AVI is an old container, and the recordings that use it typically carry MPEG-4 Part 2, MJPEG or uncompressed video, all of which need far more data than H.264 for a comparable picture. The container isn't the problem — the codec is, which is why re-encoding the picture to H.264 is what actually shrinks the file.
Can I compress an AVI without losing quality?
No. Both output formats use lossy video re-encoding, so this tool cannot compress AVI with zero quality loss. What you control is how much is given up — High keeps the most detail, Recommended is the balanced default, and Smaller puts size first. For watching on a phone or laptop, Recommended usually looks fine. If you need an untouched copy, keep the original file alongside the compressed one.
How much smaller will my AVI get?
It depends on the source bitrate and codec, the scene detail, the quality step and the resolution cap, so the result can be much smaller, barely changed, or bigger. In a desktop FFmpeg parameter check with this tool's settings, a synthetic 6-second 640×480 MPEG-4 Part 2 AVI of 2.26 MiB came back as 416 KB when converted to MP4 at Recommended. A test pattern compresses differently from real footage, so that is an illustration; the page prints your own before and after sizes.
Why did the compressed file come out bigger than the original?
Because the encoder you picked couldn't beat the one that made the original. Either output format can be larger than the original. Our reference sample grew by 6% with Keep AVI at High: MPEG-4 Part 2 cannot compress as tightly as H.264, so asking it for high quality can cost more bits than the original encoder spent. Converting to MP4 is far less likely to grow a file, but nothing in the code guarantees it either — the quality step sets a target quality, not a target size. The page flags this on the result line and suggests keeping your original or switching to Convert to MP4 with the Smaller quality step.
Will the result still play on my car stereo, DVD player or old TV?
Choose Keep AVI for the best chance, but check the device's manual. That option writes MPEG-4 Part 2 tagged XVID with MP3 audio, the combination such players most commonly list as supported, and we have no device testing of our own to go beyond that. An MP4 with H.264 is the better choice for phones, computers, browsers and recent TVs.
What happens to subtitles, extra audio tracks and the GPS location?
Subtitles, timecode and data tracks are always dropped, only the first audio track is kept — the result card says how many the source had — and the GPS coordinates, device make and model and other global metadata are removed by default, leaving just the shoot date. Untick Remove location, device model and other capture details to keep all the metadata instead.
Can I compress several AVI files at once, or one bigger than 50 MB?
No — one file per run, and 50 MB is a hard limit; larger files are skipped with a note. For a batch, run the files one after another. For a long recording such as a full DV capture or hours of CCTV, trim it or export a shorter version in a video editor first, then compress that.