SRT, or SubRip Text, are basic text files with a syntax that looks like the following:
1
00:00:00,000 --> 00:00:05,000
First line of first subtitle.
Second line of first subtitle.2
00:00:07,000 --> 00:00:10,000
Second subtitle. Single line.
Or
<Subtitle#>
<Start time> --> <End time>
<Text>
Timing is formatted this way: Hours:Minutes:Seconds,Milliseconds
Hours, minutes, and seconds are always written as two characters (07! not 7).
Milliseconds are always written as three characters.
Most standalone players, such as VLC and MPC-HC, have no issues parsing SRTs with syntax errors.
Kaltura's players (KDP and V2) are a bit more sensitive. When encountering any error, the entire caption file might not show. It is important to note that while some subtitles work with V2, they might not work with KDP. They have different parsing code.
Common Errors
Missing/wrong numbering of subtitles within the SRT file:
1
00:00:00,000 --> 00:00:05,000
First line of first subtitle.
Second line of first subtitle.00:00:07,000 --> 00:00:10,000
Second subtitle. Single line.
Note the missing "2".
"Wrong number" would be if it says 5 (instead of going in an ascending numbers; 1... 2... 3...).
Missing spaces within the timing
1
00:00:00,000-->00:00:05,000
First line of first subtitle.
Second line of first subtitle.
Note the missing spaces around the "–>".
Spaces between timing line and subtitle text
1
00:00:00,000 --> 00:00:05,000First line of first subtitle.
Second line of first subtitle.
Different timing format
1
00:00:00.000 –> 00:00:05.000
First line of first subtitle.
Second line of first subtitle.
Note the dot instead of the comma before the milliseconds.
Basic debugging of subtitles involves using subtitle editors such as:
- SubtitleEdit - http://www.nikse.dk/SubtitleEdit/
- Aegisub - http://www.aegisub.org/
These editors usually automatically fix or alert of subtitle syntax errors.
To save SRT files in Aegisub, go to File->Export Subtitles. A simple CTRL+S won't work (Aegisub's default format is ASS, which the Kaltura players do not support).