Using optical character recognition, SubRip can extract from live video, video files and DVDs, then record the extracted subtitles and timings as a Subrip format text file. It can optionally save the recognized subtitles as bitmaps for later subtraction from the source video. 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, colors and video processing requirements 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. SubRip uses AviSynth to extract video frames from source video, and can rip subtitles from all video files supported by that program.
File format
The SubRip file format is described on the Matroskamultimedia container format website as "perhaps the most basic of all subtitle formats." SubRip 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. The fractional separator used is the comma, since the program was written in France.
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
Example: 00:02:17,440 --> 00:02:20,375 Senator, we're making our final approach into Coruscant. 00:02:20,476 --> 00:02:22,501 Very good, Lieutenant.
Formatting
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:
Bold – <b>…</b> or …
Italic – <i>…</i> or …
Underline – <u>…</u> or …
Font color – <font color="color name or #code">…</font>
Line position – would denote text should appear starting on "line 7."
Nested tags are allowed; some implementations prefer whole-line formatting only.
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. The SubRip format is supported directly by many subtitle creation and editing tools, and some hardware home media players. In August 2008, YouTube added subtitle support to its Flashvideo player under the "Closed Captioning" option - content producers can upload subtitles in SubRip format.
WebVTT
A format originally called WebSRT 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. The prospective format was later renamed WebVTT. Google's Chrome and Microsoft's Internet Explorer 10 browsers were the first to support tags with WebVTT files for HTML5 videos. Mozilla Firefox implemented WebVTT in its nightly builds, and as of Firefox 31, Mozilla enabled WebVTT on Firefox by default. The feature had to be enabled in Firefox by going to the "about:config" page and setting the value of "media.webvtt.enabled" to true. YouTube began supporting WebVTT in April, 2013.
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. Therefore, there is no de facto character encoding standard for .srt files, which means that any SubRip file parser must attempt to use Charset detection. Unicode Byte Order Mark are typically used to aid detection.