Skip to content

Compress a Video Without Losing Quality on Windows (Free)

Compress a video without losing visible quality on Windows free using WSL and FFmpeg. Use CRF encoding to shrink files, keep it offline, and never upload a thing.

MGMCSA Guru Team June 22, 2026 3 min read
A WSL terminal compressing a video with FFmpeg CRF encoding on Windows, showing a smaller output file

A phone clip that’s a few minutes long can be hundreds of megabytes, too big to email and slow to upload. “Without losing quality” is the honest sticking point: video is already compressed, so making it smaller means re-encoding, and the trick is choosing a setting where the loss is there in theory but invisible in practice. That’s exactly what CRF encoding gives you.

FFmpeg in WSL does it for free, locally, with one command. No upload limits, no watermark, and the video never leaves your machine.

No WSL yet? See the WSL install guide.

Install FFmpeg

sudo apt update && sudo apt install -y ffmpeg

Confirm:

ffmpeg -version

The command

Compress input.mp4 into a smaller output.mp4 using CRF:

ffmpeg -i input.mp4 -c:v libx264 -crf 23 -preset medium -c:a copy output.mp4

What each part does:

  • -c:v libx264 encodes video with H.264 (widely compatible).
  • -crf 23 is the quality target — the main dial.
  • -preset medium balances speed against compression.
  • -c:a copy keeps the original audio untouched (fast, no quality loss on sound).

Choosing the CRF value

CRF is where you set the quality/size trade-off. Lower is higher quality and bigger; higher is smaller and softer.

H.264 CRF guide

18 Visually lossless — hard to tell from source
20-22 Excellent quality, solid size saving
23 Default — good balance
26-28 Noticeably smaller, some quality loss
30+ Small files, visible compression

Start around 20–23. If the result looks perfect and you want it even smaller, nudge the number up and re-encode a test.

Speed vs size: the preset

-preset controls how hard the encoder works. Slower presets squeeze out smaller files for the same quality, at the cost of time:

ffmpeg -i input.mp4 -c:v libx264 -crf 22 -preset slow -c:a copy output.mp4

Presets run from ultrafast (quick, larger) through medium (default) to veryslow (smallest, slowest). medium or slow is a sensible range for most clips.

Smaller still: H.265

H.265 (HEVC) compresses better than H.264, so files come out smaller at the same quality — but it encodes slower and isn’t supported by every device or app:

ffmpeg -i input.mp4 -c:v libx265 -crf 28 -c:a copy output.mp4

Note that H.265 CRF numbers aren’t directly comparable to H.264 — around 28 is roughly the H.264 23 ballpark. Use it when small size matters more than playing everywhere.

Compress several videos

To compress every MP4 in a folder into a compressed subfolder:

mkdir -p compressed
for f in *.mp4; do ffmpeg -i "$f" -c:v libx264 -crf 23 -preset medium -c:a copy "compressed/$f"; done

Originals stay put; smaller copies land in compressed/.

Wrapping up

Compressing video without visible quality loss comes down to CRF: ffmpeg -i input.mp4 -c:v libx264 -crf 23 -preset medium -c:a copy output.mp4, with the CRF number as your quality dial (around 18–23 for clean results) and the preset trading time for size. H.265 goes smaller when compatibility isn’t a concern.

It’s free, it batches, and it runs in WSL — so your videos never get uploaded. The same FFmpeg install also handles converting MOV or MKV to MP4 and trimming clips without re-encoding.

Frequently asked questions

What does CRF do in FFmpeg?

CRF (Constant Rate Factor) sets a target quality and lets the encoder use whatever bitrate is needed to hit it. Lower numbers mean higher quality and bigger files; higher numbers mean smaller files. It's the simplest way to shrink a video while keeping it visually clean.

What CRF value compresses without visible quality loss?

For H.264, CRF 18 is often described as visually lossless and CRF 23 is the default. Somewhere between 20 and 23 usually gives a strong size cut with no obvious loss. Test a value on your clip and adjust to taste.

Should I use H.264 or H.265 (HEVC)?

H.265 compresses better for the same quality, so files are smaller, but it encodes slower and isn't supported everywhere. H.264 is the safe, universally compatible default. Use H.265 when small size matters more than maximum compatibility.

Does my video get uploaded anywhere?

No. FFmpeg runs locally in WSL, so the video stays on your machine. That's the reason to compress offline rather than on a website, especially for personal recordings or anything large.

Why is encoding taking so long?

Video compression is CPU-intensive, and slower presets trade time for smaller files. Use a faster -preset (like fast or medium) to speed things up, or a slower one (slow) when you want the smallest file and don't mind waiting.

Sources & further reading

Official vendor documentation referenced while writing this guide.

MG

MCSA Guru Team

IT & Systems Administration

We are working IT pros and system administrators who spend our days in Windows Server, Microsoft 365, and the wider Microsoft stack. MCSA Guru is where we write down the fixes and walkthroughs we wish we had found the first time.

MCSA Guru provides independent, educational IT guidance. Microsoft, Windows, Windows Server, Microsoft 365, Exchange, and Microsoft Teams are trademarks of Microsoft Corporation; Docker is a trademark of Docker, Inc. MCSA Guru is not affiliated with or endorsed by Microsoft or Docker. Always test changes in a safe environment before applying them in production.

Related guides

Fixing something right now?

Jump straight into the guide library or search for the exact error or task you are dealing with.