createademo
FeaturesPricingBlogAboutHelp
Sign inGet started
Blog/Tutorials
Tutorials

How to Compress a Video Without Wrecking Quality

Shrink a video file the right way: lower resolution and bitrate, pick the right codec, and use exact ffmpeg CRF or HandBrake RF settings to keep it sharp.

JM
John M
March 31, 2026 · 6 min read

To compress a video without visibly wrecking it, pull three levers in the right order: downscale the resolution (1080p to 720p roughly halves the bitrate you need), set a quality target instead of a file size (ffmpeg -crf 23 or HandBrake RF 22, not a bitrate cap), and pick H.264 for compatibility or H.265 for ~50% smaller files. The single ffmpeg command below handles most jobs:

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

That typically cuts 50-70% before any visible degradation. The rest of this post explains the levers, gives exact settings per tool, and covers the email size trap most people hit.

What actually controls video file size

File size is roughly bitrate x duration. You can't change duration without cutting footage, so bitrate is the real driver. Resolution and codec just determine how much bitrate you need to look good:

  • Resolution — the biggest, easiest win. Dropping 1080p to 720p roughly halves the required bitrate; 720p to 480p halves it again. A 480p clip at 1000-2000 kbps is the standard email-friendly target.
  • Bitrate — the direct knob. A 5-minute 1080p clip fits under 25MB at about 600 kbps in H.264. Lower bitrate = smaller file, but starve it too far and you get blocky artifacts.
  • Codec — H.264 (libx264) is the universal default that plays everywhere. H.265/HEVC (libx265) is about 50% smaller at equal quality (a 100MB H.264 1080p file lands near 50MB in H.265) but encodes 2-3x slower and won't play on some older phones, browsers, or email previews. AV1 is smaller still but painfully slow and still patchy for playback — worth knowing, not worth leading with.

The non-obvious rule: lower the resolution before the bitrate. A 1080p file squeezed to a tiny bitrate looks blocky and smeared; the same byte budget spent on a 720p frame looks sharp.

Fastest method: compress online, free, no install

If you just need it smaller once and the footage isn't sensitive, a browser tool is fine:

  • ezGIF (ezgif.com) — genuinely free, no signup, no account, no watermark, with resolution and bitrate controls. Best default pick.
  • VEED (veed.io) — free up to 1GB with a live size slider, but the free tier stamps a watermark.
  • FreeConvert (freeconvert.com) — defaults to about 40% reduction or lets you set a custom target size.
  • Kapwing, Clideo, EchoWave — slider-based; most add a small watermark on free tiers.

The catches: free tiers cap upload size, often watermark or upsell, and uploads are slow for big files. And you're sending your footage to a third-party server — fine for a marketing clip, not for anything confidential.

Best quality with control: HandBrake

HandBrake is free, open-source, and runs on Windows, Mac, and Linux. It's the right tool when you want repeatable quality without the command line.

  1. Open HandBrake, drag in your file.
  2. Leave the preset on Fast 1080p30 for max compatibility, or switch to HQ 1080p30 for better quality.
  3. Under the Video tab, set Quality to Constant Quality and use the RF slider — do not use Avg Bitrate or Target Size for general compression.
  4. Pick your RF by resolution: RF 20 (±1) for SD, RF 22 (±1) for 720p/1080p, RF 24-28 for 4K. Lower RF = better quality and bigger file.
  5. For 2026's best size/quality balance, change Video Encoder to H.265 (x265) and use RF 20-22.
  6. Tick Web Optimized (fast-start) so web video starts playing before the whole file downloads.

Power method: ffmpeg with CRF

ffmpeg gives you exact, copy-pasteable control. The recommended approach is CRF (Constant Rate Factor) — you set quality, the encoder picks the size.

# H.264, high-quality web default
ffmpeg -i input.mp4 -c:v libx264 -crf 23 -preset slow -c:a aac -b:a 128k output.mp4

# H.265, ~50% smaller at the same look
ffmpeg -i input.mp4 -c:v libx265 -crf 28 -preset slow -c:a aac -b:a 128k output.mp4

# Downscale to 720p as well (the -2 keeps aspect ratio + even dimensions)
ffmpeg -i input.mp4 -vf scale=-2:720 -c:v libx264 -crf 24 -preset slow -c:a aac -b:a 96k output.mp4

CRF runs 0-51, lower = better and bigger. For H.264 the practical range is 18-28: 18 is near-lossless (great for screen recordings and animation), 23 is the YouTube/Vimeo-grade web standard, 28 is smaller but acceptable, 30-35 is aggressive social. For H.265, default 28 matches H.264's 23 in quality. Handy rule: ±6 CRF roughly halves or doubles the file size.

