What is an SRT file?
SRT (SubRip file format) is a simple subtitle file saved in the SubRip file format with the .srt extension. It contains a sequential number of subtitles, start and end timestamps, and subtitle text. SRT files make it possible to add subtitles to video content after it is produced.
SRT file Structure
Each subtitle has four parts in the SRT file.
- A numeric counter indicating the number or position of the subtitle.
- Start and end time of the subtitle separated by –> characters
- Subtitle text in one or more lines.
- A blank line indicating the end of the subtitle.
Example of SRT
1
00:05:00,400 --> 00:05:15,300
This is an example of
a subtitle.
2
00:05:16,400 --> 00:05:25,300
This is an example of
a subtitle - 2nd subtitle.
To specify the time hours:minutes:seconds,milliseconds (00:00:00,000) format is used.
Formatting of SRT files
The formatting of SRT files is derived from HTML tags. The formatting tags for the SRT file are listed below.
Effect | Tags |
---|---|
Bold | <b>…</b> or {b}…{/b} |
Italic | <i>…</i> or {i}…{/i} |
Underline | <u>…</u> or {u}…{/u} |
Font Color | <font color=“white”>…</font> |
Line Position | {\a3} (indicates that the text should start appearing on line 3) |
SubRip Software
SubRip is a free software program that runs on Windows. It extracts subtitles and their timings from different video formats and saves the subtitles in SRT format. SubRip uses optical character recognition to extract subtitles from live video, other video files, and DVDs.
How SRT files work?
Basic Structure of an SRT File
Each subtitle entry includes:
- Sequence number
- Timecodes for when the subtitle appears and disappears
- Subtitle text
Example:
1
00:00:01,000 --> 00:00:04,000
Hello, how are you?
2
00:00:05,000 --> 00:00:07,000
I'm good, thanks!
- Time Format:
hours:minutes:seconds,milliseconds
-->
separates the start time and end time
How It Works With Video
- The media player reads the SRT file alongside the video file.
- When the playback time matches a timestamp in the SRT, the corresponding subtitle text is shown on screen.
- SRT files are usually named exactly the same as the video (except the extension) to sync automatically:
movie.mp4
movie.srt
How to Use or Edit SRT Files
- Edit: With any text editor (Notepad, VS Code, etc.)
- Create: With subtitle editors like Aegisub or Subtitle Edit
- Play with Video: Use players like VLC, MPC-HC, or PotPlayer