Home / Blog / Other text utilities

Subtitle text formats

SRT Format: Subtitle Cues, Timing and Validation

Create a valid SRT subtitle example, check cue timing and encoding, diagnose playback problems, and understand the differences from WebVTT.

SRT Format: Subtitle Cues, Timing and Validation

An SRT file is a plain-text subtitle file organized into timed cues. Each cue normally contains a sequence number, a start and end timestamp, one or more subtitle text lines, and a blank line before the next cue. SRT is a subtitle format, not a web form, and it does not contain the underlying video or audio.

Read a two-cue example

Save the following as a text file named sample.srt. The timestamps use hours, minutes, seconds and three millisecond digits, with a comma before the milliseconds.

1
00:00:01,000 --> 00:00:03,200
Welcome to the demonstration.

2
00:00:04,000 --> 00:00:06,500
The second subtitle appears here.

The first cue begins one second into the video and ends at 3.2 seconds. A gap follows before the second cue begins. The sequence numbers identify the cue order; they are not frame numbers. Keep the arrow exactly as shown, using two hyphens followed by a greater-than sign.

Create a file without hidden formatting

Use a plain-text editor, paste the example and save with an .srt extension. Make sure the filename is not sample.srt.txt. Choose an encoding supported by the target player; UTF-8 is a practical starting point, but the destination’s requirements matter because SRT implementations differ.

A word processor’s ordinary document save can produce a DOCX or rich-text file even if the visible text resembles subtitles. Select a true plain-text export when appropriate and reopen the resulting file in a text editor. A changed extension does not convert the underlying document format.

Validate timing before styling

Check that each end time follows its start time and that the values fit the video duration. Minutes and seconds should be in their expected ranges, and milliseconds should have three digits. Review overlapping cues intentionally: some subtitle workflows permit overlap, while others require non-overlapping display intervals.

Play the video through the first cue, a cue in the middle and the final cue. Then seek backward and forward to confirm the player keeps them synchronized. If every cue is early by the same amount, a uniform offset may be appropriate. If the error grows over time, investigate the source media and timing basis instead of repeatedly applying a fixed offset.

Keep text readable in its destination

Break lines at sensible phrase boundaries and leave enough display time to read them. There is no single line-length number that makes every SRT file valid for every platform. A broadcaster, learning platform or video player may impose its own caption style and limits. Test those requirements with the actual font, size and display area.

Speaker labels, sound descriptions and punctuation affect meaning and accessibility. Preserve them deliberately rather than stripping everything inside brackets. Styling tags supported by one player may appear literally or be ignored in another, so start with plain text and add only the styling the destination documents.

Diagnose common failures

  • No subtitles appear: confirm the subtitle track is selected and the file matches the video or was loaded explicitly.
  • Only the first cue appears: inspect the next cue’s timestamp line and the blank separator.
  • Accented text is corrupted: check the file encoding and the player’s decoding settings.
  • Text appears at the wrong moment: compare a spoken phrase with its cue times before applying an offset.
  • Tags appear on screen: remove unsupported markup or use the destination’s supported caption format.

SRT and WebVTT are different formats

WebVTT typically includes a WEBVTT header and uses a period before milliseconds. It also has features and syntax beyond basic SRT cues. Renaming an .srt file to .vtt is not a complete conversion. Use a format-aware converter, then play the converted result and check cue text and timing.

A plain-text editor can help inspect or edit the file, but it does not automatically validate subtitle timing or preview the video. Keep a copy of the original captions before making bulk changes.

Reference

The Library of Congress SRT format description documents its structure and implementation limitations.