How to control output file size by setting the bitrate
- Step 1Find your clip's duration — Note the length in seconds (a player's info panel shows it). The tool itself doesn't display or use duration for the bitrate setter — you supply the math.
- Step 2Compute total kbps from your size ceiling — total_kbps = (target_MB x 8192) / duration_seconds. Example: 25 MB over 120 s = (25 x 8192) / 120 = 1707 total kbps.
- Step 3Split out audio and set Video kbps — Subtract your Audio kbps from the total. From 1707 total with 128 audio, set Video kbps to ~1580. Type both numbers into the tool.
- Step 4Drop the video and encode — Add the source (
.mp4,.mov,.mkv,.webm,.avi,.m4v,.ts). The tool runslibx264 -preset medium -b:v Xk -maxrate (1.2X)k -bufsize (2X)k -c:a aac -b:a Yk -movflags +faststart. - Step 5Download and check the actual size — Compare the output bytes to your ceiling. Container overhead and single-pass drift mean it may land a little over or under.
- Step 6Re-run with a small margin if it overshoots — If it's over the limit, drop Video kbps by 5–10% and encode again. For an exact byte ceiling with zero manual math, switch to a size-fit compressor.
Size-to-bitrate quick reference
Total kbps needed to hit a target size at a given duration, from total_kbps = target_MB x 8192 / seconds. Subtract your Audio kbps to get the Video kbps to type.
| Target size | 1 min (60s) | 5 min (300s) | 10 min (600s) |
|---|---|---|---|
| 10 MB | 1365 kbps | 273 kbps | 137 kbps |
| 25 MB | 3413 kbps | 683 kbps | 341 kbps |
| 50 MB | 6827 kbps | 1365 kbps | 683 kbps |
| 100 MB | 13653 kbps | 2731 kbps | 1365 kbps |
| 500 MB | 68267 kbps | 13653 kbps | 6827 kbps |
This tool vs the size-fit compressors
Both control size, but the work is split differently. Pick based on whether you want to do the math.
| Aspect | Bitrate setter (this tool) | Size-fit compressors |
|---|---|---|
| You provide | A bitrate (kbps) | A target file size |
| Tool calculates | Nothing — uses your kbps | Bitrate from probed duration |
| Reads duration? | No | Yes (probes the clip) |
| Best when | You know the exact bitrate you want | You only know the size limit |
| Encoder | libx264 WASM only | WebCodecs HW first, FFmpeg fallback |
| Output | Faststart MP4 | Faststart MP4 |
Tier limits
Video family limits — size and batch only, no duration cap.
| Tier | Max file size | Files per batch |
|---|---|---|
| Free | 1 GB | 1 |
| Pro | 10 GB | 5 |
| Pro-media | 100 GB | 50 |
| Developer | 100 GB | Unlimited |
Cookbook
Worked size-to-bitrate calculations. Each shows the formula, the numbers you type, and the command the tool runs.
Fit a 2-minute clip under 25 MB
A common upload cap. Compute the total, reserve audio, set video.
Duration: 120 s Target: 25 MB total kbps = 25 x 8192 / 120 = 1707 reserve 128 audio -> Video kbps = 1579 Type: Video kbps 1579, Audio kbps 128 ffmpeg ... -b:v 1579k -maxrate 1895k -bufsize 3158k \ -c:a aac -b:a 128k -movflags +faststart
10-minute screen recording under 100 MB
Longer clip, generous-ish ceiling.
Duration: 600 s Target: 100 MB total kbps = 100 x 8192 / 600 = 1365 reserve 96 audio (speech) -> Video kbps = 1269 Type: Video kbps 1269, Audio kbps 96
Leave a safety margin for overhead
Container and single-pass drift can nudge size up. Aim ~7% under.
Hard ceiling: 50 MB, 5-min (300 s) clip exact total = 50 x 8192 / 300 = 1365 kbps apply 7% margin -> aim 1270 total reserve 128 audio -> Video kbps = 1142 Type: Video kbps 1142, Audio kbps 128
Don't forget audio in the budget
Forgetting audio is the #1 reason files overshoot.
WRONG: 25 MB / 120 s -> set Video kbps 1707, audio 128 actual total = 1707 + 128 = 1835 kbps -> ~26.9 MB (over!) RIGHT: subtract audio first -> Video 1579 + audio 128 = 1707
Or skip the math entirely
If you only know the size limit, the size-fit compressors compute the bitrate from duration for you.
Goal: under 25 MB, don't want to do math -> use email-compressor (or discord/whatsapp) it probes duration and derives the bitrate itself (/video-tools/email-compressor)
Edge cases and what actually happens
The tool doesn't auto-target a file size
By designrunBitrateSet applies the bitrate you type; it never reads the clip's duration or calculates a bitrate to hit a size. If you want size-target automation, use a size-fit compressor (Discord, email, WhatsApp) which probes duration and does the math.
Output came out a bit larger than calculated
ExpectedContainer overhead (MP4 headers, faststart index) and single-pass drift add a few percent. For a hard ceiling, aim ~5–10% under your target in the calculation, then verify the bytes.
You forgot to subtract audio from the budget
CautionTotal size includes audio. If you put the whole budget into Video kbps and then add an audio track, the file overshoots by the audio's share. Always compute total kbps, then subtract Audio kbps to get Video kbps.
Very low calculated bitrate looks terrible
Quality tradeoffA tight size over a long duration forces a low bitrate that may block badly. The fix is to shorten (trim/split) or shrink resolution: trim with the lossless trimmer or downscale with the video resizer so the same budget covers fewer pixels.
You used the wrong duration in the formula
CautionSize accuracy depends entirely on the duration you plug in. A VFR clip or a wrong runtime throws the calc off. Confirm the real playback length before computing.
Calculated Video kbps below the 100 floor
LimitThe field clamps to a minimum of 100 kbps. If your size/duration math demands less than 100 kbps of video, you physically can't hit that size by bitrate alone — trim the clip or drop resolution instead.
Calculated bitrate exceeds 50000
LimitVery large ceilings on short clips can compute past the 50000 kbps cap. That's fine — at that point you're well above visually-transparent for H.264, so just cap at 50000.
Source over the tier size cap
RejectedFree 1 GB / 1 file, Pro 10 GB / 5, Pro-media 100 GB / 50, Developer 100 GB / unlimited. The input is checked against your cap before encoding — output size is what your bitrate produces.
Two re-runs needed to land under the cap
ExpectedBecause it's single-pass with no size feedback loop, hitting an exact byte ceiling sometimes takes a second run with a slightly lower Video kbps. If that's tedious, the size-fit compressors do the targeting in one shot.
Frequently asked questions
Does this tool let me type a target file size?
No. It takes a bitrate, not a size. File size follows from (Video kbps + Audio kbps) x duration / 8, and you compute the bitrate yourself. For direct size targeting use a size-fit compressor that calculates the bitrate from the clip's duration.
What's the formula to hit a size?
total_kbps = target_MB x 8192 / duration_seconds, then Video kbps = total_kbps minus your Audio kbps. Example: 25 MB over 120 s = 1707 total; with 128 audio, set Video kbps to ~1579.
Why is my output a little over the target?
MP4 container overhead and single-pass bitrate drift add a few percent. Aim 5–10% under your ceiling in the calculation, then check the actual bytes and re-run lower if needed.
Should I just use a compressor instead?
If you only know the size limit and don't want to do arithmetic, yes — Discord, email, and WhatsApp compressors probe the duration and derive the bitrate for you. Use this bitrate setter when you already know the exact kbps you want.
How accurate is the size?
Quite accurate if your duration is correct and you account for audio — typically within a few percent. The main error sources are forgetting audio, container overhead, and using the wrong duration.
What if my calculated bitrate is below 100 kbps?
The Video kbps field floors at 100, so you can't go lower. If your size budget needs less than that, you must shorten the clip (trim/split) or reduce resolution — bitrate alone won't get you there.
Do I need to include audio in the budget?
Yes. The file holds both streams, so total size = (Video kbps + Audio kbps) x duration / 8. Forgetting audio is the most common reason a file overshoots.
Does the tool read my clip's duration?
Not for bitrate setting — runBitrateSet just applies the kbps you typed. (The size-fit compressors do probe duration.) That's why you supply the duration in the formula here.
Will lowering bitrate to fit a size hurt quality?
It can, if the size is small relative to the duration and resolution. To keep quality at a tight size, trim length with the lossless trimmer or downscale with the video resizer so each second has more bits per pixel.
Is the output streamable at the fixed size?
Yes — it's always a faststart MP4, so the moov atom is at the front and it plays/seeks instantly even though it's sized to your budget.
Is my video uploaded to calculate the size?
No. Everything runs in your browser via FFmpeg.wasm. Nothing uploads, and Free already accepts a 1 GB source.
Can I do this in batch?
The setter takes one file per run. Batch capacity scales by tier (Pro 5, Pro-media 50, Developer unlimited), but each clip needs its own bitrate calculation since durations differ.
Privacy first
Every JAD Video tool runs entirely in your browser via WebCodecs and FFmpeg (WebAssembly). Your video files never leave your device — verified by zero outbound network requests during processing.