The -preset (ultrafast → veryslow) trades encode time for efficiency. A slower preset gives a smaller file at the same quality, so use slow or slower for final exports. Drop the frame rate with -r 30 and keep audio at 96-128k AAC; cranking audio bitrate on a short clip just wastes bytes.

Hitting an exact size for email

CRF won't hit a hard cap, so for a strict ceiling use two-pass with a computed bitrate:

ffmpeg -i input.mp4 -c:v libx264 -b:v 600k -pass 1 -an -f mp4 /dev/null
ffmpeg -i input.mp4 -c:v libx264 -b:v 600k -pass 2 -c:a aac -b:a 128k output.mp4

Your bitrate budget = (target MB × 8192) / duration_sec − audio_kbps.

Now the trap almost everyone misses. Email caps look like this:

ProviderAttachment limit
Gmail25MB (above that it auto-links via Drive)
Yahoo25MB
Outlook.com (free)20MB
Microsoft 365up to 150MB, but IT often caps 25-50MB

But attachments are base64/MIME-encoded, which inflates them ~33%. A 20MB file becomes about 27MB in transit, so a file built to exactly 25MB bounces. Target 20-23MB of actual content under a "25MB" limit.

Choosing settings by goal

GoalResolutionCodecSetting
Email attachment480p-720pH.264two-pass to 20-23MB, or CRF 26-28
Web embed / social720p-1080pH.264CRF 23-26, Web Optimized on
Archive / master1080p+H.265CRF 18-22, preset slow
Quick share, sensitive footage720pH.264HandBrake RF 22 (local, no upload)

Common mistakes that ruin quality or waste time

  • Targeting a file size instead of a quality — single-pass bitrate targeting gives unpredictable results. Use CRF/RF by default; only go two-pass when a cap is mandatory.
  • Lowering bitrate without lowering resolution — downscale to 720p/480p first; it looks far better at the same size.
  • Re-compressing an already-compressed MP4 — generation loss stacks. Always start from the highest-quality source.
  • Getting the slider backward — in CRF and RF, lower number = higher quality and bigger file. Raising it for "better" quality gives you mush.
  • scale=-1:720 errors in libx264 — it can produce an odd width and fail. Use scale=-2:720.
  • Skipping fast-start for web — without Web Optimized, the whole file downloads before playback begins.

When a smaller file still isn't the right format

Compression makes a video lighter, but a passive clip still can't show software the way the software actually works. If your goal is a product walkthrough, viewers want to move at their own pace and click through the steps — for that, an interactive demo beats a compressed video. No bitrate to budget, nothing to re-encode for email, and it embeds anywhere as a link.

A self-paced interactive demo replaces a heavy screen-recording MP4 — no compression, no 25MB email cap, just a shareable link.

createademo records your product via a Chrome extension (screenshots and/or video), then lets you add clickable hotspots, tooltips, zoom, and narration. It's screenshot- and video-based capture, not editable DOM capture, so it won't rebuild your app's HTML — but for sharing a multi-step flow it sidesteps the whole file-size problem. If you're weighing the two, see interactive demo vs video, and if you still need the raw recording, how to record a software demo covers capturing a clean source before you compress it.

Frequently asked questions

What is the best free way to compress a video?

For full control with no upload and no watermark, use HandBrake (free, Win/Mac/Linux) with the Constant Quality RF slider at 20-22 for 1080p, or ffmpeg with -crf 23 -preset slow. For a quick no-install job, ezGIF.com is free with no signup or watermark.

How do I compress a video to under 25MB for email?

Email caps inflate ~33% from base64 encoding, so target 20-23MB of actual content, not 25MB. Downscale to 720p or 480p and use ffmpeg two-pass with a bitrate budget of (target MB x 8192) / duration in seconds minus the audio kbps.

Does compressing a video always reduce quality?

Some loss is unavoidable, but at H.264 CRF 23-25 it is invisible on most screens while cutting 50-70% of the file size. The big mistakes are starving a 1080p file of bitrate instead of downscaling, and re-compressing an already-compressed MP4.

Related in Tutorials

How to Convert a Video to a GIF
6 min read
How to Annotate a Screenshot (Every Platform, Free)
2 min read
How to Take a Scrolling Screenshot
6 min read

Show your product, don't pitch it.

Record an interactive demo in under 30 minutes. Full editor free on every plan. No per-seat fees.

Get started free →
createademo

Create interactive product demos in minutes. No video editing required.

Product

FeaturesPricingHelp CenterBlog

Company

AboutContactChrome Extension

Legal

Privacy PolicyTerms of ServiceSecurity

© 2026 createademo. All rights reserved.