SubRip#Formatting
{{short description|Program that extracts subtitles from video}}
{{Infobox software
| name = SubRip (software)
| developer = Brain,{{Cite web |title=SubRip & SubMagic |url=http://membres.lycos.fr/subrip/ |archive-url=https://web.archive.org/web/20030413232440/http://membres.lycos.fr/subrip/ |archive-date=13 April 2003 |access-date=12 February 2022 |website=The Brain's Web}} T.V. Zuggy, mrSHADOW, Yakov, ai4spam, Bloody, Roy Damman,{{Cite web |title=zuggy.wz.cz News |url=https://zuggy.wz.cz/ |archive-url=https://web.archive.org/web/20200609201156/https://zuggy.wz.cz/ |archive-date=9 June 2020 |access-date=12 February 2022 |website=zuggy.wz.cz |quote=Roy Damman released SubRip 1.57.1.}}
| released = {{start date and age|2000|03|03|df=yes}}{{Cite web |date=2015-10-13 |title=SubRip 1.56.1 History |url=https://www.free-codecs.com/readmes/subrip_News.txt |website=Free Codecs}}
| latest_release_version = 1.57.1
| latest_release_date = {{start date|2018|11|14}}{{Cite web |last=Damman |first=Roy |date=2018-11-14 |title=Browse /subrip/SubRip 1.57.1 |url=https://sourceforge.net/projects/subrip/files/subrip/SubRip%201.57.1/ |access-date=12 February 2022 |website=SubRip |publisher=SourceForge.net}}
| latest preview version =
| latest preview date =
| operating_system = Microsoft Windows
| genre = Subtitle editor
| programming_language = Delphi
| license = GPLZuggy, DVD, November 6, 2006.
| language = English
| website = {{URL|http://zuggy.wz.cz}}{{Cite web |title=HTTPS není dostupné - Webzdarma.cz | Webzdarma.cz |url=https://zuggy.wz.cz/ |url-status=dead |archive-url=https://archive.today/20220212024015/https://zuggy.wz.cz/ |archive-date=12 February 2022 |access-date=30 June 2022 |website=zuggy.wz.cz}}{{Cite web |title=ZuggyWu:d |url=http://zuggy.wz.cz/ |url-status=dead |archive-url=https://web.archive.org/web/20210610093210/http://zuggy.wz.cz/ |archive-date=10 June 2021 |access-date=22 February 2022 |website=zuggy.wz.cz}}
}}
{{Infobox file format
| name = SubRip Text (file format)
| extension = .srt
| mime = application/x-subrip{{efn|Android 10 value. Not IANA-approved and in fact invalid due to "x-" no longer being unregulated.}}
| owner = Brain, Zuggy
| genre = Timed text
| container_for = Subtitles and their order and timings
| contained_by =
| extended_to = WebVTT
| website =
| open = Yes
| free = Yes
| url =
}}
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 GNU GPL.{{Cite book |last=Powers |first=Shelley |url=https://books.google.com/books?id=GIm3iMzcHekC&pg=PA83 |title=HTML5 Media: Integrating Audio and Video with the Web |date=8 August 2011 |publisher="O'Reilly Media, Inc." |isbn=978-1-4493-1531-3 |pages=82–83}} 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.{{Cite journal |last=Rodriguez-Alsina |first=Aitor |last2=Talavera |first2=Guillermo |last3=Orero |first3=Pilar |last4=Carrabina |first4=Jordi |date=2012-06-26 |title=Subtitle Synchronization across Multiple Screens and Devices |journal=Sensors |language=en |volume=12 |issue=7 |pages=8710–8731 |bibcode=2012Senso..12.8710R |doi=10.3390/s120708710 |issn=1424-8220 |pmc=3444071 |pmid=23012513 |quote=Most subtitles distributed on the Internet are described in text files that follow the SubRip (.SRT) format |doi-access=free}}{{Citation |last=Stanislav |first=Petr |last2=Švec |first2=Jan |last3=Šmídl |first3=Luboš |editor-last=Sojka |editor-first=Petr |editor-last2=Horák |editor-first2=Aleš |editor-last3=Kopeček |editor-first3=Ivan |editor-last4=Pala |editor-first4=Karel |title=Unsupervised Synchronization of Hidden Subtitles with Audio Track Using Keyword Spotting Algorithm |date=2012 |work=Text, Speech and Dialogue |volume=7499 |pages=422–430 |publisher=Springer Berlin Heidelberg |doi=10.1007/978-3-642-32790-2_51 |isbn=978-3-642-32789-6 |quote=which is the most common subtitle format in the movie fans community}}
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 format text file.{{Harvnb|Thaureaux|2007| pp=131–134}} It can optionally save the recognized subtitles as bitmaps for later subtraction (erasure) from the source video.Zuggy, News, entry dated May 28, 2005.{{Harvnb|Thaureaux|2007| p=132}}
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,{{Harvnb|Thaureaux|2007| p=136}} colors and video processing requirementsZuggy, Guide. 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.{{Harvnb |Thaureaux|2007|p=137}}
SubRip uses AviSynth to extract video frames from source video, and can rip subtitles from all video files supported by that program.
Format {{anchor|Formatting}}
The SubRip file format is described on the Matroska multimedia container format website as "perhaps the most basic of all subtitle formats."{{Cite web |title=SRT Subtitles |url=https://www.matroska.org/technical/subtitles.html#srt-subtitles |access-date=2020-10-24 |website=matroska.org |publisher=CoreCodec Inc.}} 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
Example for Star Wars: Episode II – Attack of the Clones:
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:[http://ale5000.altervista.org/subtitles.htm SubRip (.SRT) subtitles support in players] – ale5000.altervista.org
- 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:…
.{{Cite web |title=Extended SRT spec (especially coordinate format) question [Archive] - Doom9's Forum |url=http://forum.doom9.org/archive/index.php/t-86664.html |access-date=2021-03-10 |website=forum.doom9.org}}
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 VSFilter DirectX filter displays SubRip and other subtitle formats.{{Cite book |last=陈波 |url=https://books.google.com/books?id=FjF2XragdYYC&pg=PA75 |title=实用工具软件玩家攻略 |last2=杨涛 |publisher=清华大学出版社 |year=2006 |isbn=9787302119944 |pages=75–76 |language=zh |access-date=2010-09-11}}
The SubRip format is supported directly by many subtitle creation and editing tools,{{Citation |last=Martin |first=Chris |title=15 Best Subtitle Editors for Movies or Videos |date=2009-12-29 |work=Binary Head |url=http://www.aboutonlinetips.com/best-subtitle-editor-tools/ |archive-url=https://web.archive.org/web/20101223154708/http://www.aboutonlinetips.com/best-subtitle-editor-tools/ |archive-date=2010-12-23}} All apps listed support SubRip (SRT), but the article is specific about 7 of 15.
as well as some hardware home media players.{{Citation |last=TechToyer |title=A DivX Player for the Living Room (Neuston Maestro DVX-1201) |date=September 2003 |work=HardwareMAG |page=67 |url=https://books.google.com/books?id=XeoDAAAAMBAJ&pg=PT67 |publication-place=Singapore |publisher=SPH Magazines Pte Ltd. |issn=0219-5607}}{{Citation |last=Tokig |title=Review of KiSS DP-500 – Playback |date=2003-07-13 |work=Nordic Hardware |url=http://www.nordichardware.com/test-lab/42-multimedia/11055-kiss-dp-500.html?start=3#content |access-date=2010-07-21 |archive-url=https://web.archive.org/web/20120301122740/http://www.nordichardware.com/test-lab/42-multimedia/11055-kiss-dp-500.html?start=3#content |archive-date=2012-03-01 |url-status=dead}}{{Citation |title=Argosy Media Player HV335T HDD (HD1080p) product page |work=Argosy |year=2009 |url=http://www.argosy.com.tw/product-detial.php?prod_id=154 |archive-url=https://web.archive.org/web/20100208224243/http://www.argosy.com.tw/product-detial.php?prod_id=154 |archive-date=2010-02-08}}{{Citation |last=Cericola |first=Rachel |title=Western Digital WD TV Live HD Media Player review |date=2009-12-08 |work=Big Picture Big Sound |url=http://www.bigpicturebigsound.com/Western-Digital-WD-TV-Live-HD-Media-Player.shtml}}{{Citation |last=Suerte Felipe |first=Carlo |title=Get stylish with Samsung DVD-F1080 |date=2009-02-16 |url=http://www.mb.com.ph/node/196529 |access-date=2010-08-19 |publisher=Manila Bulletin Publications}}
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.{{Cite book |last=Chisholm |first=Wendy |title=Universal Design for Web Applications: Web Applications that Reach Everyone |last2=May |first2=Matt |date=2008-12-09 |publisher=O'Reilly Media |isbn=9780596518738 |edition=1st |page=82}}{{Cite web |date=2008-08-28 |title=New Captions Feature for Videos |url=https://youtube.googleblog.com/2008/08/new-captions-feature-for-videos.html |website=Official YouTube Blog}}
= 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.{{Cite web |title=Supported subtitle and closed caption files - YouTube Help |url=https://support.google.com/youtube/answer/2734698?hl=en#zippy=%2Cbasic-file-formats |access-date=14 August 2023 |website=support.google.com}} The default encoding for subtitle files in FFmpeg is UTF-8.{{Cite web |title=FFmpeg Filters Documentation |url=http://ffmpeg.org/ffmpeg-filters.html#subtitles-1 |access-date=14 August 2023 |website=ffmpeg.org |quote=Set subtitles input character encoding. subtitles filter only. Only useful if not UTF-8.}} All text in a Matroska™ file is encoded in UTF-8. This means that mkvmerge has to convert every text file it reads as well as every text given on the command line from one character set into UTF-8.{{Cite web |date=2024-05-07 |title=mkvmerge -- Merge multimedia streams into a Matroska file |url=https://mkvtoolnix.download/doc/mkvmerge.html#mkvmerge.text_files_and_charsets |archive-url=https://archive.today/20240507172803/https://mkvtoolnix.download/doc/mkvmerge.html#mkvmerge.text_files_and_charsets |archive-date=2024-05-07}}
SubViewer
In 1999, Brain created SubRip, and a friend, David Dolinski, created SubViewer, who offered it for download on his personal website.{{Cite web |title=SubViewer |url=http://www.dado.be/subviewer.Asp |archive-url=https://web.archive.org/web/20051105011243/http://www.dado.be/subviewer.Asp |archive-date=5 November 2005 |access-date=12 February 2022 |website=Dado.be}}{{Cite web |title=New Captions Feature for Videos |url=https://www.youtube.com/blog?entry=mi8D3ntPgFQ |access-date=12 February 2022 |website=YouTube Official Blog |language=en-us}}{{Cite web |title=SubRip |url=https://wiki.videolan.org/SubRip/ |access-date=12 February 2022 |website=VideoLAN Wiki}}{{Cite web |title=SubViewer |url=https://wiki.videolan.org/SubViewer/ |access-date=12 February 2022 |website=VideoLAN Wiki}}{{Cite web |title=Subtitle Formats |url=http://divxstation.com/article.asp?aId=27 |archive-url=https://web.archive.org/web/20050209005304/http://divxstation.com/article.asp?aId=27 |archive-date=9 February 2005 |access-date=12 February 2022 |url-status=usurped |website=Divxstation}}{{Cite web |title=SubViewer 4.0.6 |url=https://www.free-codecs.com/download/subviewer.htm |access-date=12 February 2022 |website=free-codecs.com}}
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.
WebVTT
{{Main article|WebVTT}}
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.[http://www.delphiki.com/websrt/ Understanding WebSRT format][http://www.whatwg.org/specs/web-apps/current-work/websrt.html WebSRT], from the WHATWG HTML draft specification, retrieved 2010-10-14
The prospective format was later renamed WebVTT (Web Video Text Track).{{Cite book |last=Kennedy |first=Antony |url=https://books.google.com/books?id=9A6w3ZBDtysC&pg=PA168 |title=Pro CSS for High Traffic Websites |last2=de Leon |first2=Inayaili |publisher=Apress |year=2011 |isbn=978-1-4302-3288-9}}{{Cite web |last=Pfeiffer |first=Silvia |date=June 27, 2011 |title=Recent developments around WebVTT |url=http://blog.gingertech.net/2011/06/27/recent-developments-around-webvtt/}}
Google's Chrome and Microsoft's Internet Explorer 10 browsers were the first to support {{tag|track|o}} 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.{{Cite web |title=Firefox 31 Release Notes |url=https://www.mozilla.org/en-US/mobile/31.0/releasenotes/}} YouTube began supporting WebVTT in April, 2013.{{Cite web |title=Caption File - YouTube Help |url=https://support.google.com/youtube/bin/answer.py?answer=2734698&topic=3014331&ctx=topic}}
See also
- Closed captioning
- Timed text
- {{format link|Comparison of video player software#Subtitle ability}}
- Avidemux
- List of free television software
- MicroDVD
- SubStation Alpha
- Universal Subtitle Format
- DirectVobSub – able to extract subtitles from a DVD without first extracting the files from it
Notes
{{Notelist}}
References
=Citations=
{{Reflist}}
=Sources=
{{refbegin}}
- {{Cite book |last=Thaureaux |first=Thierry |url=https://books.google.com/books?id=f2kmYyTs0lgC&q=divx%20subrip&pg=PT126 |title=DivX - Copiez vos vidéos sur CD (Nouvelle édition) |publisher=Editions ENI |year=2007 |isbn=978-2-7460-3812-7 |location=Herblain, FR |pages=133–136 |language=fr}}
- {{Cite web |last=Zuggy, T.V |title=SubRip home |url=http://zuggy.wz.cz |access-date=2010-08-19 |website=zuggy.wz.cz}}
- {{Cite web |last=Zuggy, T.V |date=December 8, 2005 |title=SubRip 1.20/1.50b – DVD subtitles ripper |url=http://zuggy.wz.cz/dvd.php |access-date=2010-01-10 |website=zuggy.wz.cz}} (Software release page.)
- {{Cite web |last=Zuggy, T.V |date=August 1, 2007 |title=News page |url=http://zuggy.wz.cz/news.php |access-date=2009-07-02 |website=zuggy.wz.cz}}
- {{Cite web |last=Zuggy, T.V |date=June 17, 2005 |title=Guide: Ripping subtitles from video files using SubRip |url=http://zuggy.wz.cz/redir.php?co=101 |access-date=2009-07-02 |website=zuggy.wz.cz}}
- {{Cite book |last=Xiao |first=Han |title=Proc. Int. Conf. on Computer Processing of Oriental Languages |last2=Wang, Xiaojie |date=March 27, 2009 |publisher=Springer |isbn=978-3-642-00830-6 |editor-last=Li |editor-first=Wenjie |series=Lecture Notes in Computer Science |volume=5459 |location=Hong Kong |pages=329–336 |chapter=Constructing Parallel Corpus from Movie Subtitles |doi=10.1007/978-3-642-00831-3_32 |access-date=2009-07-02 |editor-last2=Mollá-Aliod |editor-first2=Diego |chapter-url=https://books.google.com/books?id=EqlV6gBmii8C&q=subrip%20subtitles&pg=PA330}}
- {{Cite book |last=Chisholm, Wendy |url=https://archive.org/details/isbn_9780596518738 |title=Universal design for Web applications |last2=May, Matt |publisher=O'Reilly Media |year=2008 |isbn=978-0-596-51873-8 |page=[https://archive.org/details/isbn_9780596518738/page/82 82] |quote=subrip subtitles youtube. |access-date=2010-06-28 |url-access=registration}}
- {{Cite journal |title=Extraire les sous-titres d'un DVD vidéo |trans-title=Extract subtitles from video DVD |url=https://download.abandonware.org/magazines/DIVX%20Magazine/divxmagazine_numerohs03.zip |journal=DivX Magazine |series=Hors Série |language=French |publisher=Image Publication Luxembourg |publication-date=2006 |volume=3 |page=17-19}}
- {{Cite journal |last=Horlings |first=Jeroen |date=July 2005 |title=Onmisbare divx-utilities |trans-title=Essential divx utilities |journal=PCM |series=Gratis bijlage |language=Dutch |page=51}}
{{refend}}
- {{Cite journal |last=Horlings |first=Jeroen |date=July 2005 |title=Onmisbare divx-utilities |trans-title=Essential divx utilities |journal=PCM |series=Gratis bijlage |language=Dutch |page=51}}
External links
- {{Official website}}
- {{Commons-inline|Commons:Timed Text}}
Category:Subtitle file formats