smallcord

Fit a video under Discord's limit

Drop one clip or several — where your browser can encode, smallcord compresses them on your device (H.264/MP4 or VP9/WebM, audio budget yours to set); otherwise it computes the exact bitrate that fits and gives you the ffmpeg command.

Your Discord tier Which one?

Compress in your browser experimental

New: actually shrink an H.264 MP4 — video and its audio track — to fit your Discord limit right here, one file or a queue of several. The whole encode runs on your device with WebCodecs: no upload, no ffmpeg install. Output is H.264/MP4 by default, or VP9/WebM when the live probe finds your browser can encode it. It is brand new; if your browser or your file isn’t supported it says so plainly and the command planner below still gets the job done.

Keeps your audio. The soundtrack is decoded and re-encoded (to AAC, or Opus where that’s what your browser can do) and muxed back in sync — the budget reserves audio bitrate first, then fits the video into what’s left. It re-encodes H.264 (AVC) video — any MP4-family container, so .mp4, .m4v and .mov all work; a VP9, AV1 or HEVC track falls back to the planner. If your browser can’t encode audio, the result is video-only and the verdict says so — then use the command below to keep sound. Output is a real byte size you can check, not a promise.

Target: Free — 10 MB (set your tier at the top of this page)

Audio budget The byte limit is shared: every kbps the soundtrack takes is one the picture can’t have. Spend less on sound and smallcord hands the difference straight to the video bitrate.

Pick a tier and drop a clip — this line shows the video bitrate each audio choice buys you.

Output codec (H.264/MP4 is the safe default)

Your browser’s VP9 encode support is checked live when this page loads — the VP9 option unlocks only if the check passes. Nothing is uploaded either way.

Encode only a segment (optional) The surest way to fit a long clip: encode just the part you want — only that range is re-encoded. Accepts H:MM:SS, M:SS, or seconds.

Leave both blank to encode the whole clip. Set a start and end to encode just that span; the estimate below updates once your clip’s length is read on this device.

Everything runs in your browser — your files never leave your device.

Honest heads-up: in-browser compression is real and now keeps your audio, but it is still experimental (the panel above) — it re-encodes H.264 (AVC) video with WebCodecs, re-encodes the audio to AAC or Opus, and muxes them back in sync. It is not general video transcoding: it re-encodes H.264 (AVC) video only — the container it arrives in does not matter, so .mp4, .m4v and .mov all work, while a VP9, AV1 or HEVC track is turned away with its codec named. And on a browser without a WebCodecs H.264 encoder it can’t run at all, while a browser that can encode video but not audio produces a video-only file (it tells you so). This planner is the reliable, universal path — it computes the exact bitrate and hands you a one-line ffmpeg command that keeps audio and works on any file. (We do not ship the ffmpeg-WebAssembly transcoders: every ready-made build is GPL / non-redistributable, which doesn’t fit this project.) Need to shrink a single image instead? The image tool works fully in your browser today. And if what you actually have is an animated GIF, don’t plan it as a video here: the GIF page re-encodes it to a silent MP4 that Discord autoplays inline exactly like a GIF, typically 5–20× smaller than the original file.

Video fit planner

Your Discord tier is set at the top of this page — the planner below and the in-browser tool share it.

No file handy? Type the clip’s length — same planner, nothing is read from any file.
Trim to a clip (optional) Keep only part of the recording — accepts H:MM:SS, M:SS, or plain seconds (e.g. 1:30 or 90).

Optional. Accepts H:MM:SS, M:SS, or plain seconds (e.g. 1:30 or 90). Leave blank to encode the whole clip.

Drop a video above or click to choose one. It is read on your own device to measure its size and length — nothing is uploaded.
Get ffmpeg — install it on Windows, macOS, or Linux

Windows: if winget is available (it is on most current Windows 10/11 systems), open a terminal — PowerShell or Command Prompt — and run winget install ffmpeg. Otherwise download a Windows build linked from the official ffmpeg.org downloads page, unzip it, and add its bin folder to your PATH — then open a new terminal so the change takes effect.

macOS: with Homebrew installed, run brew install ffmpeg in Terminal. No Homebrew? The ffmpeg.org downloads page links macOS builds too.

Linux: use your distro's package manager — sudo apt install ffmpeg on Debian/Ubuntu, sudo dnf install ffmpeg on Fedora. Honest note: some distros ship the full ffmpeg from a third-party repo (Fedora's full build comes from RPM Fusion, for example), so the one-liner may need that repo enabled first — your distro's docs will say.

Check it worked: run ffmpeg -version. If it prints a version banner, you're set — come back and copy the command the planner gives you above. Prefer an app with buttons instead of a terminal? See the HandBrake tip in the questions below.

Everything runs in your browser — your files never leave your device.

How the planner works

1

Pick your tier

10 MB (free), 50 MB (Nitro Basic), or 500 MB (Nitro) — match the account you'll upload from.

2

Drop your video

Your browser reads the file's size and length locally — no upload — and works out the target bitrate to fit.

3

Run the command

Copy the ready-made ffmpeg line (or use the HandBrake tip) to transcode on your machine, then upload.

