Video7 min

How to Compress a Video Without Losing Quality (H.264 Guide)

Shrink MP4 and MOV videos 50–80% with the H.264/H.265 CRF ladder — all in your browser via ffmpeg.wasm, no upload.

Video compression runs locally via Zro7 Compress Video using ffmpeg.wasm. Even multi-GB recordings never leave your browser.

To compress a video without visible quality loss, use Zro7 Compress Video with H.264 at CRF 23 or H.265 at CRF 28. Those are the FFmpeg defaults for a reason — they typically shrink phone recordings 50–80% while staying visually identical to the source. Everything runs in your browser via ffmpeg.wasm; nothing is uploaded.

CRF, in plain English

CRF (Constant Rate Factor) tells the encoder "pick whatever bitrate hits this quality target." Lower = higher quality + bigger file. Higher = smaller file + more artifacts. The scale is codec-specific:

  • H.264: 0 = lossless, 18 = visually lossless, 23 = default, 28 = noticeably compressed.
  • H.265 (HEVC): add ~5 to the H.264 value — CRF 28 in H.265 ≈ CRF 23 in H.264 but 30–50% smaller.
  • AV1: add ~5 more; superior efficiency but slow to encode in a browser.

Recommended presets

  • Web / social: H.264, CRF 23, preset medium. Universal compatibility.
  • Archive / storage: H.265, CRF 28, preset slow. Half the size, all modern devices play it.
  • Chat attachment (needs to fit under 25 MB): H.264, CRF 28, cap 720p.

Steps

  1. Open Compress Video.
  2. Drop your MP4, MOV, MKV, or WebM.
  3. Pick codec (H.264 for compatibility, H.265 for size), CRF, and optional max resolution.
  4. Click Compress. Progress + ETA are shown live.
  5. Download the compressed file.

Why browser compression beats HandBrake for small jobs

  • No install; runs on Chromebooks, work laptops, and phones.
  • No upload — the client's 4 GB wedding video stays local.
  • Uses ffmpeg.wasm — the same libavcodec under HandBrake's hood.

Trade-offs vs desktop HandBrake

Native FFmpeg with hardware acceleration (NVENC, QuickSync, VideoToolbox) is 5–20× faster on the same file. Browser encoding is CPU-only. For occasional videos: browser wins on convenience. For daily bulk transcoding: use desktop.

Frequently asked questions

How large a video can I compress in the browser?

Multi-GB works on modern desktops. The whole pipeline streams frames through a worker; you're bounded by disk space for the output, not RAM.

H.264 or H.265?

H.264 if the video needs to play everywhere including old smart TVs. H.265 for anything modern — same quality at ~half the size.

Does it re-encode audio?

By default it copies the audio stream (no quality loss). Toggle re-encode to AAC 128k to shrink further if the source uses PCM.

Is the output MP4 compatible with iPhone / Android?

Yes. Default output is MP4 + H.264 + AAC, playable natively on every platform.

Is anything uploaded?

No. ffmpeg.wasm runs in a Web Worker. Verify with DevTools → Network.

Related posts

← Back to blog