← Back to Complete Guide

How to Make a Video File Smaller: 4 Methods (CRF Explained)

Four tested ways to shrink any video — with the one number that controls everything (CRF), exact commands you can paste, honest size expectations, and the fixes for when compression goes wrong.

By Hadi Karaki, maker of FormatifSeptember 4, 202610 min read

The one number that matters: CRF

CRF (Constant Rate Factor) is a quality scale from 0 (lossless) to 51 (unwatchable) — lower means better quality and bigger files. Unlike bitrate mode, CRF spends bits where your eyes notice them and starves flat, boring regions. One number, near-optimal results, no math. Everything below builds on it.

H.264 CRFLooks likeUse when
18Visually losslessMasters you will edit again
20–23Near-identical to sourceDefault — uploads, sharing, archiving
24–26Slight softening on close lookSmall files for messaging, email
28+Clearly compressedTiny previews, strict size caps only

H.265 rule: add ~5 — x265 CRF 25–28 looks like x264 CRF 20–23 at roughly half the size, but encodes 2–3× slower. For the codec decision itself, see our H.264 vs H.265 guide.

How much smaller will it actually get?

Honest answer: it depends on the source more than the settings. A clean talking-head recording compresses dramatically; grainy concert footage barely budges. As a rule of thumb for a 5-minute 1080p camera file (~600 MB) re-encoded at CRF 23:

  • Talking head / slides / screen recording → 70–85% smaller (~100–180 MB)
  • Typical vlog / travel footage → 50–70% smaller (~180–300 MB)
  • Sports / confetti / film grain → 25–45% smaller (~330–450 MB)

If your file barely shrinks, it was probably already compressed (phone footage, YouTube rips) — there's little redundancy left to remove. And if it somehow gets bigger, see the FAQ: your CRF was more generous than the source bitrate.

Method 1: FFmpeg (free, exact control)

The default — H.264 CRF 23

ffmpeg -i input.mp4 -c:v libx264 -crf 23 -preset medium -c:a aac -b:a 128k output.mp4

The -preset trades speed for size at the same quality: veryfast for rush jobs, slow for ~10% smaller files overnight. Quality stays the same — only time and size move.

Half the size again — H.265 CRF 28

ffmpeg -i input.mp4 -c:v libx265 -crf 28 -preset medium -c:a aac -b:a 128k output.mp4

Biggest single win — downscale 4K to 1080p

ffmpeg -i input.mp4 -vf scale=1920:1080 -c:v libx264 -crf 20 -c:a aac output.mp4

Batch: whole folder at once

Windows Command Prompt

for %i in (*.mp4) do ffmpeg -i "%i" -c:v libx264 -crf 23 -c:a aac "%~ni-small.mp4"

macOS / Linux terminal

for f in *.mp4; do ffmpeg -i "$f" -c:v libx264 -crf 23 -c:a aac "${f%.mp4}-small.mp4"; done

Exact size target (e.g. fit 25 MB): two-pass bitrate

CRF can't hit exact sizes — bitrate mode can. Math: 25 MB for a 60-second clip ≈ 3.3 Mbps total; minus 128 kbps audio leaves ~3.2 Mbps video. Then:

Pass 1 + Pass 2

ffmpeg -y -i input.mp4 -c:v libx264 -b:v 3200k -pass 1 -an -f null NUL
ffmpeg -i input.mp4 -c:v libx264 -b:v 3200k -pass 2 -c:a aac -b:a 128k output.mp4

macOS/Linux: replace NUL with /dev/null. Two passes = best quality at that exact size.

Method 2: HandBrake (free GUI)

  1. Drop the file in, pick Fast 1080p30 (or HQ 1080p30 for near-invisible loss).
  2. Video tab → Quality: RF 22 is HandBrake's CRF-equivalent sweet spot (lower RF = better, like lower CRF).
  3. Dimensions tab → cap resolution at 1080p if the source is 4K.
  4. Queue up the rest via Add to Queue → Add All, then Start.

Method 3: Shutter Encoder (free GUI, flexible queue)

Prefer HandBrake-style buttons with FFmpeg-grade control? Shutter Encoder (free, Windows/macOS/Linux) re-encodes through a function picker instead of presets:

  1. Drag in one file or a whole folder — the queue accepts batches.
  2. Set the Function dropdown to H.264 (or H.265 for half the size at slower speed).
  3. Under Bitrates, pick a target (e.g. 8 Mbps for 1080p uploads) or leave quality-driven defaults.
  4. Hit Start. Same re-encode tradeoff as HandBrake, with finer codec and filter control per job.

Reach for Shutter Encoder when HandBrake's presets feel limiting but the terminal still feels like overkill — especially for mixed folders where each file needs different settings.

Recipes for strict platforms

Discord (25 MB free cap): 720p, H.264 CRF 26–28, AAC 96–128k. Fits several minutes of clean footage; grainy clips may need 480p.

WhatsApp: accepts large files but recompresses aggressively — send as Document instead of Video to preserve your encode.

Email (20–25 MB attachments): same Discord recipe, or trim first — a 30-second highlight beats a crushed 10-minute file.

Method 4: batch folders, no terminal

Fifty videos? Don't babysit a queue.

CRF 23 in a loop works — until file 31 of 50 fails on a corrupt header and you discover it Monday. Formatif Pro ($8.95 one-time) compresses entire folders offline with per-file status, skip-and-continue on errors, and saved recipes (e.g. “client review: 1080p, CRF 22, AAC”) you reuse forever.

Folder in, compressed folder out
CRF-style quality targeting per recipe
No file size limits, fully offline
One-time purchase of $8.95 — no subscription

Compression questions, answered

What CRF value should I use?

H.264 CRF 20–23 for anything people watch; 18 for masters; 26–28 for messaging caps. H.265: add ~5 to each.

Why did my video get bigger after compressing?

Output bitrate exceeded the source's — common with CRF 18 on already-compressed phone footage. Use CRF 23+ or check source bitrate with ffprobe first.

How do I compress to an exact size?

Two-pass bitrate mode: target size ÷ duration = bitrate, minus audio. Commands above; CRF can't hit exact sizes.

How do I compress video for Discord?

720p H.264 CRF 26–28 with 96–128k AAC fits several minutes under 25 MB. Grainy footage may need 480p.

Does 4K to 1080p lose quality?

It removes pixels, not quality — pristine on 1080p screens at ~¼ the size. Only keep 4K for 4K displays or cropping room.

How do I batch compress a folder?

FFmpeg loops (CMD + bash above), HandBrake's queue, or Formatif Pro for a no-terminal batch with per-file status and error skipping.

Keep learning

Compress the whole folder while you get coffee.

Formatif Pro ($8.95 one-time) and Formatif AI ($12.95 one-time) handle video, image, and audio conversion offline — with batch workflows, no file size limits, and a 3-day free trial.

The FFmpeg commands above are complete and free forever — pick whichever method fits your file count.

HK

Written by

Hadi KarakiLinkedIn

Founder of Formatif, a local-first offline media processing suite for Windows and Linux. Hadi writes about video, image, and audio formats, compression, and privacy-first desktop workflows.