Why a bitrate, not a magic button

Video size is almost entirely bitrate × duration. To land a clip under a hard cap, you pick a total bitrate so that bitrate × seconds ≈ target bytes, split between video and audio, with a little headroom for the container's own overhead. smallcord does exactly that math (the same planner that's unit-tested in this repo): it reserves 128 kbps for audio, keeps ~3% headroom for MP4 mux overhead, and reports the video bitrate that should land under your limit. If even the lowest watchable bitrate can't fit the clip's length into the cap, it says so plainly and suggests trimming, lowering resolution, or a bigger tier — instead of handing you a number that won't work.

Size target vs. quality target (CRF). The command above aims for a byte size: it picks a video bitrate so that bitrate × duration lands under your cap. Below it the result also offers a second, quality-target command built on x264's CRF (Constant Rate Factor) — -crf 23 by default. CRF holds a constant visual quality and lets the bitrate float scene by scene, so a still talk-show shot spends few bits and a busy pan spends more; that usually looks better per byte than a fixed bitrate. The honest catch: CRF does not target a file size. A lower CRF (say 18) means higher quality and a bigger file; a higher CRF (say 28) means a smaller, softer one — but neither promises a specific size, so the output can land over or under your limit. Reach for CRF when quality matters more than hitting an exact cap, and always check the finished file's size before you upload it.

Honest limits: this is a planning estimate, not a byte-exact promise. Real encoders hit a target average bitrate with tolerance, and how well a given clip compresses depends on its motion and detail — a static screen-share shrinks far more cleanly than fast gameplay. If a first pass lands slightly over, drop the video bitrate about 5% and re-run. The command uses H.264 (libx264) in an MP4, which Discord previews inline on every platform — unless you pick VP9/WebM in the compressor panel above, in which case the planner mirrors that choice: the command switches to -c:v libvpx-vp9 with Opus audio and a .webm output. VP9 typically fits the same visual quality into roughly 20–40% fewer bits than H.264, so the same byte cap buys a better-looking clip — the honest trade-off is that WebM inline playback varies by Discord client, so H.264/MP4 stays the default.

