Best Video Compression: Free Target-Size Calculator for Bitrate, Codec and Resolution

The best video compression for a file is the setting that lands just under your size limit with the cleanest picture. This free calculator does the arithmetic. Enter the length of the video and the size you need, and it returns the video bitrate, the audio bitrate, the resolution that bitrate can support, and a ready-to-run FFmpeg command.

File size depends on only two things: bitrate and duration. Resolution, frame rate and codec decide how good the picture looks at that bitrate. That is why the right answer changes between a 30-second clip for Discord and a one-hour recording for storage. The guide below explains H.264, H.265 (HEVC) and AV1, compares their sizes, and gives step-by-step settings for HandBrake and FFmpeg.

video compression calculator for Video files
The best video compression settings depend on length and target size.

How to Get the Best Video Compression With the Calculator

The calculator finds the best video compression for a size limit by working backwards from the limit.

  1. Length. Minutes and seconds of the finished video. Trim first: every second you cut is free quality for the rest.
  2. Target file size. The limit of the place you are sending it, in megabytes.
  3. Codec. H.264 if it must play anywhere. H.265 or AV1 if you control where it is watched.
  4. Frame rate and source resolution. The calculator will not suggest a resolution above your source.
  5. Audio. Audio bitrate is subtracted from the total first.
  6. Type of footage. Fast motion needs more bitrate than a talking head for the same quality.

The result gives the video bitrate, the resolution that bitrate can carry, HandBrake steps and a two-pass FFmpeg command.

Best video compression chart of size limits and bitrates
Video bitrate for common upload limits.

The Formula Behind Video Compression

File size is bitrate multiplied by time. Nothing else changes it.

total bitrate (kbps) = target size (MB) x 8000 / length (seconds)
video bitrate = total bitrate - audio bitrate
TargetLengthTotal bitrateAudioVideo bitrate
20 MB30 seconds5,333 kbps128 kbps5,205 kbps
20 MB1 minute2,667 kbps128 kbps2,539 kbps
20 MB2 minutes1,333 kbps96 kbps1,237 kbps
50 MB3 minutes2,222 kbps128 kbps2,094 kbps
100 MB10 minutes1,333 kbps128 kbps1,205 kbps
1,000 MB1 hour2,222 kbps128 kbps2,094 kbps

The calculator takes 3 percent off these figures, because the MP4 or MKV container adds a little data of its own. That margin is what keeps a “20 MB” file from coming out at 20.3 MB and being refused.

Common Size Limits

WhereLimitOne minute fits atNotes
Discord, free20 MBAbout 2,500 kbpsRaised from 10 MB in August 2026
Discord Nitro Basic50 MBAbout 6,300 kbps
Discord NitroUp to 1 GBNo practical limitDepends on plan
Email, most providers25 MBAbout 3,100 kbpsAttachments grow about a third when encoded, so aim for 18 MB
Messaging appsVaries, often 16 to 100 MBCheck the appMany re-compress video. Send as a document to avoid it
Web page background video2 to 5 MBUnder 600 kbpsKeep it under 15 seconds

How long a clip fits in 20 MB at each quality level

H.264 at 30 FPS, with 128 kbps audio

1080p, goodabout 43 seconds
720p, goodabout 1 min 20 s
480p, goodabout 2 min 31 s
360p, goodabout 4 min 7 s

Limits change, so check the current figure where you are uploading. If a file is still refused, lower the target by another megabyte and encode again.

H.264, H.265 or AV1: Choosing a Codec

The codec decides how much picture you get for each kilobit. Newer codecs do more with less, and take longer to encode.

H.264 (AVC)H.265 (HEVC)AV1
Released200320132018
Size for the same qualityBaselineAbout 30 to 45 percent smallerAbout 40 to 55 percent smaller
Encoding speedFastSlowerSlowest
Plays onEverythingMost devices since about 2017Current browsers and recent devices
Hardware encodersAll GPUsAll recent GPUsRecent GPUs only
Use it forSharing with anyoneStorage, phones, known devicesWeb video and archives

File size for the same visual quality

Relative to H.264, approximate

H.264100 percent
H.265about 62 percent
AV1about 52 percent

If the person receiving the file might open it on an old laptop or paste it into a chat app, use H.264. It is the only codec that plays inline everywhere. For your own archive, H.265 is the practical choice.

Best video compression chart of codecs compared
H.264, H.265 and AV1 compared.

Resolution and Frame Rate: When to Downscale

A common mistake is keeping 1080p at a bitrate that cannot support it. The encoder runs out of data and the picture breaks into blocks. A clean 720p image scaled up by the player looks better.

ResolutionH.264, 30 FPSH.264, 60 FPSH.265, 30 FPSAV1, 30 FPS
360p500 kbps700 kbps310 kbps260 kbps
480p900 kbps1,260 kbps560 kbps470 kbps
720p1,800 kbps2,520 kbps1,120 kbps940 kbps
1080p3,500 kbps4,900 kbps2,170 kbps1,820 kbps
1440p7,000 kbps9,800 kbps4,340 kbps3,640 kbps
4K14,000 kbps19,600 kbps8,680 kbps7,280 kbps

These are working minimums for average footage. Screen recordings and talking heads need about half. Fast gameplay and sports need about 15 percent more. If your video bitrate is below the figure for your resolution, step down one row.

Frame rate works the same way. Sixty frames need about 40 percent more data than thirty. For anything that is not fast gameplay, 30 FPS is the better use of a small file.

How to Compress a Video in HandBrake

