{
  "schemaVersion": 1,
  "contentVersion": "ca42e61ede0a24f789d7287a0001244ad22f4abf",
  "id": "docs/codecs/subtitles/srt",
  "collection": "docs",
  "title": "SRT",
  "description": "SRT (SubRip) is the simplest and most widely supported subtitle format: numbered cues with start and end times and plain text, optionally with basic HTML-style tags.",
  "canonicalUrl": "https://encode.wiki/codecs/subtitles/srt/",
  "apiUrl": "https://encode.wiki/api/v1/documents/docs/codecs/subtitles/srt.json",
  "markdownUrl": "https://encode.wiki/api/v1/markdown/docs/codecs/subtitles/srt.md",
  "status": "current",
  "tags": [
    "migrated"
  ],
  "license": "CC BY-SA 4.0",
  "dates": {
    "lastVerified": "2026-10-08T00:00:00.000Z"
  },
  "authors": [],
  "sources": [
    {
      "title": "SubRip Subtitle format (Library of Congress)",
      "url": "https://www.loc.gov/preservation/digital/formats/fdd/fdd000569.shtml",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    },
    {
      "title": "Matroska codec mappings — S_TEXT/UTF8",
      "url": "https://www.matroska.org/technical/codec_specs.html",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    },
    {
      "title": "FFmpeg formats documentation — subtitle character encoding",
      "url": "https://ffmpeg.org/ffmpeg-formats.html#Format-Options",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    }
  ],
  "provenance": {
    "originUrl": "https://github.com/av1-community-contributors/codec-wiki/blob/37c3317fd058b23c71a87679bed5619a98f77752/docs/subtitles/SRT.mdx",
    "originCommit": "37c3317fd058b23c71a87679bed5619a98f77752",
    "migratedAt": "2026-08-21T00:00:00.000Z",
    "modified": true,
    "originPath": "docs/subtitles/SRT.mdx"
  },
  "headings": [
    {
      "depth": 2,
      "text": "Format",
      "anchor": "format"
    },
    {
      "depth": 2,
      "text": "Fix garbled characters",
      "anchor": "fix-garbled-characters"
    },
    {
      "depth": 2,
      "text": "Use SRT in containers",
      "anchor": "use-srt-in-containers"
    },
    {
      "depth": 2,
      "text": "Conversions",
      "anchor": "conversions"
    }
  ],
  "sections": [
    {
      "id": "_preamble",
      "title": "Page introduction",
      "depth": 0,
      "canonicalUrl": "https://encode.wiki/codecs/subtitles/srt/",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/codecs/subtitles/srt/_preamble.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/codecs/subtitles/srt/_preamble.md",
      "checksum": "3f5a32e90e519130e8087aa870c2c65c06e3f0306db3d69f2d3ef2fc8f8db815",
      "bytes": 300
    },
    {
      "id": "format",
      "title": "Format",
      "depth": 2,
      "anchor": "format",
      "canonicalUrl": "https://encode.wiki/codecs/subtitles/srt/#format",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/codecs/subtitles/srt/format.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/codecs/subtitles/srt/format.md",
      "checksum": "acad549ab661185e76b8fa45a728aa3f4b5c524bfdb6a148ea8d194768bce1bf",
      "bytes": 1338
    },
    {
      "id": "fix-garbled-characters",
      "title": "Fix garbled characters",
      "depth": 2,
      "anchor": "fix-garbled-characters",
      "canonicalUrl": "https://encode.wiki/codecs/subtitles/srt/#fix-garbled-characters",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/codecs/subtitles/srt/fix-garbled-characters.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/codecs/subtitles/srt/fix-garbled-characters.md",
      "checksum": "51438e6d94aaff90bf4c61d2be9bbddc73d85c5fda5c77abee63fd93a3e333a1",
      "bytes": 453
    },
    {
      "id": "use-srt-in-containers",
      "title": "Use SRT in containers",
      "depth": 2,
      "anchor": "use-srt-in-containers",
      "canonicalUrl": "https://encode.wiki/codecs/subtitles/srt/#use-srt-in-containers",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/codecs/subtitles/srt/use-srt-in-containers.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/codecs/subtitles/srt/use-srt-in-containers.md",
      "checksum": "58f62c10ddcf4efd2a46f996b5890d2fd660342972a21aa64aec71070cfaa9c7",
      "bytes": 599
    },
    {
      "id": "conversions",
      "title": "Conversions",
      "depth": 2,
      "anchor": "conversions",
      "canonicalUrl": "https://encode.wiki/codecs/subtitles/srt/#conversions",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/codecs/subtitles/srt/conversions.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/codecs/subtitles/srt/conversions.md",
      "checksum": "23e40be2622b609af6c9b103c556733c482d85c6555caea414207364d9a3c1d4",
      "bytes": 389
    }
  ],
  "outboundReferences": [
    "/codecs/subtitles/",
    "/codecs/subtitles/ssa/",
    "/codecs/subtitles/webvtt/",
    "/containers/webm/"
  ],
  "checksum": "4d08038a6add4bfc41fa8d79f9acc701b54a812295d0c252b412c425f182342b",
  "contentFormat": "markdown",
  "markdown": "SubRip (`.srt`) is the lowest common denominator of subtitle formats: plain text with timestamps. Almost every player, editor and platform reads it, so it is the format of choice for sharing dialogue-only subtitles. It has no formal specification; behaviour beyond the basics varies between players.\n\n## Format\n\nA file is a list of cues separated by blank lines. Each cue is a counter, a time range, and one or more lines of text:\n\n```text\n1\n00:00:01,000 --> 00:00:03,500\nThe test begins here.\n\n2\n00:00:04,000 --> 00:00:07,000\n<i>[A steady tone sounds]</i>\nCheck the picture and the sound together.\n```\n\nTimestamps are `HH:MM:SS,mmm` with a **comma** before the milliseconds (WebVTT uses a period). Save as UTF-8, which is what modern tools write and expect.\n\nBasic HTML-style tags are widely accepted: `<i>`, `<b>`, `<u>`, and `<font color=\"#ffff00\">`. Players that do not understand a tag print it literally. Positioning (`{\\an8}` for top-centre) is an ASS override that mpv, VLC and most desktop players honour inside SRT; players that do not know it show it as text. There is no way to set fonts, outlines or animation, so use [ASS](/codecs/subtitles/ssa/) for typesetting and [WebVTT](/codecs/subtitles/webvtt/) for web players.\n\nBecause SRT times are in seconds, not frames, it is independent of the video's frame rate. Fixing a constant offset is a one-liner; the delay is applied by FFmpeg as an input timestamp offset:\n\n```sh\nffmpeg -itsoffset 2 -i subs.srt -c copy delayed.srt\n```\n\nFor a drifting subtitle (a different cut or frame rate), use an editor such as Subtitle Edit or Aegisub, or an automatic aligner like `ffsubsync`.\n\n## Fix garbled characters\n\nIf accents or non-Latin letters show as `Ã©` or `?`, the file is in a legacy encoding. Find out which (`file -i subs.srt` guesses; the language usually tells you: CP1252 for Western European, CP1251 for Russian, CP1250 for Central European), then convert:\n\n```sh\nffmpeg -sub_charenc CP1252 -i legacy.srt utf8.srt\niconv -f CP1252 -t UTF-8 legacy.srt > utf8.srt\n```\n\n`-sub_charenc` is an input option, so it goes before `-i`.\n\n## Use SRT in containers\n\n```sh\nffmpeg -i video.mkv -i subs.srt -map 0 -map 1 -c copy -metadata:s:s:0 language=eng output.mkv\nmkvmerge -o output.mkv video.mkv --language 0:eng subs.srt\nffmpeg -i video.mkv -i subs.srt -map 0 -map 1 -c copy -c:s mov_text output.mp4\n```\n\nIn Matroska SRT is stored as `S_TEXT/UTF8` and round-trips cleanly. MP4 stores it as `mov_text`, which keeps basic italics, bold and underline but not much else. [WebM](/containers/webm/) takes only WebVTT, so convert first: `ffmpeg -i subs.srt subs.vtt`.\n\nExtract a track back out with `ffmpeg -i input.mkv -map 0:s:0 subs.srt`.\n\n## Conversions\n\nSRT to ASS or WebVTT keeps everything SRT has: text, italics and bold carry over. Going the other way, from a styled ASS file, loses everything ASS does and leaves FFmpeg's leftovers (`<font size=\"…\">` wrappers, stray `{\\an8}`); expect to clean up by hand. See the [subtitle formats overview](/codecs/subtitles/) for the rest, including how to burn SRT into the picture.\n"
}
