What is an SRT File?

An SRT file is a plain-text subtitle format containing sequentially numbered cues. Each cue provides a start time, an end time, and caption text, with blank lines separating entries.

How SRT Files work

SubRip subtitle data is organized as cue blocks: a counter line, a timing line in the form hours:minutes:seconds,milliseconds --> hours:minutes:seconds,milliseconds, one or more lines of text, and a blank line. The format comes from the SubRip subtitle-ripping program and has no formal specification, so in practice it is defined by what parsers accept. It carries timing and text but no layout model that players implement uniformly; many players accept informal styling such as HTML-like bold, italic, underline, and color tags, which can make the same file render differently across applications. SRT commonly appears as a sidecar during caption exchange, localization, quality review, and packaging into a streaming container.

Key facts

  1. Canonical SRT timing looks like 00:00:00,498 --> 00:00:02,827: a comma before the milliseconds and an arrow made of two hyphens and a greater-than sign. Parsers differ in tolerance. FFmpeg’s SRT demuxer (checked in release 8.0) accepts a comma or a period and does not check counter values or their order, although a counter line must start with a number. A stricter parser may accept less, so write the canonical form.
  2. Browsers do not load SRT as a text track: MDN documents the track element’s files as WebVTT. Converting is more than renaming the file. A WebVTT file must begin with the string WEBVTT, uses a period before the milliseconds, and must be encoded as UTF-8.
  3. SRT has no character encoding standard and no place to declare one, as the Library of Congress notes, so a reader has to be told or has to guess. Deliver UTF-8: Matroska stores SRT text as UTF-8 and WebVTT requires it. For legacy files, convert from the known source encoding; FFmpeg’s sub_charenc option exists to state the input subtitle encoding. If the encoding is unknown, ask the sender; a detected encoding is a guess, so check accented and non-Latin text after converting.
  4. Treat styling and positioning as non-portable. The Library of Congress describes the HTML-derived bold, italic, underline, and color tags as dependent on the reader. FFmpeg parses optional X1, X2, Y1, Y2 coordinates on the timing line, but its decoder rescales them assuming a 720×480 frame, and Matroska keeps only a cue’s text and timing when SRT is muxed in.

When SRT Files matter

Use SRT to exchange captions or translations with players, editors, and platforms that accept it, and convert to WebVTT for HTML video, where the track element loads WebVTT files. A malformed timing line, a missing blank line between cues, or the wrong text encoding can make captions disappear, run together, or show garbled characters.

How Transloadit helps with SRT Files

Transloadit’s /video/subtitle Robot accepts SRT and VTT subtitle files and either adds them to a video as a separate, switchable stream or burns them into the picture, and the /speech/transcribe Robot can output its transcription as an srt or webvtt file.

The Robot documentation does not say how SRT styling tags or non-UTF-8 files are handled, and it marks its text color, border color, bold, and italic parameters as applying only to burned subtitles. Test representative styled and non-UTF-8 files in the mode you plan to use.

Explore Transloadit’s file formats & compression capabilities

Sources

Turn media knowledge into a working pipeline

Connect uploads, processing, AI, storage, and delivery through one declarative API — with the encoding stack, scaling, and format churn handled for you.

Try Transloadit for free