How to compress a video for Discord, and when a link is the better idea

Get a clip under Discord's 20 MB limit with HandBrake or ffmpeg, with a bitrate table for common lengths. Plus the point where compressing stops making sense.

Gaming squad match-replay.mp4 1.4 GB File too large Match replay vidlify.to/v/Xk29aQmP7d

Free Discord accounts can upload files up to 20 MB (details). For a short clip you can usually get there by compressing the video. For anything longer, the picture falls apart, and a link is the better choice. Here is how to do both.

The one number that matters: bitrate

The size of a video is roughly its bitrate multiplied by its length. So if you know how long your clip is, you can work out the bitrate that fits:

total bitrate in kbit/s = target size in MB × 8000 ÷ length in seconds

Aim for 19 MB instead of 20 MB, so small differences don't push you over the limit. Subtract the audio, usually 128 kbit/s, and you have the video bitrate. The video file size calculator does the math for you.

Clip lengthVideo bitrate for about 19 MBResolution that still looks good
15 secondsabout 10,000 kbit/s1080p, even at 60 fps
30 secondsabout 4,900 kbit/s1080p
1 minuteabout 2,400 kbit/s720p
2 minutesabout 1,100 kbit/s480p to 720p, fast scenes get blocky
5 minutesabout 380 kbit/snot really watchable

Game recordings with lots of movement need more bitrate than a calm phone video. If your clip has fast action or small text, lower the resolution before you lower the quality further.

The quick way: in your browser

The free video compressor on Vidlify does the math and the encoding for you. Choose 20 MB, pick the video and download the smaller MP4 a few minutes later. You do not need an account, and the tool tells you when a clip is too long for the size you picked.

Compress with HandBrake

HandBrake is free for Windows, Mac and Linux.

  1. Open your video in HandBrake.
  2. Summary tab: set the format to MP4.
  3. Dimensions tab: set the resolution from the table above, for example 1280 x 720 for a one minute clip.
  4. Video tab: choose the H.264 (x264) encoder, select Avg Bitrate (kbps) instead of Constant Quality and enter the video bitrate from the table. Tick Multi-Pass Encoding for better quality at the same size.
  5. Audio tab: set the bitrate to 128 or 96.
  6. Click Start Encode and check the size of the result.

If it is still a little too big, lower the video bitrate by 10 percent and encode again.

Compress with ffmpeg

If you have ffmpeg installed, this does the same for a one minute clip in 720p, in two passes. On Windows, replace /dev/null with NUL.

`` ffmpeg -y -i clip.mp4 -vf scale=-2:720 -c:v libx264 -b:v 2400k -pass 1 -an -f mp4 /dev/null ffmpeg -i clip.mp4 -vf scale=-2:720 -c:v libx264 -b:v 2400k -pass 2 -c:a aac -b:a 128k clip-discord.mp4 ``

When to stop compressing

Compressing works well for clips up to about a minute. Beyond that you pay with quality: details smear, dark scenes turn into blocks, and text in game recordings becomes unreadable. Cutting the video into several 20 MB parts is no fun to watch either.

At that point, upload the video once and post a link instead:

  1. Upload the original to Vidlify. Free accounts take files up to 5 GB and come with 30 GB of storage.
  2. Copy the link and paste it into the Discord channel.
  3. Everyone watches in full quality, from 360p up to 4K if your clip is 4K, and the player adjusts to each person's connection.

You don't lose any quality, and you don't spend time encoding. Uploads are link only, so nobody finds the clip unless they have the link. More ways to send big videos to chats: Video too big for WhatsApp or Discord?

Sources: Discord File Attachments FAQ, HandBrake documentation: Constant Quality vs Average Bit Rate

Share this article

Keep reading