A file limit belongs to the video, audio and container together. In our 12-second synthetic test, a 505 kbps video target plus 128 kbps audio exported to 960,257 bytes. Giving the picture the whole budget exceeded 1 MB.
Start with the exact limit and the finished duration
You have a finished clip and an upload form that rejects it. Start by writing down the limit in bytes and the duration you actually need to keep. An encoder quality label cannot answer either question. A shorter version may preserve the important detail better than lowering the quality of the whole recording.
Our example uses a deliberately small limit: 1 MB, or 1,000,000 bytes, for a 12-second clip. This is a test case, not a current limit for any particular messaging service. A destination that means 1 MiB allows 1,048,576 bytes instead. That difference matters near a hard boundary. Convert the chosen limit to bytes before calculating. Use decimal kbps for bitrate; the worked budget below keeps those units explicit.
Keep the original. Set aside a copy containing only the section you will send, and use that copy’s duration in the calculation. An exported container may run a few milliseconds longer because of audio framing; check the resulting byte count as well as the time shown in the editor.
Divide the budget before assigning video bitrate
We set aside 5% of the limit as a safety allowance. The remaining 950,000 bytes must hold both sound and picture. At 12 seconds, that is about 633.33 kbps combined. A 128 kbps soundtrack consumes 192,000 bytes over those 12 seconds, leaving about 505.33 kbps for video. We rounded the video target down to 505 kbps.
video kbps = limit bytes × 0.95 × 8 ÷ seconds ÷ 1,000 − audio kbps
video kbps = 1,000,000 × 0.95 × 8 ÷ 12 ÷ 1,000 − 128
video target = 505 kbps, rounded downThe 5% allowance is a choice for this experiment, not a promise about every MP4. Container overhead varies, and an encoder’s average bitrate is a target rather than a precise invoice for the final bytes. Multiple soundtracks need a combined audio allowance. Silent video can use zero audio bitrate, but only if you actually remove the audio stream during export.
Our two-pass test: one correct budget and one deliberate mistake
On October 21, 2026 we generated a 12-second, 640 × 360, 30 fps moving test pattern with a 440 Hz tone. Desktop FFmpeg 8.1.1 encoded the source as H.264/AAC. We then used x264’s medium preset and two-pass bitrate control for both outputs, keeping AAC at a requested 128 kbps. The only intended change between the two output commands was video bitrate: 505 or 633 kbps.
| File | Video target | Actual bytes | Below 1 MB? |
|---|---|---|---|
| Source | CRF 18 | 1,864,259 | No |
| Audio reserved | 505 kbps | 960,257 | Yes |
| Audio forgotten | 633 kbps | 1,150,906 | No |
Each export has 360 video frames; ffprobe reports a container duration of 12.010 seconds. The 505 kbps result fits with 39,743 bytes to spare. The naive export exceeds the limit by 150,906 bytes because the audio must still be stored beside the picture. The result is evidence for this source and these settings. We did not run a visual quality score or claim that 505 kbps is sufficient for every 360p video.
Download the synthetic source · 505 kbps export · 633 kbps export · Exact commands, bytes and hashes
Reproduce the export in a bitrate-capable encoder
The bitrate calculation provides an encoding budget; it does not encode your file. ToolWillow’s browser compressor uses CRF quality presets, so it does not accept a target bitrate. For a strict size target, use a local encoder with average-bitrate controls. These commands reproduce the two passes for our downloaded source:
ffmpeg -i growth-budget-source.mp4 -map 0:v:0 -c:v libx264 -preset medium -b:v 505k -pass 1 -passlogfile budget -an -f null NUL
ffmpeg -i growth-budget-source.mp4 -map 0:v:0 -map 0:a:0 -c:v libx264 -preset medium -b:v 505k -pass 2 -passlogfile budget -c:a aac -b:a 128k -movflags +faststart budget.mp4These commands use Windows’ null sink, NUL; on macOS or Linux, replace it with /dev/null. Run both passes with matching video settings and the same pass-log name, in a folder you can write to. Use a new output filename. The commands intentionally keep only the first video and first audio streams. They are for the supplied SDR test file, not a universal recipe for HDR footage or multi-track delivery.
If the budget looks too low, change the edit
First remove material the recipient does not need: the countdown, a long loading screen, or a duplicated explanation. Halving duration roughly doubles the available average bitrate at the same size limit. That is an arithmetic advantage; it is not a guarantee about how the result will look.
Next consider dimensions. If the clip is a screen recording, crop to the relevant interface before shrinking it. Keeping an entire 4K desktop at very low bitrate can turn labels into moving blocks. If the source is 60 fps and ordinary-speed motion is acceptable at 30 fps, a frame-rate conversion may reduce the coding workload. It also removes temporal samples, so inspect cursor motion and quick gestures. See the 30 versus 60 fps test.
Do not keep recompressing the previous small export. Return to the clean source for each attempt. If nobody can read the essential text at the permitted size, split the demonstration or supply a still image alongside a shorter clip.
Verify bytes, then verify the message
- Inspect the exported file’s exact byte count. A rounded “1 MB” label can hide an oversize result.
- Play the beginning, the most detailed motion and the end. Confirm the intended soundtrack is present.
- Check text at the display size the recipient will use. A tiny preview is an easy way to miss damage.
- If the file exceeds the limit, reduce the video bitrate modestly and encode again from the original. Preserve some margin.
- Upload and verify the destination’s actual handling. It may make another encoded copy even when your file fits.
The budget solves one constraint. It does not solve every playback, quality or platform-processing problem. For a clip that becomes larger despite a stronger compressor setting, use the separate larger-output investigation.
Common questions
Does the bitrate calculation guarantee the file will fit?
No. It estimates a combined bitrate after reserving an overhead margin. Encoder rate control, container overhead and duration rounding still require checking the actual export.
Which audio bitrate belongs in the calculation?
Use the sum of the audio bitrates you intend to keep. Subtract that amount from the payload budget before assigning video bitrate.
Can I paste this bitrate into ToolWillow’s compressor?
The current compressor uses CRF quality presets and resolution controls. Use a bitrate-capable encoder for a strict size target; the calculation is an encoding budget.
Sources & further reading
Written for ToolWillow with original explanations and examples. Consult current product documentation for controls that vary by version.



