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.

Table of Contents
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.
- Length. Minutes and seconds of the finished video. Trim first: every second you cut is free quality for the rest.
- Target file size. The limit of the place you are sending it, in megabytes.
- Codec. H.264 if it must play anywhere. H.265 or AV1 if you control where it is watched.
- Frame rate and source resolution. The calculator will not suggest a resolution above your source.
- Audio. Audio bitrate is subtracted from the total first.
- 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.

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
| Target | Length | Total bitrate | Audio | Video bitrate |
|---|---|---|---|---|
| 20 MB | 30 seconds | 5,333 kbps | 128 kbps | 5,205 kbps |
| 20 MB | 1 minute | 2,667 kbps | 128 kbps | 2,539 kbps |
| 20 MB | 2 minutes | 1,333 kbps | 96 kbps | 1,237 kbps |
| 50 MB | 3 minutes | 2,222 kbps | 128 kbps | 2,094 kbps |
| 100 MB | 10 minutes | 1,333 kbps | 128 kbps | 1,205 kbps |
| 1,000 MB | 1 hour | 2,222 kbps | 128 kbps | 2,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
| Where | Limit | One minute fits at | Notes |
|---|---|---|---|
| Discord, free | 20 MB | About 2,500 kbps | Raised from 10 MB in August 2026 |
| Discord Nitro Basic | 50 MB | About 6,300 kbps | |
| Discord Nitro | Up to 1 GB | No practical limit | Depends on plan |
| Email, most providers | 25 MB | About 3,100 kbps | Attachments grow about a third when encoded, so aim for 18 MB |
| Messaging apps | Varies, often 16 to 100 MB | Check the app | Many re-compress video. Send as a document to avoid it |
| Web page background video | 2 to 5 MB | Under 600 kbps | Keep 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
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 | |
|---|---|---|---|
| Released | 2003 | 2013 | 2018 |
| Size for the same quality | Baseline | About 30 to 45 percent smaller | About 40 to 55 percent smaller |
| Encoding speed | Fast | Slower | Slowest |
| Plays on | Everything | Most devices since about 2017 | Current browsers and recent devices |
| Hardware encoders | All GPUs | All recent GPUs | Recent GPUs only |
| Use it for | Sharing with anyone | Storage, phones, known devices | Web video and archives |
File size for the same visual quality
Relative to H.264, approximate
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.

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.
| Resolution | H.264, 30 FPS | H.264, 60 FPS | H.265, 30 FPS | AV1, 30 FPS |
|---|---|---|---|---|
| 360p | 500 kbps | 700 kbps | 310 kbps | 260 kbps |
| 480p | 900 kbps | 1,260 kbps | 560 kbps | 470 kbps |
| 720p | 1,800 kbps | 2,520 kbps | 1,120 kbps | 940 kbps |
| 1080p | 3,500 kbps | 4,900 kbps | 2,170 kbps | 1,820 kbps |
| 1440p | 7,000 kbps | 9,800 kbps | 4,340 kbps | 3,640 kbps |
| 4K | 14,000 kbps | 19,600 kbps | 8,680 kbps | 7,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.
- Open HandBrake and drag in your video.
- On the Summary tab choose MP4 and tick Web Optimized.
- On the Dimensions tab set Resolution Limit to the resolution from the calculator.
- On the Video tab choose the encoder: H.264 (x264), H.265 (x265) or AV1 (SVT).
- Set Framerate and choose Constant Framerate.
- Select Avg Bitrate (kbps), enter the video bitrate, and tick 2-Pass Encoding.
- Set Encoder Preset to Slow. Slower presets give better quality at the same size.
- On the Audio tab set AAC and the audio bitrate.
- 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
| Part | Meaning |
|---|---|
| -c:v libx264 | Video codec. libx265 for H.265, libsvtav1 for AV1 |
| -b:v 2458k | Video bitrate from the calculator |
| -preset slow | Better compression for more encoding time |
| -pass 1 and -pass 2 | Analyse, then encode |
| -an -f null NUL | First pass: no audio, no output file. Use /dev/null on Mac and Linux |
| -c:a aac -b:a 128k | Audio codec and bitrate |
| -vf scale=-2:720 | Add this to downscale to 720p |
| -movflags +faststart | Lets 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.

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: 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.
Related Calculators
If this video compression calculator helped, these free tools work the same way.
- Minecraft recording settings generator
- Shottr for Windows alternative picker
- Discord lag fix
- SEO extension Chrome picker
- How to fix FPS drops
- All free gaming and tech calculators
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.
Axee Davies is the founder of AxeeTech, publishing gaming guides, codes, and Windows how-tos since March 2013. A tech enthusiast for 13+ years — starting with smartphones and Android rooting — he now runs a site that puts out a new guide every day for Roblox players, traders, and Windows users. More about AxeeTech
More Games You May Like
How to Get the Frost Relic in Sailor Piece (Roblox 2026 Guide)
CookieRun: Tower of Adventures Codes (November 2026)
How to Fix FPS Drops: Free Diagnoser Finds the Cause in 7 Answers (CPU, GPU, Heat or Windows)
Best R6 Settings: Free Sensitivity Converter and Graphics Generator for Siege X (2026 Guide)
Best Tarkov Settings: Free Generator for FPS, Visibility and PostFX (2026 Guide for 1.0)
Best Rust Settings: Free Generator for FPS, Graphics and Console Commands (2026 Guide)
Best Path of Exile 2 Settings: Free Generator for FPS, Renderer and Upscaling (2026 Guide)
Best Rocket League Settings: Free Generator for Camera, Controller and Video (2026 Pro Values)