{
  "schemaVersion": 1,
  "contentVersion": "ca42e61ede0a24f789d7287a0001244ad22f4abf",
  "id": "docs/tools/utilities/discord",
  "collection": "docs",
  "title": "Discord",
  "description": "How to encode video that uploads and plays inline on Discord, including the current upload limits and a two-pass command for hitting a target size.",
  "canonicalUrl": "https://encode.wiki/tools/utilities/discord/",
  "apiUrl": "https://encode.wiki/api/v1/documents/docs/tools/utilities/discord.json",
  "markdownUrl": "https://encode.wiki/api/v1/markdown/docs/tools/utilities/discord.md",
  "status": "current",
  "tags": [
    "migrated"
  ],
  "license": "CC BY-SA 4.0",
  "dates": {
    "lastVerified": "2026-10-08T00:00:00.000Z"
  },
  "authors": [],
  "sources": [
    {
      "title": "Discord File Attachments FAQ",
      "url": "https://support.discord.com/hc/en-us/articles/25444343291031-File-Attachments-FAQ",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    },
    {
      "title": "Discord Server Boosting FAQ",
      "url": "https://support.discord.com/hc/en-us/articles/360028038352-Server-Boosting-FAQ",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    },
    {
      "title": "FFmpeg documentation (two-pass, -movflags, -tag)",
      "url": "https://ffmpeg.org/ffmpeg.html",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    }
  ],
  "provenance": {
    "originUrl": "https://github.com/av1-community-contributors/codec-wiki/blob/37c3317fd058b23c71a87679bed5619a98f77752/docs/utilities/Discord.mdx",
    "originCommit": "37c3317fd058b23c71a87679bed5619a98f77752",
    "migratedAt": "2026-08-21T00:00:00.000Z",
    "modified": true,
    "originPath": "docs/utilities/Discord.mdx"
  },
  "headings": [
    {
      "depth": 2,
      "text": "Upload limits",
      "anchor": "upload-limits"
    },
    {
      "depth": 2,
      "text": "Which format to use",
      "anchor": "which-format-to-use"
    },
    {
      "depth": 2,
      "text": "Hit a target size",
      "anchor": "hit-a-target-size"
    }
  ],
  "sections": [
    {
      "id": "_preamble",
      "title": "Page introduction",
      "depth": 0,
      "canonicalUrl": "https://encode.wiki/tools/utilities/discord/",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/tools/utilities/discord/_preamble.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/tools/utilities/discord/_preamble.md",
      "checksum": "b3bf726f7b3c97180069a7a40854c443f8647313da33fbd0dcb5a6873dcfad36",
      "bytes": 174
    },
    {
      "id": "upload-limits",
      "title": "Upload limits",
      "depth": 2,
      "anchor": "upload-limits",
      "canonicalUrl": "https://encode.wiki/tools/utilities/discord/#upload-limits",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/tools/utilities/discord/upload-limits.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/tools/utilities/discord/upload-limits.md",
      "checksum": "07a680f282edb02e5665a50d58ee80541cc7ae68d0eed291f6f2734c95709597",
      "bytes": 751
    },
    {
      "id": "which-format-to-use",
      "title": "Which format to use",
      "depth": 2,
      "anchor": "which-format-to-use",
      "canonicalUrl": "https://encode.wiki/tools/utilities/discord/#which-format-to-use",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/tools/utilities/discord/which-format-to-use.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/tools/utilities/discord/which-format-to-use.md",
      "checksum": "d4027e208886604a4fab9fff3f02d3326b20ab7852315ad6cb7562da28558af4",
      "bytes": 812
    },
    {
      "id": "hit-a-target-size",
      "title": "Hit a target size",
      "depth": 2,
      "anchor": "hit-a-target-size",
      "canonicalUrl": "https://encode.wiki/tools/utilities/discord/#hit-a-target-size",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/tools/utilities/discord/hit-a-target-size.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/tools/utilities/discord/hit-a-target-size.md",
      "checksum": "1e536f26726d820e752ca00e4cfcb6e85b761e427613d9e4483baa64a7bc90a4",
      "bytes": 1190
    }
  ],
  "outboundReferences": [
    "/guides/preserve-color-and-hdr/",
    "/tools/utilities/autocompressor/",
    "https://support.discord.com/hc/en-us/articles/25444343291031-File-Attachments-FAQ"
  ],
  "checksum": "3e1a148dc79a319b2fae60bd051e27587efad15b18a502ff1969616ca7c51032",
  "contentFormat": "markdown",
  "markdown": "Discord plays uploaded videos inline using each viewer's own app or browser, so a video has to fit the upload limit **and** use a format every recipient's client can decode.\n\n## Upload limits\n\nFrom Discord's [File Attachments FAQ](https://support.discord.com/hc/en-us/articles/25444343291031-File-Attachments-FAQ):\n\n| Account                   | Limit                      |\n| ------------------------- | -------------------------- |\n| Free                      | 20 MB (raised from 10 MB in August 2026) |\n| Nitro Basic               | 50 MB                      |\n| Nitro                     | Up to 1 GB                 |\n\nBoosted servers raise the limit for everyone in them (50 MB at level 2, 100 MB at level 3), and Discord is experimenting with larger limits, so check what your client shows. The limit applies to the file as you select it: the mobile apps now check the size before compressing, as desktop always has.\n\n## Which format to use\n\nDiscord's FAQ lists MP4 with H.264, HEVC or AV1 for video.\n\n- **H.264 + AAC in MP4** plays on every client. Use it when you do not know who will watch.\n- **AV1** looks much better at the same small size, which matters at 20 MB. Older iPhones and iPads, which only decode AV1 in hardware, may not play it.\n- **HEVC** plays only where the viewer's device and browser have HEVC support, which often means hardware decoding; avoid it for general sharing. If you do use it, add `-tag:v hvc1` so Apple devices recognise the stream.\n\nUse 8-bit 4:2:0 (`-pix_fmt yuv420p`) for H.264; browsers and phones generally cannot decode 10-bit or 4:4:4 H.264. Convert HDR sources to SDR first unless you know your viewers have HDR displays (see [Preserve colour and HDR](/guides/preserve-color-and-hdr/)).\n\n## Hit a target size\n\nWork out the bitrate the file can afford:\n\n```text\ntotal kbit/s = size in MB × 8000 ÷ duration in seconds\nvideo kbit/s = total − audio bitrate − a few percent for overhead\n```\n\nFor a 60-second clip under 20 MB: 20 × 8000 ÷ 60 ≈ 2,666 kbit/s in total, so about 2,450 kbit/s for video with 128 kbit/s audio. Two-pass encoding lands close to the target:\n\n```sh\nffmpeg -i input.mkv -c:v libx264 -preset slow -b:v 2450k -pix_fmt yuv420p -pass 1 -an -f null -\nffmpeg -i input.mkv -c:v libx264 -preset slow -b:v 2450k -pix_fmt yuv420p -pass 2 -c:a aac -b:a 128k -movflags +faststart output.mp4\n```\n\nBoth passes need the same video options. `-movflags +faststart` puts the MP4 index at the front so playback can start before the whole file has loaded. If the bitrate comes out very low for the resolution, downscale (for example `-vf scale=-2:720`) or trim the clip; a sharp 720p video looks better than a blocky 1080p one.\n\nCRF modes cannot promise a size. Single-pass bitrate modes, such as SVT-AV1's, can overshoot by several percent, so leave more margin. [Autocompressor](/tools/utilities/autocompressor/) does this calculation for you if you would rather not.\n"
}
