Video · 09
Video compressor
Pick a size budget. The page sets a video bitrate from the duration, scales the frame down when the budget is small, and re-encodes with x264.
How to use it
Discord’s common caps are 10 MB and 25 MB, and those are presets. Custom takes a number in megabytes. The bitrate is the budget minus 64 kbps of AAC, spread across the duration, with a floor so a tiny clip does not collapse into a slideshow.
Under about 500 kbps the width is capped at 640. Between that and 1500 kbps the cap is 1280. Above that it stays at 1920 if the source is larger. The encoder is libx264 ultrafast, yuv420p, so a phone can finish the job.
The result aims at the size. Keyframes and the audio track still take space, so a file can land a little over or well under. A clip that is already smaller than the target will not be padded up.
Tips
- Trim first. A 10 MB budget on 8 seconds looks fine. The same budget on 3 minutes does not.
- If the preview is soft, raise the target or shorten the clip. You cannot have both a long runtime and a sharp 10 MB file.
- Keep the master. This export is for sending, not for the archive.
FAQ
Will it hit the limit exactly?
It targets the bitrate that should land near the limit. The last byte is not guaranteed. Check the file size in the status line before you send it.
Why ultrafast?
A slower x264 preset in WASM on a laptop is a long wait for a chat attachment. Ultrafast finishes. Quality follows the bitrate you allowed.
Is the video uploaded to compress it?
No. ffmpeg.wasm runs in the tab.
License
Encoding uses the single-thread ffmpeg.wasm build shipped with Cutshed. The JavaScript wrapper (@ffmpeg/ffmpeg and @ffmpeg/util) is MIT. The core binary is GPL-2.0-or-later because the build enables GPL components, including libx264, libmp3lame, libvorbis, and native AAC and FLAC. That license covers the encoder, not your recording.