FFmpeg Cookbook

Gmail Video Compressor

Compress video to Gmail's 25 MB attachment cap. Solves "attachment too large" on the first try.

Local processing only — your file never leaves the browser
🎯 Target size: 25 MB (Gmail's attachment cap) — encoded with a 0.92 safety factor (~23 MB target). Google Drive supports up to 25 GB, but this tool is for direct email attachments.
✉️
Drag & drop a video, or tap to select
MP4 / MOV / WebM, up to 500 MB
🎬
25 MB fits a 720p clip of about 1–3 minutes with very little quality loss. For longer videos, trim first or downscale to 720p with the resize tool for better results.
Processing… 0%
Original
Compressed
Download compressed video

Useful next tools

Popular uses
Prepare for Gmail attachment limitsAvoid Drive links when possibleCompress before emailing

What this tool does

  • Targets Gmail's 25 MB attachment cap
  • Bitrate back-calculated from duration with a 0.92 safety factor
  • 25 MB is generous enough for a 1–3 min 720p clip with strong quality
  • Standard H.264 + AAC
  • Local-only processing — your file never leaves the browser

How to use

  1. 1

    Drop the video

    MP4 / MOV / WebM.

  2. 2

    Verify duration

    Auto-detected. Manual entry if detection fails.

  3. 3

    Compress

    A green check appears when the result fits 25 MB.

What each setting means

Target 25 MB
Gmail's attachment cap. Fixed.
0.92 safety factor
Accounts for container overhead, targeting ~23 MB.
Audio bitrate
Auto-switches between 96 kbps (≤10 min) and 64 kbps (>10 min).

Recommended settings

Clip 1–2 minutes
Default keeps 1080p
25 MB at short durations comfortably fits 1080p.
Clip 3–5 minutes
Default OK; downscale to 720p if worried
720p often more reliable mid-length.
Clip > 5 minutes
Downscale to 720p / 540p first
Long clips need pre-processing.

Common pitfalls

Symptom: Gmail still says "attachment too large"

Cause: Recipient organization may have a stricter 20 MB limit.

Fix: Use Google Drive instead — Gmail offers this automatically when over the recipient's limit.

Symptom: Result slightly over 25 MB

Cause: Container overhead.

Fix: The 0.92 safety factor usually handles this. Re-run if needed.

Symptom: Quality looks rough

Cause: Long clip starved for bitrate.

Fix: Trim or downscale to 720p before compressing.

Equivalent FFmpeg commands

Reference commands you can run on the desktop FFmpeg CLI.

Gmail 25 MB compression (3 min clip)
ffmpeg -i input.mp4 -c:v libx264 -preset fast -b:v 1000k -maxrate 1000k -bufsize 2000k -c:a aac -b:a 96k -movflags +faststart output.mp4
Long-clip recipe (10 min)
ffmpeg -i input.mp4 -c:v libx264 -preset fast -b:v 300k -maxrate 300k -bufsize 600k -c:a aac -b:a 64k -movflags +faststart output.mp4
Pre-downscale to 720p / 540p for better quality.

Browser support & limits

  • Max input size: 500 MB
  • Target fixed at 25 MB (no custom)

Privacy

This tool runs ffmpeg.wasm directly in your browser. Files never leave your device — everything runs locally. Read the privacy policy →

Frequently asked questions

Is Gmail's attachment limit really 25 MB?

Yes on the sender side. Some recipient providers cap at 20 MB; Gmail will flag the message in those cases.

What happens if I exceed 25 MB?

Gmail auto-converts the attachment to a Google Drive shared link. Use this tool when you want to embed the actual file in the message.

Safe for business email?

The file never leaves your device — verifiable in DevTools → Network. Safe for confidential / NDA content.

Works for Outlook / Yahoo Mail?

Outlook caps at 20 MB, Yahoo Mail at 25 MB. For Outlook, the [WhatsApp 16 MB tool](/en/tools/whatsapp-video-compressor/) is a safer target.

Can I send directly from iPhone?

Open this tool in Safari, pick from camera roll, compress, then attach in the Mail app.

Related tools

In depth: context unique to this tool

Email provider attachment limits: a real-world matrix

The "Gmail = 25 MB" number is misleading in practice. Real-world delivery depends on both sender and receiver caps. Sender side: Gmail personal 25 MB / Gmail Workspace 25 MB / Outlook.com 20 MB / Outlook on the Web (Microsoft 365 Business) 20-150 MB depending on admin policy / Yahoo Mail 25 MB / iCloud Mail 20 MB / ProtonMail 25 MB / Zoho Mail 12 MB. Receiver side: Exchange Online accepts 25-150 MB, Gmail accepts 50 MB on inbound, on-prem Exchange Server commonly caps at 10-20 MB.

This tool targets Gmail's 25 MB sender cap, but if the recipient is on Outlook you should aim for 20 MB. More than half of bounced video attachments are 'sender Gmail 25 MB passed, recipient org enforced 20 MB.' For important recipients, ask in advance what the safe size is — 18 MB hits both Gmail and most Outlook setups. To hit 18 MB, run this tool once at 25 MB target, then pass the output through the [general compressor](/en/tools/compress/) with a custom target, or switch to desktop FFmpeg with `-b:v 1500k`.

Why Gmail auto-switches to Drive links above 25 MB

Gmail replacing > 25 MB attachments with Google Drive links isn't UI politeness — it reflects an SMTP-era constraint. SMTP (RFC 5321) was designed for short text messages, and attachments are MIME-encoded (Base64), which inflates payload size by ~1.37×. A 25 MB video becomes a ~34 MB message on the wire, near the upper bound of what relays comfortably handle.

Drive links shift the cost onto the recipient: they must click out, possibly fight Drive access permissions, and risk having their inbox filters flag the external link. Compressing the video to fit inside the email body keeps everything in the recipient's inbox and avoids the "view this in Drive" friction altogether.

Why local processing matters for confidential email

Business email attachments often include sensitive content: patient information in healthcare, evidence in legal, performance review video in HR, defective-unit footage in manufacturing. Most online compressors are upload-based — even with TLS in transit, the file gets temporarily decoded on the server. "Files are deleted within 24 hours" doesn't help when the org's compliance baseline (GDPR / HIPAA / Japan's APPI) treats "any cloud round-trip" as a disclosure event.

This tool uses ffmpeg.wasm so the entire encode runs in the browser; the file never leaves the device. You can verify this directly: open DevTools → Network tab while encoding, and confirm no video payload is sent out. Some "local-only" tools still phone home with telemetry or thumbnail uploads, and you'd only notice on an explicit traffic audit. This tool's source is on GitHub for direct inspection.