GUIDE

SRT, VTT and LRC: subtitle and lyrics files explained

How SRT, WebVTT and LRC files are built, how each writes its times, why subtitles fail to load, and what StillKit keeps or drops when converting them.

By StillKit · Updated

SRT, WebVTT and LRC are plain text files that pair lines of words with times. SRT and WebVTT (.vtt) give each subtitle a start and an end time and travel with videos; LRC gives each line of a song only a start time and is read by music players. When subtitles fail to load or show strange characters, the cause is usually a small detail. It may be a comma where a full stop belongs, a missing first line or blank line, or the wrong text encoding.

SRT: numbered blocks with a comma before the milliseconds

An SRT file is a series of blocks separated by blank lines. Each block has three parts:

  • 1 is the subtitle's number, counting up from 1.
  • 00:00:01,000 --> 00:00:03,500 is the start and end time in hours, minutes, seconds and milliseconds, with a comma before the milliseconds.
  • Hello, and welcome. is the text, on one or more lines. A blank line ends the block.

SRT began as the output of a subtitle program and was never written down as a formal standard. Players differ in how strictly they read it. Many understand a few styling tags, such as <i> for italics, while others show them as text.

WebVTT: a header, full stops and optional settings

WebVTT is the subtitle format the W3C defines for video on web pages, and the format a page's <track> element loads. A short file looks like this:

  • WEBVTT is the required first line, followed by a blank line.
  • intro is an optional name for the cue, WebVTT's word for one subtitle.
  • 00:00:01.000 --> 00:00:03.500 align:start gives the times, with a full stop before the milliseconds, then optional settings for position and alignment.
  • Hello, and welcome. is the text, ended by a blank line.

Hours may be left out, so 01:05.250 is a valid time. A file can also contain comment blocks that start with NOTE and styling blocks that start with STYLE. The W3C specification requires the file to be saved as UTF-8.

LRC: one time stamp per line of a song

  • [ti:Sample song] and [ar:Artist name] are optional tags for the title and artist.
  • [00:01.00]First line of the song gives minutes, seconds and hundredths of a second in square brackets, then the words.
  • [00:12.00][01:05.40]The chorus shows that a line sung more than once can carry several time stamps.
  • [00:30.00] on its own, with no words, ends the line before it.

LRC has no end times: each line lasts until the next time stamp. It is not a formal standard either, so music players vary in what they accept beyond these basics. Some files carry an [offset:] tag in milliseconds. StillKit applies it when it reads the file, and a positive value makes the lines appear earlier.

How each format writes a time

1 minute 5.25 seconds in each format
FormatExampleBefore the fractionPrecision
SRT00:01:05,250CommaMilliseconds
WebVTT00:01:05.250 or 01:05.250Full stopMilliseconds
LRC[01:05.25]Full stopHundredths

StillKit reads times leniently. In SRT and WebVTT it accepts either a comma or a full stop and does not insist on hours. It writes each format the standard way: SRT with a comma, WebVTT with a full stop, both with hours, and LRC in hundredths. A file that StillKit reads may still trip up a stricter player. Running it through Subtitle time shifter with 0 seconds rewrites it in the same format, with standard times and numbering.

Save subtitles as UTF-8

A text file stores letters as numbers, and its encoding is the table that maps one to the other. UTF-8 covers every script. Older subtitle files are often saved in a regional encoding, such as Windows-1252 for Western European languages. An SRT file does not say which one it uses, so a player has to guess. A wrong guess garbles accented letters: UTF-8 text read as Windows-1252 turns é into é, and older text read as UTF-8 shows � instead.

StillKit's subtitle tools work on text you paste, so your text editor decides how the file is read. If the editor shows the letters correctly, the pasted text is correct. Results are saved as UTF-8 without a byte order mark, an invisible marker some programs put at the start of a file. A byte order mark at the start of pasted text is removed. Add subtitles to video is the exception: it reads a chosen .srt or .vtt file directly, as UTF-8. If accented letters come out as �, open the file in a text editor, save it as UTF-8 and choose it again.

Which format to use where

Web pages need WebVTT. Desktop players, TVs and video editing programs usually accept SRT, and many also read WebVTT. Music players that scroll lyrics in time with a song read LRC. When an upload form lists the files it accepts, follow the list. Also check the ending of the file name: a text editor that saves subtitles.srt as subtitles.srt.txt can make a player ignore the file.

Common reasons subtitles fail

  • A .vtt file without WEBVTT on its first line. Browsers reject the whole file. Subtitle converter, set to SRT to WebVTT, reads such a file as SRT and writes it back with the header.
  • The wrong decimal sign. WebVTT needs a full stop and SRT a comma, and a strict player skips subtitles whose times do not match.
  • A missing blank line. The next subtitle's number and times then become part of the previous subtitle's text. StillKit reads it that way too, so look for a time inside a subtitle's text in the result.
  • Every line early or late by the same amount. Subtitle time shifter moves every line by the seconds you enter. Lines pushed entirely before 0:00 are removed, and the result says how many.
  • A delay that grows during the film. This usually means the subtitles were made for a version running at another frame rate. Subtitle frame rate converter multiplies every time by the ratio of the two rates. From 25 to 23.976 fps, each time grows by about 4.3%, so a line at 1:00:00 moves to about 1:02:34.
  • Lines that flash past or overlap. Subtitle checker lists lines shown for less than 0.8 seconds and lines that need more than 20 characters per second. It also flags rows longer than 42 characters, lines that overlap the next one and lines that end before they start.

What StillKit keeps and drops

Between SRT and WebVTT, Subtitle converter keeps every time to the millisecond and every line of text, with its line breaks and tags. Subtitles are sorted by start time, and SRT output is numbered from 1. What the other format has no place for is dropped: WebVTT cue names, position and alignment settings, NOTE and STYLE blocks, and any text after WEBVTT on the first line.

Conversions to and from LRC lose more, because LRC holds less. The converter's SRT to LRC option rounds start times to hundredths and joins each subtitle's lines with spaces. It marks a gap between subtitles with an empty time stamp. Tags such as <i> stay in the words, so clean them out first. Its LRC to SRT option drops the title and artist tags and ends each line where the next time stamp begins. The last line gets 4 seconds, and a line with several time stamps becomes one subtitle for each.

Subtitle cleaner keeps whichever format you paste. Its tag option removes anything in angle brackets, and style codes in curly brackets such as {\an8}. Its sound-note option removes everything in square or round brackets, so check lines that use brackets for real speech. The speaker option removes names written in capitals before a colon, such as ANNA:, but leaves Anna: alone. It also removes a number such as 10: at the start of a line. Subtitles left empty are deleted, and the result says how many.

TRY IT YOURSELF

Tools used in this guide

Find your next shortcut

Search loads only when needed. Your search stays on your device.

Browse all categories and sections →