halfsize / Calculator
Will it fit? Video size calculator
Type the duration and the limit. The calculator does the arithmetic every encoder hides: the bitrate you have, the resolution that can carry it, and roughly what it will look like. Everything runs in this page; nothing is uploaded.
- Bitrate budget—
- For video—
- Fits at—
- Estimated VMAF—
Fill in a duration to see the plan.
npx halfsize video.mp4 --to 20mb
Estimate, not a promise: the VMAF band comes from measured 1080p30 runs and shifts with motion, grain and codec. The real number is printed after encoding, and it is measured against your source.
The formula, in one line
video bitrate = (MB × 8000 ÷ seconds) × 0.98 − audio kbps. Then the resolution is the
largest standard size whose pixels the bitrate can feed at about 0.072 bits per pixel (H.264 at
30 fps). That is the whole model; the rest is measurement.
Read it as a table instead
| Duration | 10 MB | 20 MB | 25 MB | 50 MB | 100 MB |
|---|---|---|---|---|---|
| 30 s | 2.5 Mbps | 5.1 Mbps | 6.4 Mbps | 12.9 Mbps | 26.0 Mbps |
| 1 min | 1.2 Mbps | 2.5 Mbps | 3.1 Mbps | 6.4 Mbps | 12.9 Mbps |
| 2 min | 525 kbps | 1.2 Mbps | 1.5 Mbps | 3.1 Mbps | 6.4 Mbps |
| 5 min | 133 kbps | 395 kbps | 525 kbps | 1.2 Mbps | 2.5 Mbps |
| 10 min | — | 133 kbps | 199 kbps | 525 kbps | 1.2 Mbps |
Video bitrate after a 128 kbps audio track and 2% container overhead.
What the numbers mean in practice
- Under 150 kbps — slideshow territory. Static screens are fine, motion is not.
- 300–600 kbps — 540p conversation and screen recordings look acceptable.
- 1–2 Mbps — normal 720p. Most social video lives here.
- 3–6 Mbps — comfortable 1080p for normal footage.
- Above 8 Mbps — the encoder is preserving grain more than detail. Nothing to gain for chat apps.
If the calculator says “does not fit”, the answer is not a better encoder. Cut the clip, drop the audio, or split it. A 60-minute video in 20 MB is 44 kbps by arithmetic.
FAQ
How do I calculate video file size from bitrate?
Bytes = bitrate × seconds ÷ 8. 2 Mbps for 60 s is 15 MB, before audio and overhead.
Why subtract audio first?
The cap counts the whole file. A 128 kbps track takes about 1 MB per minute.
How accurate is the estimate?
Good for typical footage. Grain and fast motion land lower; a talking head lands higher. The tool prints the measured VMAF afterwards.
Does it use decimal or binary megabytes?
Decimal, 1 MB = 1,000,000 bytes, because that is how platform caps are written.