HandBrake is free, open-source software for Windows, Mac and Linux. These steps hit a target size.

  1. Open HandBrake and drag in your video.
  2. On the Summary tab choose MP4 and tick Web Optimized.
  3. On the Dimensions tab set Resolution Limit to the resolution from the calculator.
  4. On the Video tab choose the encoder: H.264 (x264), H.265 (x265) or AV1 (SVT).
  5. Set Framerate and choose Constant Framerate.
  6. Select Avg Bitrate (kbps), enter the video bitrate, and tick 2-Pass Encoding.
  7. Set Encoder Preset to Slow. Slower presets give better quality at the same size.
  8. On the Audio tab set AAC and the audio bitrate.
  9. Choose where to save and press Start Encode.

Use Avg Bitrate only when you need an exact size. If size does not matter and you just want a smaller file, use Constant Quality instead: RF 22 for H.264, RF 24 for H.265 and RF 30 for AV1 are good starting points, and lower numbers mean higher quality.

How to Compress a Video With FFmpeg

FFmpeg is the free command-line tool most video apps are built on. Two-pass encoding analyses the video first, then spends the bitrate where it is needed, which is how you land on an exact size.

ffmpeg -y -i input.mp4 -c:v libx264 -b:v 2458k -preset slow -pass 1 -an -f null NUL
ffmpeg -i input.mp4 -c:v libx264 -b:v 2458k -preset slow -pass 2 -c:a aac -b:a 128k -movflags +faststart output.mp4
PartMeaning
-c:v libx264Video codec. libx265 for H.265, libsvtav1 for AV1
-b:v 2458kVideo bitrate from the calculator
-preset slowBetter compression for more encoding time
-pass 1 and -pass 2Analyse, then encode
-an -f null NULFirst pass: no audio, no output file. Use /dev/null on Mac and Linux
-c:a aac -b:a 128kAudio codec and bitrate
-vf scale=-2:720Add this to downscale to 720p
-movflags +faststartLets the video start playing before it has fully downloaded

For a smaller file with no fixed size, replace the bitrate and pass options with -crf 23 for H.264 or -crf 26 for H.265, in a single command.

Best video compression chart of minimum bitrate by resolution
Minimum bitrate for each resolution.

Tips for the Best Video Compression

  • Trim first. Cutting dead time is the only compression that costs no quality.
  • Compress once. Start from the original file. Compressing an already compressed video stacks the damage.
  • Use a slower preset. Going from Fast to Slow can save 10 to 20 percent at the same quality.
  • Prefer software encoders for small files. x264 and x265 give better quality per bit than GPU encoders. Use the GPU when speed matters more.
  • Lower audio for speech. 64 kbps is enough for a voice. In a 20 MB file that is real space.
  • Denoise grainy footage. Grain and noise eat bitrate. A light denoise filter makes the file far easier to compress.
  • Check the result. Watch the fastest scene. That is where compression fails first.

If you record gameplay, getting the recording settings right first saves a lot of work later. See the OBS settings generator for encoder and quality values.

Best video compression chart of tips
Seven ways to compress video better.

Best Video Compression: Worked Example

Here is the best video compression for a common case: a one-minute gameplay clip for a free Discord account, with a 20 MB limit. The total budget is 20 x 8000 x 0.97 / 60 = 2,587 kbps. With 128 kbps audio that leaves about 2,458 kbps for video. H.264 gameplay at 30 FPS needs about 4,000 kbps for 1080p and 2,100 for 720p, so the calculator picks 720p. The two-pass encode comes out at about 19.9 MB and uploads first time.

About Video files

Video compression reduces file size by removing detail the eye is unlikely to notice and by storing only the changes between frames. The main codecs are H.264 (AVC), H.265 (HEVC) and AV1, from the Alliance for Open Media.

HandBrake and FFmpeg are free, open-source tools for encoding video. They use the x264, x265 and SVT-AV1 encoders and can also use hardware encoders from NVIDIA, AMD, Intel and Apple.

The video compression calculator on this page is free to use, and we update it when the game changes its numbers.

Official page: FFmpeg, the official documentation.

If this video compression calculator helped, these free tools work the same way.

New this month: PS5 MTU finder, Shottr for Windows alternative picker, SEO extension picker for Chrome.

Frequently Asked Questions

Quick answers about Video files and the video compression calculator.

What is the best video compression?

For sharing, H.264 in an MP4 file with two-pass encoding at a bitrate worked out from your size limit. For storage, H.265 at constant quality gives files about 30 to 45 percent smaller.

How do I compress a video to a specific size?

Multiply the target size in megabytes by 8000 and divide by the length in seconds to get the total bitrate in kbps. Subtract the audio bitrate and encode with two passes at that video bitrate.

How do I compress a video for Discord?

Free accounts have a 20 MB limit. For a one-minute clip, encode H.264 at about 2,450 kbps video and 128 kbps audio at 720p.

Is H.265 better than H.264?

It makes files about 30 to 45 percent smaller at the same quality. H.264 plays on more devices, so use it when you do not know where the file will be watched.

Does compressing a video reduce quality?

Yes, always. The aim is to lose detail you will not notice. A good bitrate, a slow preset and the right resolution keep the loss small.

What bitrate should I use for 1080p?

About 3,500 kbps or more for H.264 at 30 FPS, about 2,200 for H.265 and about 1,800 for AV1. Fast motion needs more.

Is HandBrake free?

Yes. HandBrake is free and open source for Windows, Mac and Linux.

Is the video compression calculator free?

Yes. It runs in your browser. Your video is never uploaded, because the calculator only needs its length.

More Games You May Like

Leave a Reply

Your email address will not be published. Required fields are marked *