knowledge/technology/files/media/SubRip.md

35 lines
1.7 KiB
Markdown
Raw Normal View History

2024-03-03 03:06:25 +00:00
---
2024-03-06 12:15:41 +00:00
obj: format
mime: "text/plain"
extension: "srt"
2024-03-03 03:06:25 +00:00
wiki: https://en.wikipedia.org/wiki/SubRip
2024-03-08 21:53:45 +00:00
rev: 2024-03-03
2024-03-03 03:06:25 +00:00
---
# SubRip Subtitles
SRT (SubRip Subtitle) is one of the most widely used subtitle file formats for displaying timed text along with video content. It is a simple and human-readable format, making it popular among content creators and consumers alike. SRT files contain information about the timing and content of subtitles, allowing them to be synchronized with video playback.
## Format
SRT files typically consist of multiple subtitle entries, each representing a specific segment of text to be displayed at a particular point in time during video playback. The structure of an SRT file is straightforward:
1. **Subtitle Number**: Each subtitle entry begins with a numerical identifier.
2. **Timing Information**: Timing information indicates when the subtitle should appear and disappear on the screen. It is expressed in the format `start time --> end time`.
3. **Subtitle Text**: The actual text content of the subtitle appears below the timing information. It may span multiple lines but does not contain any markup or formatting.
Here is an example of a basic SRT file:
```srt
1
00:00:10,500 --> 00:00:13,000
Hello, world!
2
00:00:15,000 --> 00:00:18,000
This is a sample subtitle.
```
## Timing Format
The timing information in SRT files follows a specific format:
- **Start Time**: Indicates when the subtitle should appear on the screen. It is represented in the format `hours:minutes:seconds,milliseconds`.
- **End Time**: Indicates when the subtitle should disappear from the screen. It follows the same format as the start time.
The start and end times are separated by `-->`, and milliseconds are separated from seconds by a comma.