4 min read
What is an SRT file? Structure and common problems
How the SRT subtitle format is built, timecodes, character encoding, and practical tips for subtitles that will not load or drift.
SRT (SubRip Text) is the most common subtitle format. It is a plain text file that nearly every video player, TV and streaming tool can open. Knowing its structure makes it much easier to fix a subtitle that will not load or that drifts.
The structure of a block
The file is made of blocks separated by blank lines. Each block contains, in order:
- A sequence number, starting at 1 and going up by one.
- A timecode: start and end as hours:minutes:seconds,milliseconds with "-->" between them. Example: 00:01:02,500 --> 00:01:05,000
- The text: one or two lines. Subtitle standards advise against more than two.
- A blank line that ends the block.
Formatting tags
SRT supports simple formatting: tags such as <i>italic</i> and <b>bold</b>, with italics often used for voices off screen and songs. Codes like {\an8} move the subtitle to the top of the screen, usually so that it does not cover on-screen text. A translation has to keep these tags, or song lyrics will look like ordinary speech.
Character encoding
Today SRT files are mostly saved as UTF-8, which shows every language's letters correctly. Older files may use language-specific encodings; old Turkish subtitles, for example, are often Windows-1254, and old Polish ones Windows-1250. Opened with the wrong encoding, accented letters turn into garbage. A good tool detects the encoding and reads the file correctly.
If a subtitle will not load or drifts
- An invisible mark at the start of the file (a BOM) stops some players from reading the first block. UTF-8 without a BOM is the safest choice.
- Line endings matter on some devices. Windows-style line endings (CRLF) give the widest compatibility.
- If the subtitle is ahead or behind by the same amount from start to end, it was made for another release of the video; the player's subtitle delay setting fixes it.
- If it drifts further and further, the frame rate differs (for example 23.976 versus 25). Finding the subtitle for the right release is the best fix.
- Most players load a subtitle automatically when it has the same name as the video, such as Film.mkv and Film.en.srt.
During translation subTranslator never touches the numbers, timecodes or the number of blocks; it only changes the text, and saves the file as UTF-8 without a BOM, with CRLF line endings.