SubRip is a free software program for Microsoft Windows which extracts subtitles and their timings from various video formats to a text file. It is released under the GNUGPL.[9] Its subtitle format's file extension is .srt and is widely supported. Each .srt file is a human-readable file format where the subtitles are stored sequentially along with the timing information. Most subtitles distributed on the Internet are in this format.[10][11]
Software
Using optical character recognition, SubRip can extract from live video, video files and DVDs, then record the extracted subtitles and timings as a Subrip formattext file.[12] It can optionally save the recognized subtitles as bitmaps for later subtraction (erasure) from the source video.[13][14]
In practice, SubRip is configured with the correct codec for the video source, then trained by the user on the specific text area, fonts, styles,[15] colors and video processing requirements[16] to recognize subtitles. After trial and fine tuning, SubRip can automatically extract subtitles for the whole video source file during its playback. SubRip records the beginning and end times and text for each subtitle in the output text .srt file.[17]
SubRip uses AviSynth to extract video frames from source video, and can rip subtitles from all video files supported by that program.
Format
The SubRip file format is described on the Matroska multimedia container format website as "perhaps the most basic of all subtitle formats."[18] SubRip (SubRip Text) files are named with the extension.srt, and contain formatted lines of plain text in groups separated by a blank line. Subtitles are numbered sequentially, starting at 1. The timecode format used is hours:minutes:seconds,milliseconds with time units fixed to two zero-padded digits and fractions fixed to three zero-padded digits (00:00:00,000). The comma (,) is used for fractional separator.
A numeric counter identifying each sequential subtitle
The time that the subtitle should appear on the screen, followed by --> and the time it should disappear
Subtitle text itself on one or more lines
A blank line containing no text, indicating the end of this subtitle[18]
1
00:02:16,612 --> 00:02:19,376
Senator, we're making
our final approach into Coruscant.
2
00:02:19,482 --> 00:02:21,609
Very good, Lieutenant.
3
00:03:13,336 --> 00:03:15,167
We made it.
4
00:03:18,608 --> 00:03:20,371
I guess I was wrong.
5
00:03:20,476 --> 00:03:22,671
There was no danger at all.
Markup
Unofficially the format has very basic text formatting, which can be either interpreted or passed through for rendering depending on the processing application. Formatting is derived from HTML tags for bold, italic, underline and color:[19]
Bold – <b>…</b>
Italic – <i>…</i>
Underline – <u>…</u>
Font color – <font color="color name or #code">…</font>
Nested tags are allowed; some implementations prefer whole-line formatting only.
Also unofficially, text coordinates can be specified at the end of the timestamp line as X1:… X2:… Y1:… Y2:….[20]
Compatibility
The SubRip .srt file format is supported by most software video players. For Windows software video players that do not support subtitle playback directly, the VSFilterDirectX filter displays SubRip and other subtitle formats.[21]
The SubRip format is supported directly by many subtitle creation and editing tools,[22]
as well as some hardware home media players.[23][24][25][26][27]
In August 2008, YouTube added subtitle support to its Flash video player under the "Closed Captioning" option – content producers can upload subtitles in SubRip format.[28][29]
Text encoding
SubRip's default output encoding is configured as Windows-1252. However, output options are also given for many Windows code pages as well Unicode encodings, such as UTF-8 and UTF-16, with or without byte order mark (BOM). Therefore, there is no official character encoding standard for .srt files, which means that any SubRip file parser must attempt to use Charset detection. Unicode BOMs are typically used to aid detection.
YouTube only supports UTF-8.[30] The default encoding for subtitle files in FFmpeg is UTF-8.[31]
SubViewer
In 1999, Brain created SubRip, and a friend, David Dolinski, created SubViewer, who offered it for download on his personal website.[32][33][34][35][36][37]
SubViewer was included in the DivX media player. On August 28, 2008, YouTube included support for SubViewer and SubRip, allowing existing videos to be retroactively subtitled.[33]
A format originally called WebSRT (Web Subtitle Resource Tracks) was specified in 2010 by the Web Hypertext Application Technology Working Group for the proposed HTML5<track> element. It shared the .srt file extension and was based on parts of the SubRip format, but was not fully compatible with it.[38][39]
The prospective format was later renamed WebVTT (Web Video Text Track).[40][41]
Google's Chrome and Microsoft's Internet Explorer 10 browsers were the first to support <track> tags with WebVTT files for HTML5 videos. Mozilla Firefox implemented WebVTT in its nightly builds (Firefox 24), and as of Firefox 31 (July 24, 2014), Mozilla enabled WebVTT on Firefox by default.[42] YouTube began supporting WebVTT in April, 2013.[43]
^Stanislav, Petr; Švec, Jan; Šmídl, Luboš (2012), Sojka, Petr; Horák, Aleš; Kopeček, Ivan; Pala, Karel (eds.), "Unsupervised Synchronization of Hidden Subtitles with Audio Track Using Keyword Spotting Algorithm", Text, Speech and Dialogue, vol. 7499, Springer Berlin Heidelberg, pp. 422–430, doi:10.1007/978-3-642-32790-2_51, ISBN978-3-642-32789-6, which is the most common subtitle format in the movie fans community
^Chisholm, Wendy; May, Matt (2008-12-09). Universal Design for Web Applications: Web Applications that Reach Everyone (1st ed.). O'Reilly Media. p. 82. ISBN9780596518738.
^"FFmpeg Filters Documentation". ffmpeg.org. Retrieved 14 August 2023. Set subtitles input character encoding. subtitles filter only. Only useful if not UTF-8.
^"SubViewer". Dado.be. Archived from the original on 5 November 2005. Retrieved 12 February 2022.