Tutorial · 11 min read · Updated 7 September 2026
How to compress video files under 25MB for email and Discord
Email attachments max out at 25MB and Discord free caps at 10MB or 25MB. Learn bitrate calculations to fit videos into tight size limits.
This is a practical guide to video compression, bitrate maths and codecs for email and messaging attachments. Sending a video clip by email (Gmail, Outlook, Yahoo) or through a chat app (Discord, Slack, Microsoft Teams) is often a struggle because of fixed attachment size limits. Gmail allows 25 MB and Outlook.com 20 MB (see Gmail's help page on attachments), while Discord's free tier caps uploads at 10MB to 25MB.
Chapter 1: The Fundamental Mathematics of Video Bitrates
Many people believe that a video's file size depends only on its resolution (for example, 1080p vs. 4K) or the size of the video frame. In fact, file size follows a simple, fixed formula:
Total File Size (MB) = [ Total Bitrate (kbps) × Duration (seconds) ] ÷ 8,192
With this formula you can work out the highest bitrate you can use so that a video of any length fits under any file size limit:
| Video Clip Duration | Target File Cap | Max Allowable Video Bitrate | Max Audio Bitrate | Recommended Resolution |
|---|---|---|---|---|
| 30 Seconds | 20 MB (Safe for Email) | 5,300 kbps | 160 kbps AAC | 1080p Full HD (1920×1080) |
| 60 Seconds (1 Min) | 20 MB (Safe for Email) | 2,600 kbps | 128 kbps AAC | 1080p / 720p HD |
| 3 Minutes | 20 MB (Safe for Email) | 800 kbps | 96 kbps AAC | 720p HD (1280×720) |
| 5 Minutes | 20 MB (Safe for Email) | 450 kbps | 64 kbps AAC | 480p SD (854×480) |
| 10 Minutes | 20 MB (Safe for Email) | 210 kbps (H.265 / AV1) | 48 kbps Opus | 360p / 480p SD |
Chapter 2: Codec Evolution: H.264 vs. H.265 (HEVC) vs. AV1 vs. VP9
The codec decides how efficiently the changes in pixel colour are turned into quantised discrete cosine transforms (DCT) or motion vectors:
- H.264 / AVC (Advanced Video Coding): The safest choice for playback on any hardware. It plays natively on 100% of smartphones, smart TVs, browsers, car stereos and email clients made in the last 15 years. Always use H.264 when you do not know what device the recipient has.
- H.265 / HEVC (High Efficiency Video Coding): Gives roughly 40% to 50% better compression than H.264 at the same visual quality. Good for 4K recording, but older Windows devices need a paid codec licence to play it.
- AV1 (AOMedia Video 1): A newer, royalty-free codec backed by Google, Apple, Microsoft and Mozilla. It compresses up to 30% better than HEVC, which makes it the best choice for streaming at very low bitrates.
- VP9: Google's open-source video codec, built for WebM files and YouTube streaming. Modern Chromium, Safari and Firefox browsers all support it.
Chapter 3: The 4 Core Levers of Video Compression
- 1. Intelligent Spatial Downscaling:
A 4K frame (3840×2160) has 8,294,400 pixels. Scaling down to 1080p (1920×1080) leaves 2,073,600 pixels, which is straight away a 75% reduction in raw visual data. For viewing on a phone and for email attachments, 720p or 1080p looks sharp without wasting megabytes.
- 2. Temporal Downsampling (Framerate Reduction):
Game recordings and iPhone action clips often run at 60 frames per second (fps) or 120 fps. For company demos, product walkthroughs or voice memos, dropping from 60fps to the standard 30fps, or to the 24fps used in cinema, halves the frame processing work without making anything harder to follow.
- 3. Rate Control Mode (Constant Quality CRF vs. 2-Pass VBR):
Never use Constant Bitrate (CBR) for video you want to keep. Use a Constant Rate Factor (CRF) between 22 and 28, or 2-Pass Variable Bitrate (VBR). In the first pass, VBR looks at the whole video, so it can give more bits to fast-moving scenes and very few to still backgrounds. The FFmpeg H.264 encoding guide explains both modes.
- 4. Audio Stream Optimization:
Never leave uncompressed PCM audio or a 320kbps 5.1 surround track inside an email attachment. Mixing down to mono or to 128kbps stereo AAC cuts the audio from 15MB to less than 1.5MB.
Chapter 4: In-Browser GPU-Accelerated WebCodecs Processing
Uploading private family videos, company training recordings or confidential video depositions to a cloud conversion website puts your footage at serious risk of leaking.
The video compressor uses modern browser features, WebCodecs, WebAssembly and WebGPU, to unpack, re-encode and repackage your MP4 and WebM files on your own computer's processor. No video data is sent over the network, so there is no upload to wait for and nothing to worry about.
Two smaller levers help before you re-encode anything. If the clip is longer than it needs to be, trimming it beats compressing it: half the duration is half the bytes, with no loss in quality. And if only the sound matters, extract it with Video to MP3 and send a file a fiftieth of the size.
What each service will actually accept
Most of the frustration here comes from aiming at the wrong number. These are the published limits as of 2026. Providers do change them, so check the current figure if a send fails.
| Where you are sending it | Limit | Aim for |
|---|---|---|
| Gmail | 25 MB | 18 MB |
| Outlook.com | 20 MB | 15 MB |
| Yahoo Mail | 25 MB | 18 MB |
| Most workplace mail servers | 10–25 MB, set by an administrator | 8 MB |
| Slack | 1 GB a file on most plans | No need to compress |
| Telegram | 2 GB free, 4 GB on Premium | No need to compress |
| Documents run to 2 GB; media sent as video is re-compressed by WhatsApp itself | Send as a document to keep your quality |
Why the target is always lower than the limit
Mail attachments are not sent as raw bytes. They are base64-encoded, which turns every three bytes into four, so they are about 33% larger on the wire. A 20 MB file arrives at the server as roughly 27 MB and is refused by a 25 MB limit that you never exceeded on disk.
So the working rule is to target about 70% of the published number. For Gmail that is 18 MB, not 25. Headers, the message body and any other attachment come out of the same budget.
The order to try things in
- Trim first. Cutting a two-minute clip to forty seconds removes two thirds of the bytes and costs nothing in quality. Compression cannot match that.
- Then reduce the resolution. Going from 4K to 1080p removes three quarters of the pixels. On a phone screen almost nobody will see the difference.
- Then compress to the target size. Ask for 18 MB rather than a vague "high compression", so the result either fits or tells you it could not.
- If it still will not fit, stop compressing. Past a point the video turns to mush. Upload it to a drive and send the link, or split the clip in two.
- If only the sound matters, extract the audio and send a file a fiftieth of the size.