halfsize / WhatsApp
Send a video on WhatsApp without the 16 MB problem
WhatsApp allows 16 MB for videos sent as media. Send a bigger file and it either refuses it or crushes it. halfsize gets the file under the limit first, then measures what the compression actually cost.
Step by step
- Install Node.js 18+.
- Open a terminal where the video is.
- Run
npx halfsize clip.mp4 --for whatsapp. The--forflag sets 16 MB for you. - Send the generated
clip.16mb.mp4from WhatsApp as a video.
$ npx halfsize clip.mp4 --for whatsapp
halfsize 0.1.5
clip.mp4
136 MB 60s 1920x1080 30.00 fps h264
target 16.0 MB (whatsapp)
plan H.264 960x540 1.94 Mbps audio 128 kbps 2-pass
output clip.16mb.mp4
measuring quality done in 8s
136 MB → 15.59 MB 8.7x smaller 2.6% under target
VMAF 84.8 SSIM 0.968 slight softening
Why your WhatsApp videos look worse than the original
WhatsApp compresses every video you send as media. That is fine for a five-second joke and painful for anything with detail: text, faces in low light, landscape footage. Starting from a file that is already at 16 MB gives its encoder less work to do, so the version your family receives is closer to what you shot.
If the recipient needs the exact original, send the video as a document instead of media. It keeps the file intact, but it loses inline playback. For everything else, fitting under 16 MB is the practical option.
What 16 MB buys you
| Target | Resolution chosen | Video bitrate | VMAF | Verdict |
|---|---|---|---|---|
| 20 MB | 1280×720 | 2.46 Mbps | 88.3 | slight softening |
| 16 MB | 960×540 | 1.94 Mbps | 84.8 | slight softening |
| 10 MB | 960×540 | 1.17 Mbps | 82.9 | slight softening |
Measured on a 60 s 1920×1080 30 fps source at 18 Mbps. Shorter clips do better at the same limit because the bitrate budget is spread over fewer seconds.
Long video, small cap. A 10-minute clip at 16 MB is roughly 200 kbps of video. No encoder can make that look sharp. Cut it into shorter messages, or send it as a document. The VMAF report will tell you when you have crossed that line.
Practical tips
- Trim before compressing. Every removed second is bits returned to the rest of the clip.
- Use H.264. It is the default, and it is the format WhatsApp handles most predictably.
- Do not chase exact bytes. The tool lands 1–3% under the cap on purpose; a file at 15.9 MB is safer than one at 16.01 MB.
- Batch similar clips.
npx halfsize a.mp4 b.mp4 --for whatsapp.
FAQ
What is WhatsApp's video size limit?
16 MB for videos sent as media. Documents can be much larger, but they do not play inline.
Does halfsize upload my video?
No. FFmpeg runs locally. Your file stays on your device; there is no account and no server.
Can I target a different size?
Yes: --to 10mb, --to 16mb, or any value you type. --for whatsapp is only a shortcut.
Will WhatsApp compress it again?
If you send it as a video, yes, lightly. That is unavoidable. Starting under the cap means its second pass has far less work to do.
Does it work on a phone?
The CLI needs a computer. The optional local web app also runs on a computer and is reachable from a phone on the same network if you choose to expose it.