halfsize / Discord
Get a video under Discord's 20 MB limit
Discord's free plan stops at 20 MB per file. Paid tiers raise the cap, but most people just need the clip to fit. This takes one command and runs entirely on your computer.
Step by step
- Install Node.js 18+ if you do not have it.
- Open a terminal in the folder with your video.
- Run the command below.
--for discordsets the cap to 20 MB for you.
$ npx halfsize clip.mp4 --for discord
halfsize 0.1.5
clip.mp4
136 MB 60s 1920x1080 30.00 fps h264
target 20.0 MB (discord)
plan H.264 1280x720 2.46 Mbps audio 128 kbps 2-pass
output clip.20mb.mp4
measuring quality done in 8s
136 MB → 19.45 MB 7.0x smaller 2.7% under target
VMAF 88.3 SSIM 0.971 slight softening
Then drag clip.20mb.mp4 into the Discord message box and send. That is it.
What 20 MB actually costs in quality
Discord's cap is the same number for everyone, but the quality cost depends on duration and content. Measured on a 60-second 1080p clip:
| Target | Resolution chosen | Video bitrate | VMAF | Verdict |
|---|---|---|---|---|
| 20 MB | 1280×720 | 2.46 Mbps | 88.3 | slight softening |
| 10 MB | 960×540 | 1.17 Mbps | 82.9 | slight softening |
| 5 MB | 640×360 | 0.55 Mbps | 72.0 | visible loss |
Source: 60 s, 1920×1080, 30 fps, 18 Mbps. VMAF at the midpoint against the source. A talking head does better; confetti does worse.
Why not just use Discord's own compression?
Discord re-encodes videos for inline playback, but it will not take a 200 MB file under a 20 MB upload cap. You have to get the file to the limit first. Doing that with a video editor means guessing a bitrate and exporting repeatedly.
halfsize solves the part that is actually annoying: it derives the bitrate from the target and the duration, picks a resolution that fits, and then tells you the measured quality. If the verdict says visible loss, you know to trim the clip or drop to 720p before uploading instead of finding out from your friends.
Keep H.264 for Discord. The default already is H.264, which plays inline everywhere. H.265 makes a smaller file at the same quality, but browser and mobile support is inconsistent, so it is not worth the risk for a chat upload.
Tips that help more than a lower bitrate
- Trim first. Removing five boring seconds buys more quality than any encoder setting.
- 720p is usually the sweet spot at 20 MB. The tool picks it automatically for a one-minute clip.
- Send as a file if the details matter. Inline playback is convenient; a file attachment avoids the extra playback transcode.
- Batch it.
npx halfsize clip1.mp4 clip2.mp4 --for discordhandles several files in one run.
FAQ
What is Discord's free upload limit?
20 MB per file. Nitro tiers raise it, but the free limit is what halfsize targets with --for discord.
Does this upload my video to a server?
No. It runs FFmpeg locally. The only network access is the one-time FFmpeg download during installation.
Why is the output 19.45 MB instead of exactly 20 MB?
It aims a little under the cap so container overhead and bitrate variance cannot push you over. You can override the target with --to 20mb.
Can I make it smaller than 20 MB?
Yes: --to 10mb or --to 8mb. The report will tell you whether the result still looks acceptable.
It says "visible loss". What now?
Trim the clip, accept 720p, or switch to --codec h265 if your audience can play it. The tool is telling you the truth instead of hiding it.