File-size problems
Compress a video without changing its dimensions: ffmpeg CRF
Short answer
To compress a video and keep its dimensions, change the bitrate, not the size: re-encode with libx264 at a higher CRF and a slower preset, and do not add a scale filter. On the FFmpeg wiki's scale, 23 is the default, 17 to 28 is the subjectively sane range, and +6 roughly halves the file size.
Key takeaways
- Dimensions only change if you add a scale filter, so leave it out.
- CRF 23 is the x264 default; 17 or 18 is visually near lossless; 28 is the top of the sane range.
- A slower preset gives a smaller file at the same quality.
- Lower the audio bitrate only after the video is tuned; audio is usually a small share.
Find your case
| What you see | What it usually means | Do this |
|---|---|---|
| File must be under a platform limit | Bitrate too high for the limit | Raise CRF in steps (step 2) |
| Output too soft | CRF too high or preset too fast | Lower CRF by 2 and use slow (step 3) |
| Output bigger than input | Source was already efficient | See the bigger-file guide |
| Dimensions changed unexpectedly | A scale filter or preset changed them | Remove -vf scale (step 1) |
Fix it step by step
Keep the dimensions
Do not use -vf scale, -s or a platform preset that resizes.
ffprobethe result and compare width and height with the source.Pick a CRF
ffmpeg -i in.mp4 -c:v libx264 -crf 24 -preset slow -c:a copy out.mp4. The FFmpeg wiki says to choose the highest CRF that still looks acceptable.Use a slower preset
A slower preset improves compression at the same quality; use the slowest you can wait for.
Compare before and after
Play both at full screen and look at gradients, text and fast motion; those show compression first.
CRF and size at a glance
| CRF | Expectation | Use |
|---|---|---|
| 17 to 18 | Visually near lossless | Masters and archives |
| 20 to 23 | Good quality, moderate size | Uploads to platforms |
| 24 to 28 | Smaller, softer in detail | When a size limit is tight |
Check your file
Extension and MIME type are labels, not proof of the container. Dimensions and duration come from this browser's media reader. This does not detect codecs, bitrate, corruption or platform upload compatibility. Files and measurements are not sent anywhere.
Frequently asked questions
How do I reduce file size without changing resolution?
Re-encode with a higher CRF and a slower preset without scaling.
What does CRF 23 mean?
It is the default x264 quality setting; 17 to 28 is the range the FFmpeg wiki calls subjectively sane.
How much does +6 CRF save?
Roughly half the bitrate and file size, according to the FFmpeg wiki.
Sources
- FFmpeg Wiki: Encode/H.264 (CRF, presets) (official, checked 2026-10-06)
Reviewed 2026-10-06. Steps not attributed to a source are general video practice or computed above.