FFmpeg Cookbook
JA

Discord Video Compressor

Compress a video toward an MB target you set. The settings are worked out from the duration, and you can check the actual size, play the result and save a report.

Your file is not uploaded
Choose a video MP4 / MOV / MKV / WebM / AVI, up to 500 MB

1 MB = 1,000,000 bytes. The presets are common sizes; check the official help of each service for its limit. Entering a shorter duration does not trim the video.

Equivalent FFmpeg command

CLI command for your current settings. Updates live as you change controls.

Pick a file and adjust settings — the command appears here.

Before sharing

Discord's official help gives upload limits of 20 MB without Nitro, 50 MB with Nitro Basic and 500 MB with Nitro. The 20 MB default is the limit without Nitro. Discord checks the size of the file before any compression, so the file itself has to fit.

Discord help: File Attachments FAQ (Checked 2026-09-25)

Trim unneeded footage first. Connection, permissions and playback format can also prevent sharing.

The calculation budgets 95% of the target for video and audio. An oversized output is retried once and any remaining excess is reported.

Re-encoding changes quality. Check small text, motion and audio, and keep the original. Automatic tag and chapter copying is disabled, but this does not conceal personal information in the picture or sound.

Measured comparison: file size and quality from the same clip

What changes when you compress a video?

One 10-second clip compressed with three settings. The pictures show part of the frame at 2x.

Source 23.28 MB → 0.73 MB, encoded in 1.1 s
ffmpeg -i input.mp4 -map 0:v:0 -map 0:a:0? -c:v libx264 -crf 36 -preset fast -pix_fmt yuv420p -c:a aac -b:a 96k -movflags +faststart output.mp4
Part of the original frame (a printed T-shirt and a jacket) at 2x The same part after compression at the selected setting Original Compressed
How this was measured

2026-09-24, FFmpeg 8.1 on Windows (H.264, fast preset), one run per setting on a 10-second 1080p live-action clip. The pictures are a 480x270 native-resolution crop at 3 seconds, shown at 2x.

Measurements (JSON)Source film

Tears of Steel (CC) Blender Foundation | mango.blender.org, CC BY 3.0. Cropped from the 4K version and scaled to 1080p; part of each encoded frame at 2x

Popular uses
Discord free and Nitro size targetsGame clip sharing20MB/50MB long-clip tuning

How to use

  1. Check the limitDiscord's official help (File Attachments FAQ) gives 20 MB without Nitro, 50 MB with Nitro Basic and 500 MB with Nitro. The default is 20 MB, the limit without Nitro; change the target for other plans.
  2. Choose the file and settingsCheck the detected duration, then set the target, resolution and audio.
  3. Inspect the resultCheck the size, small text, motion and sound before you download and share.

Recommended settings

Sharing small text
Original resolution; trim unnecessary time
Check in the preview that the text is readable. Cutting the video shorter can work better than shrinking the picture.
A short clip with a size cap
The cap itself as the target (20 MB without Nitro)
95% of the target goes to video and audio, and the output bytes are checked against the target. If the file is over, it is encoded once more.

When it goes wrong

Output exceeds target

Cause: Bitrate swings, container overhead, or a wrong duration.

Fix: Check the duration. If it is still over after the one retry, trim the video or change the target.

Within target but cannot send

Cause: It could be a destination limit, permissions, the network, or a service problem.

Fix: Read the Discord error and test whether another small file has the same problem.

Questions

Is the selected size guaranteed?

No. The output can still be over the target after one retry. The result is judged by the actual output bytes.

Will it finish on a phone?

That depends on memory, the video and the browser. A file under the 500 MB input limit can still fail. Try a short video first.

What is in the report?

Input and output bytes, the duration used, the target size, the commands, exit codes and elapsed time. It does not check quality or whether Discord accepts the upload.

Does this also fix variable frame rate?

No. There is no setting to make the frame rate constant (CFR). Check variable frame rate (VFR) or sync problems with the dedicated tools.

More detail (settings, limits, FFmpeg commands)

What each setting means

Target MB and duration
1 MB = 1,000,000 bytes. The duration is only used for the calculation; it does not trim the video.
Match bitrate
Caps the short side at 480 when the video bitrate is below 400 kbps, at 720 below 1200 kbps, and at 1080 otherwise. Never upscales.
Video bitrate cap
When the clip is short for the target, the video bitrate is held at the cap for the output size (4000 kbps up to 480p, 7500 up to 720p, 12000 up to 1080p, and so on; YouTube's recommended upload bitrates), so the file comes out smaller than the target.
Audio
Kept audio is 128 kbps, or 64 kbps for videos over 300 seconds. A silent source stays silent.

Browsers and limits

  • Input up to 500 MB and 7200 seconds. Some devices fail with smaller files.
  • Output is MP4 (H.264, AAC). Proper HDR-to-SDR conversion, transparency and keeping every audio track are not supported.
  • Loading the page, ads and analytics use the network, but the selected video is not uploaded.

The same job with the FFmpeg command line

Bitrate example for 10 MB and 60 seconds
ffmpeg -i input.mp4 -map 0:v:0 -map 0:a:0? -c:v libx264 -b:v 1138k -maxrate 1252k -bufsize 2276k -preset fast -pix_fmt yuv420p -c:a aac -b:a 128k -movflags +faststart output.mp4
A calculation: floor(10,000,000 × 0.95 × 8 / 60 / 1000) = 1266, minus 128 kbps for audio. It is not a measured size. With "Match bitrate", the tool also caps the short side at 720 for this video bitrate (below 1200 kbps).

A budget is not a measurement

After encoding with the calculated settings, the tool checks the actual output bytes against the target. If the file is over, it encodes once more and records that command and result too. You can save the report (JSON) and use it when you choose settings next time.

Size does not measure quality. Check that subtitles and on-screen text are readable, and check fast motion and speech. A file that fits but cannot be read or heard has not done its job.

What to do next