Turn a file cap into a bitrate budget
Suppose a destination accepts an 8 MB file and your final clip runs for 60 seconds. This example uses decimal MB: 8 MB is 8,000,000 bytes. A total stream budget of 1,066.7 kbps would consume every byte before allowing for the container. That leaves no practical margin.
With a 5% planning margin and 128 kbps audio, the video budget is about 885 kbps. Our test used 880 kbps, rounded down. Five percent is our working margin, not a platform rule or a guaranteed amount of container overhead.
The actual 60-second export
We looped the same eight-second chart, added a synthetic tone and encoded a 60-second H.264/AAC MP4. The video target and maximum rate were both 880 kbps. The export was then measured using FFprobe and the file’s byte count.
| Check | Value |
|---|---|
| Hard cap | 8,000,000 bytes |
| Actual file | 7,714,367 bytes |
| Decimal size | 7.714 MB |
| Running time | 60.000 s |
| Video average | 891.6 kbps |
| Audio average | 128.2 kbps |
| Bytes remaining | 285,633 |
A limit does not choose your quality
An 885 kbps video budget is far below YouTube’s 8 Mbps recommendation for a 1080p, 30 fps SDR upload. Both numbers can be correct: one solves a tight file limit, the other describes an upload quality target. If a detailed scene looks poor at the budget, reduce duration or resolution, change the codec where allowed, or choose another destination.
Other caps and lengths
The same formula covers any cap. Every row below keeps the 5% margin and 128 kbps audio, and rounds the video budget down.
| Cap | Duration | Video budget |
|---|---|---|
| 8 MB | 30 s | 1,898 kbps |
| 8 MB | 1 min | 885 kbps |
| 8 MB | 3 min | 209 kbps |
| 25 MB | 1 min | 3,038 kbps |
| 25 MB | 3 min | 927 kbps |
| 100 MB | 10 min | 1,138 kbps |
| 8 MB | 10 min | No video budget |
The last row is the useful warning: ten minutes inside 8 MB leaves less total data than the audio alone needs, so there is no video budget to return. Shorten the clip, lower the audio rate or choose another way to deliver it.
Keep the margin even for short clips. Our 60-second test was a single-pass encode with the rate capped at 880 kbps, yet FFprobe measured the video average at 891.6 kbps, 1.3% above the target. The margin absorbed it. HandBrake’s documentation recommends multi-pass encoding when you target an average bitrate, for better quality and bit-rate distribution.
Check your own output
- Use the destination’s actual byte rule; do not assume its “MB” label is binary.
- Budget using the full duration and all audio tracks. This tool assumes one combined audio rate.
- Export, check the bytes, then watch the difficult part of the clip.
- If the file is still too large, leave more margin and export again.
Our measured file proves that this one synthetic export fits. It does not guarantee that another encoder or source will fit at the same settings.
Original synthetic encoding test, recorded 8 October 2026. Actual MP4 files, byte counts and frame comparisons; Read the method.