FilesProcess
Audio & video

Why “compress to 20 MB” is harder than it sounds

Anurag SinghSenior Software Architect
7 min read

Discord says the file is too large. You open a compressor, ask for 20 MB, and it hands back 23 MB. Or it hands back 6 MB of video that looks as if it was filmed through a steamed-up window. Both failures come from the same place, and neither is necessary.

We had to make a browser hit exact video sizes when we built the Discord compressor on this site, and we measured every pass along the way. This is what the numbers showed, including the part that surprised us.

The arithmetic is the easy bit

A video file is, give or take a little packaging, its bitrate multiplied by its length. Bitrate is how many bits the file spends on each second. So the budget is fixed the moment you know the size limit and the duration.

Take a one-minute clip that has to fit in 20 MB:

  • 20 MB is 20,000,000 bytes, which is 160,000,000 bits.
  • Spread over 60 seconds, that is about 2.67 megabits per second for everything.
  • Give the sound 128 kilobits per second and roughly 2.5 megabits per second is left for the picture.
  • Keep a little back for the file’s index and the encoder’s mistakes. We keep 8%.

Which megabyte? Some software means 20 × 1,000,000 bytes, some means 20 × 1,048,576 (strictly a mebibyte, 20,971,520 bytes).

Aim at the smaller figure and the file passes whichever one the site uses. Our tools always do.

Halve the length and the budget per second doubles. That is why trimming a clip is by far the most effective thing you can do before compressing it – more effective than any setting.

Why compressors miss anyway

The bitrate you ask an encoder for is a target, not a promise. It spends more on busy scenes and less on still ones, and it decides frame by frame without knowing what is coming next. Over a whole clip it usually lands near the target. On short or very busy clips it can overshoot noticeably.

The encoders in phones and graphics chips – the ones that make browser and phone compression fast – are tuned for speed first. They follow the target loosely. So the honest way to build a size-limited compressor is to aim under the limit, measure the file that comes out, and go round again if it is over. A tool that encodes once and hands you whatever it got is the one that gives you 23 MB.

The floor nobody mentions

Here is the result we did not expect. To test the worst case we made a deliberately brutal clip: hundreds of coloured squares moving in different directions, changing colour every frame, with a ticking caption. Almost nothing in one frame repeats in the next, which is the hardest possible thing to compress. Then we asked for a size it could not reasonably reach – a quarter of a megabyte for five seconds.

Five seconds of very busy footage, target 250 KB, hardware H.264 encoder
PassResolutionVideo bitrate asked forFile produced
1640 × 360266 kbps561 KB
2426 × 240111 kbps345 KB
3426 × 24076 kbps343 KB
4426 × 24060 kbps343 KB

Look at the last three rows. Asking for nearly half the bitrate made no difference at all. The encoder had reached its coarsest setting, and at that point the picture itself sets a minimum size: there is only so much detail you can throw away from a frame before there is nothing left to describe. We tried the browser’s software encoder as well, expecting it to be stricter. It was worse – asked for 252 kbps at 360p, it produced a file running at about 1.5 Mbps.

The lesson is practical. Below a certain size, lowering the bitrate does nothing. Only fewer pixels or fewer frames make the file smaller. So when a pass misses badly, our compressor steps the resolution down, and at the bottom step it lowers the frame rate. If it still cannot get there, it tells you the closest size it reached instead of quietly handing you an oversized file. Real footage – people, rooms, landscapes – compresses far better than our torture test, so you will rarely hit this. But a compressor that pretends the floor does not exist will eventually lie to you.

Resolution is the real quality knob

For a fixed budget, the question is how many pixels to spread it over. A useful way to judge it is bits per pixel per frame: the video bitrate divided by width × height × frame rate. Here is the same 1 Mbps spent three ways:

One megabit per second of video at 30 frames per second
ResolutionPixels per secondBits per pixelWhat it looks like
1920 × 108062.2 million0.016Blocky in any movement
1280 × 72027.6 million0.036Soft, watchable
960 × 54015.6 million0.064Clean on a phone

As a rough guide for H.264, under about 0.03 looks blocky, 0.05 to 0.1 looks good, and above 0.1 is close to the original. Our planner picks the largest resolution that stays at or above 0.05. Most people watch shared clips on a phone, where a clean 540p beats a smeared 1080p every time.

Frame rate counts in the same sum. A 60 fps phone video has twice the pixels per second of the same clip at 30 fps, so when space is tight dropping to 30 is the cheapest quality gain there is. Very few people notice the difference in a chat window.

The opposite problem: space left on the table

Simple footage has the reverse issue. A calm, slowly moving clip does not need the bits it is offered, and the encoder simply stops short. We asked for 3 MB from a 28-second, 1080p clip of gently moving scenery. The planner chose 960 × 540 for that budget, and the encoder delivered 1.58 MB – barely half the room it was given.

So when a result uses less than about 55% of the budget, the compressor now tries again one step sharper. The same clip came back at 1280 × 720 and still 1.58 MB. The same size, visibly sharper, at the cost of a few extra seconds.

The flip side is not spending bits the picture cannot use. A 20-second 1080p clip of 49 MB asked to fit in 20 MB came out at 12.5 MB, still at 1080p. We compared frames with the original: the average difference was 1.4 levels out of 255 per colour channel, which the eye cannot see. Filling the full 20 MB would have bought nothing.

The limits you are actually aiming at

These move more often than most guides admit. Discord’s free limit was 8 MB for years, was 10 MB until August 2026, and is now 20 MB. The figures below are from each service’s own help pages, checked on 15 November 2026.

Video size limits by service
WhereLimitWorth knowing
Discord, free20 MBNitro Basic allows 50 MB, Nitro up to 1 GB
WhatsApp video, faster connection100 MBShown at up to 720p, so 1080p is wasted
WhatsApp video, slower connection64 MBShown at up to 480p
WhatsApp Status90 secondsA length limit, not a size limit
WhatsApp document2 GBSent as a file, not re-compressed, but must be downloaded to play
Gmail attachment25 MBLarger files become a Drive link
Outlook attachment20 MBCompany mail servers are often lower

Getting a good result, in order

  1. Trim first. Every second you remove gives the rest more room. Nothing else comes close.
  2. Drop the sound if it adds nothing. That frees 64 to 128 kbps for the picture.
  3. Let the resolution fall. Forcing 1080p into a small file is how you get blocks. Choose the size limit and let the resolution follow.
  4. Prefer 30 fps for anything that will be watched in a chat.
  5. Watch the result before sending. Fast motion and dark scenes show problems first.
  6. On WhatsApp, decide who compresses. Sent as a video, WhatsApp compresses it again. Sent as a document, it arrives exactly as you made it.

The short version

  • File size is bitrate times length. Trimming is the strongest lever you have.
  • Encoders aim for a bitrate rather than hitting it. A good compressor aims under the limit, measures, and tries again.
  • Below a certain size, only fewer pixels or fewer frames make the file smaller. Busy footage hits that floor sooner.
  • For a fixed size, a lower resolution usually looks better than a starved high one.
  • Check the platform’s current limit. They change.

The Discord, WhatsApp and email compressors work exactly as described here. They show the resolution and a quality estimate before you start and say up front when a clip is too long for the size. They run on your own device’s video encoder, so the video is never uploaded.

Tools used in this guide

Free, in your browser, nothing uploaded.

Share

Every tool on FilesProcess runs in your browser. Your files are never uploaded.

How that works