Video compression

Compress a video to a file-size limit: bitrate calculator and real outputs

A file-size limit is a shared budget for video, audio and packaging. The calculator below makes that budget explicit. We also ran the same owned 30-second clip through HandBrakeCLI at two video bitrates so you can compare the estimate with actual files.

Reviewed 2026-10-03 · Two measured HandBrake exports · Shutter Encoder documented only

The quick answer

For a 30-second video under 5 decimal MB, a 5% reserve and 128 kb/s of audio leave 1,138 kb/s for video after rounding down. Our HandBrake export was 4,800,904 bytes. The same method at a 2 MB cap left 378 kb/s and produced 1,929,999 bytes, with visibly worse fine detail in the inspected frame. These are measured examples rather than guaranteed settings.

Plan your export

A bitrate budget for your file limit.

Use average bitrate mode. This estimates a starting point; check the finished file before uploading.

1,138 kb/sStarting average video bitrate

1 MB = 1,000,000 bytes. Use 0 kb/s for silent video. The default 5% reserve is a suggested allowance for overhead and bitrate variation, not a size guarantee. Lower bitrate can reduce quality. Nothing is uploaded or stored.

Calculate the budget before choosing a preset

Estimated video kb/s = floor((target MB × 8,000 × (1 − reserve / 100) ÷ duration in seconds) − total audio kb/s). Decimal MB means 1,000,000 bytes. MiB means 1,048,576 bytes; do not silently swap them when checking an upload limit.

The 5% default reserve is our planning allowance for packaging, metadata and rate-control variation. It is not a measured overhead percentage or a guarantee. If the result is zero or negative, the proposed audio already consumes the available budget. Choose a larger cap, a shorter clip or a different audio budget before encoding.

Count every retained audio track. Passing through an existing track does not make its bytes disappear. Avoid calculating with 128 kb/s if your actual export contains several audio tracks or uses a different rate.

ExampleDurationAudio budgetReserveVideo budget
5 MB ceiling30 seconds128 kb/s total5%1,138 kb/s
2 MB ceiling30 seconds128 kb/s total5%378 kb/s

What our real HandBrake exports produced

On 3 October 2026 we used the official HandBrakeCLI 1.11.2 Windows build with an owned 720 × 1280 test pattern. The input contains 30 seconds at 30 fps with a synthetic tone. It contains no personal footage or third-party music. Its size is 13,971,909 bytes.

Both jobs used software x264 at the medium preset with multipass enabled, no turbo first pass, no cropping and mono AAC requested at 128 kb/s. Video bitrates were 1,138 and 378 kb/s. The actual output files identify HandBrake as their encoder. FFmpeg was used to inspect and decode the outputs; it did not produce these two exports.

Both files decoded all 900 video frames and retained 720 × 1280 at 30 fps. Their container duration was approximately 30.02 seconds with AAC audio. We inspected the same frame at 14 seconds in the source and each export. The 2 MB example has more visible damage around the small timer and diagonal edges. We did not conduct a full subjective playback study or a listening test.

Actual fileBytesDecimal MBBelow its cap?
Owned source13,971,90913.971909Input only
HandBrake: 5 MB budget4,800,9044.800904Yes
HandBrake: 2 MB budget1,929,9991.929999Yes

Use the estimate in HandBrake

For this size-limited task, select average bitrate and enter the calculated video budget. The reproduction file below contains the exact CLI options used for our outputs. Confirm the separate audio settings before running the job and preserve the original file.

Constant quality answers a different question: it lets file size vary with the source. When there is no strict cap, try an appropriate quality setting and inspect a short representative sample. A quality number from another encoder is not an equivalent setting.

  • Confirm duration and all retained audio tracks.
  • Choose the output dimensions and codec the recipient accepts.
  • Enter average video bitrate then verify the audio budget.
  • Encode a separate delivery file and check its exact byte count.
  • Play the finished file and inspect text on the intended screen before sharing.

The documented Shutter Encoder alternative

Shutter Encoder documents a file-size field in its bitrate controls. It attempts the chosen MB target but explicitly does not promise a perfect match. Its FAQ also describes two-pass encoding for suitable jobs. We have not exported this fixture through Shutter Encoder, so treat this as a documented route rather than an observed result.

If your issue is only the container, first consider whether rewrapping is appropriate. Rewrapping and compressing pixels are distinct jobs. A valid change of wrapper may solve compatibility without solving a byte limit.

If it is too big or too blurry

If the output exceeds the limit, confirm that its actual duration, audio tracks and size units match your inputs. Then reduce the video budget or increase the reserve and export again. Do not delete the higher-quality source.

If it fits but the detail is unacceptable, the size constraint may be the problem. A shorter excerpt, a larger permitted file or a different delivery method can preserve more useful information. Reducing dimensions is another tradeoff to inspect on your own content. Passing a byte limit does not prove that a recipient can read your screen recording.

Inspect the example files

What this evidence covers

  • One owned synthetic clip on Windows 11 with an Intel Core Ultra 7 155H and software x264. This is not a general performance benchmark.
  • Two HandBrakeCLI outputs were generated. No Shutter Encoder output was produced and no upload service was tested.
  • Full decode checks and one matched frame inspection are narrower than a complete subjective playback or audio review.
  • The 5% reserve is an editorial planning choice. Actual bytes must be checked before relying on a delivery cap.
Our research method and AI disclosure

Common questions

Does the calculator guarantee an exact file size?

No. It is a bitrate estimate with optional headroom. Encoder behavior, audio and packaging can change the final size. Check the actual output bytes.

Why does the 2 MB example look worse?

With duration and audio held fixed, the lower cap left substantially fewer bits for each second of video. Our inspected frame showed damage around fine detail. Other sources may behave differently.

Which converter has better quality?

This experiment cannot answer that. Only HandBrakeCLI produced test exports. A comparison with Shutter Encoder needs actual outputs from both applications under a separately defined matched protocol.

Can I use the fixture for my own test?

Yes. The synthetic input and the two HandBrake output files are available below for this reproduction task. Keep the application version and settings with your results. The input is not representative of every camera or screen-recording workload.

Sources and check dates

Keep exploring