FFmpeg Cookbook
JA

File Size Estimator

Estimate the output file size from CRF, resolution, codec and duration before you encode. The estimate covers the video only, not the audio.

23
18 (high quality)23 (default)36 (low quality)
—
⚠ The estimate multiplies a rough bitrate for each resolution (H.264, CRF 23) by the CRF scaling and the H.265 ratio measured on one video. 1 MB = 1,000,000 bytes. Real sizes vary a lot with motion and noise (measured differences between sources).
Popular uses
Estimate file size before postingCompare CRF and bitrate optionsPlan storage needs

How to use

  1. Enter durationEnter the length in seconds (600 for 10 minutes).
  2. Pick codec / resolution / CRFPick the resolution and codec from the lists, and set CRF with the slider (18–36).
  3. Read the estimateThe estimated size, its range and the estimated bitrate appear at once.

Recommended settings

YouTube CRF 23 1080p
10 min ≈ 225 MB (range 150–338 MB)
What this calculator shows (1 MB = 1,000,000 bytes); real sizes vary with how busy the video is.
Size-limited sharing
Target Size (MB) in the Video Compressor, set to the actual cap
A CRF value alone cannot fix the final file size.

When it goes wrong

Estimate doesn't match reality

Cause: Motion and fine detail raise the bitrate at the same CRF.

Fix: Treat the range as a guide too, and check by encoding.

Questions

Why not exact?

CRF is a quality target, not a bitrate, so the real bitrate depends on the content. The calculation assumes a video of average complexity.

H.264 or H.265?

At the same quality H.265 can be smaller, but fewer devices play it. Use H.264 when you share the video.

More detail (settings, limits, FFmpeg commands)

What each setting means

Resolution
480p, 720p, 1080p, 1440p or 4K.
CRF
Quality target (18–36). Lower means higher quality and a bigger file.
Codec
H.265 is taken as 30% smaller than H.264 at the same quality (70% of the H.264 estimate). When this site compared one video at equal VMAF (a quality score), H.265 came out 26–35% smaller. The CRF is read as an H.264 value; in the same measurement, H.265 needed a CRF about 2 higher for similar quality.

Browsers and limits

  • Estimates only; real sizes vary a lot with the content
  • H.264 and H.265 only (no AV1 or VP9)

The same job with the FFmpeg command line

Encode and check
ffmpeg -i input.mp4 -c:v libx264 -crf 23 -preset medium -pix_fmt yuv420p -an output.mp4
The estimate is video only, so -an drops the audio for a fair comparison. The CRF scaling is based on measurements at preset medium.