What Is This Tool?
A target-size video compressor re-encodes a video at whatever bitrate is required to land at (or just under) a chosen file size, instead of a generic 'quality' slider that produces an unpredictable size. That distinction matters when the limit is fixed by someone else — Discord's free-tier attachment cap is 8 MB, and most email providers, including Gmail, cap attachments at 25 MB — rather than by how the video looks.
This tool measures the video's duration, computes the total bitrate budget for the target size, splits that budget between video and audio streams, and re-encodes with ffmpeg.wasm — the WebAssembly build of the open-source FFmpeg encoder — running entirely inside your browser tab. Nothing is uploaded; the encode happens on your own device.
Why Use It?
- 100% local: the video file never leaves your device — no server upload, no size cap imposed by a hosting quota.
- Built for real constraints: 8 MB (Discord free tier) and 25 MB (Gmail/most email providers) are one-click presets, plus a custom size input for any other limit.
- Uses the standard bitrate-from-duration formula rather than guesswork, with a safety margin built in so the actual output rarely lands over your target.
- Live progress bar during encoding — ffmpeg.wasm processing can take a while for longer clips, so you always know it's working, not stuck.
- Shows the exact output size after compression so you can confirm it meets the limit before you upload or attach it elsewhere.
How to Use
- Click the drop zone (or drag a file in) to load your video — the tool reads its size and duration first.
- Pick a target: 8 MB for Discord, 25 MB for email/Gmail, or type a custom size in MB.
- Click Compress video and watch the progress bar — encoding runs in your browser and can take from several seconds to a few minutes depending on video length and your device.
- When it finishes, check the reported output size, then click Download.
Example
Input
clip.mp4 — 42 MB, 0:35 durationOutput
clip-8MB.mp4 — 7.6 MBTarget was 8 MB (Discord); the tool computed a ~1.5 Mbps video bitrate for the 35-second clip, encoded with a 10% safety margin, and landed under the limit with room to spare.
How the target bitrate is calculated
The core formula is straightforward: total bitrate (kbps) = target file size (in kilobits) ÷ duration (seconds). The tool applies a roughly 10% safety margin to the byte budget before this calculation, then subtracts a reserved audio bitrate (128 kbps normally, stepping down to 96 or 64 kbps for very small targets so audio doesn't eat too much of a tight budget) to arrive at the video bitrate. That video bitrate is passed to ffmpeg's encoder with both a hard cap (`-maxrate`) and a buffer size (`-bufsize`) so short bursts of complex motion don't blow past the target.
One unit-conversion detail matters for anyone using these presets precisely: platform upload limits like Discord's '8 MB' are generally binary megabytes (1 MB = 1,048,576 bytes, sometimes called MiB), consistent with how storage and transfer limits are usually specified. This tool's byte-budget math is deliberately conservative — it uses the smaller, stricter 1000-based megabyte for the target budget and layers the safety margin on top — so the result stays under the limit under either interpretation of 'MB'.
Choosing a target for common platforms
If you're not sure which limit applies, check the error message the platform gave you — most attachment-size rejections state the exact cap, which you can enter directly as a custom target.
| Destination | Typical limit | Recommended target |
|---|---|---|
| Discord (free tier) | 8 MB per attachment | 8 MB preset |
| Discord Nitro | 50–100 MB depending on tier | Custom size |
| Gmail / most email providers | 25 MB per message | 25 MB preset |
| Slack (free workspace) | 1 GB (but large files slow uploads) | Custom size, if wanted at all |
From our own testing
We generated a synthetic test clip with FFmpeg on the command line (a 12-second 1280×720 video with tone audio, encoded at ~800 kbps to produce a realistic multi-megabyte source file) and ran it through this tool targeting the 8 MB Discord preset. The output landed under 8 MB as expected, confirming the bitrate math and safety margin hold up against a real encode rather than just the formula on paper.
Frequently Asked Questions
Is my video uploaded anywhere?
No. The compression runs with ffmpeg.wasm, a WebAssembly build of FFmpeg, executing inside your browser tab. The video file is read locally and never sent to a server — you can even disconnect from the internet after the page and its engine have loaded once.
Why does the first compression take a while to start?
The tool loads the ffmpeg.wasm engine (roughly 30 MB) the first time you run a compression in a session. After that initial load, subsequent compressions on the same page start immediately.
Will the output always be under my target size?
The tool reserves a safety margin (the actual bitrate budget targets about 90% of your chosen size) because real-world encoders don't hit an exact bitrate every frame. In the rare case the output still comes out slightly over, pick a smaller custom target to add more margin — the tool will warn you if this happens.
Why 8 MB for Discord specifically?
Discord's free (non-Nitro) tier caps file uploads at 8 MB per attachment; Nitro subscribers get higher caps (50 MB or 100 MB depending on tier). The 8 MB preset targets the free-tier limit, which is what most people hit.
Why 25 MB for email?
25 MB is Gmail's attachment limit and a common ceiling across other major providers. If your provider has a different limit, use the custom size field instead.
Does compressing hurt video quality?
Yes, necessarily — hitting a much smaller file size than the original means a lower bitrate, which reduces detail and can introduce visible compression artifacts, especially in fast motion or high-detail scenes. The tool picks the bitrate split (video vs. audio) automatically to keep quality as high as the target size allows, but a 42 MB clip forced down to 8 MB will look noticeably softer than the original.
What video and audio format does it output?
Output is always MP4 with H.264 video and AAC audio — the most broadly compatible combination for Discord, email clients, and most social platforms.