Compress Videos with HandBrakeCLI Presets
Re-encode big video files into much smaller MP4s using HandBrake's command-line tool and its built-in presets.
Run HandBrakeCLI -i input.mov -o output.mp4 --preset "Fast 1080p30" --optimize to compress with a tested preset.
01Command
Command
$ HandBrakeCLI -i input.mov -o output.mp4 --preset "Fast 1080p30" --optimize02What it does
HandBrake wraps x264/x265 encoding with sensible defaults, so instead of tuning ffmpeg flags you pick a preset: "Fast 1080p30" balances speed and size, "Fast 720p30" shrinks further for phone viewing. --optimize writes the MP4 for web streaming, and --encoder x265 squeezes 20–30% more than x264 at the same quality if your players support HEVC. Presets are lists — run HandBrakeCLI --preset-list to see everything available.
03Risk
!Warning: Re-encoding always loses some quality and takes time; keep the original file until you have checked the result plays correctly and the size is acceptable.
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- HandBrake CLI GuideEvidence: Official CLI guide covering -i/-o input output, --preset selection, and --optimize for web streaming.
- HandBrakeCLI(1) — Debian manual pageEvidence: Reference for HandBrakeCLI options including -i, -o, --preset, --optimize and --encoder.
Last verified: 2026-09-18 · Category: Media