Tight fit? Use two-pass. The result block has a two-pass encode checkbox (single pass is the default). Two-pass runs ffmpeg twice with identical bitrate numbers: pass 1 analyzes the whole clip and writes only a stats log — its output goes to the null device (/dev/null on macOS/Linux, NUL on Windows — don't mix them up, the POSIX line pasted into Command Prompt creates a junk file literally named /dev/null) — then pass 2 encodes using that analysis. Because the encoder already knows where the hard-to-compress moments are, the average bitrate lands notably closer to the target: useful when your clip is only a little over the cap. The cost is roughly double the encode time, and even two-pass does not guarantee a byte-exact size — no encoder can. Pass 1 also leaves a small ffmpeg2pass-0.log file you can delete afterwards.

Downscaling the resolution. The result block has a Downscale resolution dropdown (Keep original, 720p, 480p). Pick 720p or 480p and the planner adds -vf scale=-2:720 (or -2:480) to every command it emits — single-pass, both passes of a two-pass run, and the downloadable .sh and .bat. The height is fixed; the -2 means "compute a width that keeps the aspect ratio and is an even number", because H.264 requires both dimensions to be even — a plain -1 can land on an odd width and make the encode fail. Be honest with yourself about what this does: lowering the resolution does not shrink the file on its own. The byte budget is still bitrate × duration and does not change with resolution, so at the same bitrate a 480p file is the same size as a 1080p one. What it changes is quality per bit: a lower resolution looks acceptable at a lower bitrate, so if the planner's bitrate for your clip looks too low to watch, downscaling makes that low bitrate usable — the lever you actually pull to fit is then a smaller target or a lower bitrate. It never guarantees a fit by itself.

Audio budget (keep stereo / mono / low / none). The compression panel at the top of this page has one audio control with four settings, and the bitrate it saves is handed straight to the picture. The arithmetic is simple: a byte limit is bitrate × duration, so a 2-minute clip aimed at the 10 MB free tier has about 678 kbps of total media bitrate to spend once ~3% is set aside for container overhead. A 128 kbps stereo track eats roughly 19% of that and leaves the video 550 kbps. Drop to 96 kbps mono and the video gets 582 kbps; 64 kbps mono gives it 614 kbps; removing sound entirely gives it the whole 678 kbps — about 23% more video bitrate for exactly the same file size. The live line under the chips shows the real number for your clip and target, and states the delta versus keeping stereo. If sound is the whole file — a voice memo, a song, a recorded call with no picture to pay for — then there is nothing to split: fit an audio file spends the entire budget on bitrate × duration, which is why a 12-minute 128 kbps stereo MP3 overshoots the 10 MB free tier by only about a tenth and just has to come down to ~113 kbps to fit. Two honest limits. First, when the target is tight enough that even 128 kbps stereo would starve the video below the watchable floor, the planner has already squeezed audio down to its 32 kbps minimum — so mono and low mono buy you nothing extra there (they still upgrade 32 kbps stereo to 32 kbps mono, which sounds better), and the readout says “no gain” rather than pretending otherwise. Second, the ffmpeg command below mirrors your audio choice exactly — -b:a 96k -ac 1, or -an for silence — but its -b:v is not re-planned, because the command planner sizes video against a fixed 128 kbps audio reserve. There, a cheaper audio setting makes the file land a little under your target instead of sharper. Only the in-browser encoder actually re-spends the reclaimed bytes on the picture.

Encoder preset (speed vs. efficiency). The result block has an Encoder preset dropdown offering the standard x264 preset names this page can honestly emit — veryfast, faster, fast, medium (the default), slow, and slower. Whichever you pick is substituted into -preset <name> in every command it emits — single-pass, both passes of a two-pass run, the CRF alternative, and the downloadable .sh and .bat. The preset controls how hard the encoder works: a slower preset searches more and fits the same target bitrate a little cleaner (fewer artifacts), while a faster one finishes sooner and leaves a bit of quality on the table. Be honest with yourself about what it does: a preset trades encode time for how efficiently the encoder hits the target bitrate — slower means a smaller-looking, cleaner result at the same size but a longer encode. It does not change the size estimate this planner shows: the byte budget is bitrate × duration and -b:v is identical whatever preset you choose, so the file still targets the same size — only the time it takes and how good it looks at that size change. medium is x264's own default and stays smallcord's default, so leaving the dropdown alone gives you the exact same command as before. (x264 also has ultrafast and veryslow extremes, left off deliberately: they give up too much quality or time to be worth recommending for a Discord upload.)

Trim to just the part you want. The single most effective way to fit a long recording under a hard cap is to not encode the whole thing. The Trim to a clip box takes a start and an end — type them as H:MM:SS, M:SS, or plain seconds, so 1:30 and 90 both mean the 90-second mark. When you set a range, smallcord adds -ss <start> -t <seconds> to the command right after the input file (both are placed after -i, so ffmpeg seeks frame-accurately on the re-encode rather than snapping to the nearest keyframe), and — this is the important part — it re-plans the bitrate for the shorter clip. A 6-minute gameplay clip that needs an unwatchable ~180 kbps to fit 10 MB becomes a 40-second highlight that fits comfortably at a much healthier bitrate, because the byte budget is bitrate × duration and you just cut the duration. The number the planner shows and the -t value in the command are always the same figure (end − start). Honest rules: the output contains only that span, nothing before or after; the end must come after the start and stay within the clip's length, and if it doesn't smallcord tells you plainly instead of silently swapping or trimming the values for you. Leave both boxes blank (the default) and the command is byte-for-byte the whole-clip one.

Questions

Is my video uploaded anywhere?

No. This page reads the file's size and duration on your own device using the browser's built-in video decoder, and computes the bitrate locally. There is no server to receive it — you can confirm in your browser's Network tab that choosing a file makes zero requests. The actual transcode also runs on your machine, via the command we give you.

Can smallcord compress it in the browser, without ffmpeg?

For H.264 (AVC) video, yes — that's the experimental Compress in your browser panel at the top of this page. It uses your browser's own built-in WebCodecs encoder (no upload, no install) to re-encode the video — and its audio — down toward your Discord limit, muxed with permissively licensed (MIT/BSD) code we vendor. It's genuinely new and limited: it only re-encodes H.264 (AVC) video — the container makes no difference, so .mp4, .m4v and .mov all work, while a VP9, AV1 or HEVC track is turned away with its codec named. It needs a browser that exposes a WebCodecs H.264 encoder, and — because a browser encoder only tracks an average bitrate — the first pass can still land over your limit. When it does, it measures how many of those bytes were the audio track and the container, which don't shrink when the video bitrate drops, subtracts them and computes the video bitrate that fits the bytes that are left, rather than scaling the whole file size. It will do that at most twice; if it still can't fit, it tells you plainly and points you here to the command. If your browser can also encode VP9 (checked live when the page loads), the panel offers a VP9/WebM output option too — typically 20–40% smaller at the same quality, with the honest caveat that WebM inline playback varies by Discord client, which is why H.264/MP4 stays the default. What we deliberately do not ship is the general ffmpeg-compiled-to-WebAssembly transcoder: every ready-made build bundles GPL-licensed encoders (libx264/libx265) or is marked non-redistributable, which doesn't fit this project's licensing. So for any non-H.264 input, or any browser without WebCodecs, the planner plus a one-line local ffmpeg command is the reliable, universal path.

I don't have ffmpeg. What's the easiest way?

HandBrake (handbrake.fr) is a free, open-source app for Windows, macOS, and Linux with a normal window and buttons. Load your video, choose the MP4/H.264 preset, set the average video bitrate to the number smallcord shows, and export. If you're comfortable in a terminal, install ffmpeg — the Get ffmpeg section in the planner above has per-OS steps — and paste the command from the planner.

The result came out a little over the limit — now what?

That's normal: encoders aim for an average bitrate and overshoot slightly on busy footage. Lower the video bitrate by roughly 5% and re-encode, or trim a few seconds off the clip. Cutting the resolution to 720p or 480p also helps a lot, because fewer pixels need fewer bits to look sharp at the same bitrate.