Difference between revisions of "SubRip"

From VideoLAN Wiki
Jump to navigation Jump to search
(Fix typo and add clarifying info)
Line 8: Line 8:
 
==Specification==
 
==Specification==
 
=== Format ===
 
=== Format ===
Subtitles are formatted as follows:<br>
+
Each frame of a subtitle is formatted as follows:<br>
 
:n<br>
 
:n<br>
 
:h1:m1:s1,d1 --> h2:m2:s2,d2<br>
 
:h1:m1:s1,d1 --> h2:m2:s2,d2<br>
:Line1<br>
+
:Line 1<br>
:Line2<br>
+
:Line 2<br>
 
:...<br>
 
:...<br>
:<blank line><br>
+
::(blank line between subtitle frames)<br>
  
 
'''n''' = sequential number.  This may also appear on the same line as start/stop times.<br>
 
'''n''' = sequential number.  This may also appear on the same line as start/stop times.<br>
'''h1:m1:s1,d1''' = start time<br>
+
'''h1:m1:s1,d1''' = start time of this frame, in hours minutes and seconds to three decimal places.<br>
'''h2:m2:s1,d2''' = stop time<br>
+
'''h2:m2:s2,d2''' = stop time.<br>
 +
::Note the French-style comma for the decimal delimiter.
  
=== Example ===
+
''' Example: ''' a 2 frame subtitle
 
  1
 
  1
 
  00:00:20,000 --> 00:00:24,400
 
  00:00:20,000 --> 00:00:24,400
Line 31: Line 32:
  
 
=== Extensions ===
 
=== Extensions ===
Some subtitles feature '''html''' tags inside the SubRip text:
+
Some subtitles feature html tags inside the SubRip text:
* b: bold
+
* &lt;b&gt;...&lt;/b&gt;: bold
* s: strikethrough
+
* &lt;s&gt;...&lt;/s&gt;: strikethrough
* u: underline
+
* &lt;u&gt;...&lt;/u&gt;: underline
* i: italic
+
* &lt;i&gt;...&lt;/i&gt;: italic
* font color=... face=...: font attributes
+
* &lt;font color=... face=...&gt;: font attributes
  
 
[[Category:Subtitles]]
 
[[Category:Subtitles]]

Revision as of 12:54, 4 July 2010

SubRip is the native subtitle format of the SubRip program. It is one of the most used formats for subtitles.

It may have the file extension .srt. It can be embedded in mkv files

Specification

Format

Each frame of a subtitle is formatted as follows:

n
h1:m1:s1,d1 --> h2:m2:s2,d2
Line 1
Line 2
...
(blank line between subtitle frames)

n = sequential number. This may also appear on the same line as start/stop times.
h1:m1:s1,d1 = start time of this frame, in hours minutes and seconds to three decimal places.
h2:m2:s2,d2 = stop time.

Note the French-style comma for the decimal delimiter.

Example: a 2 frame subtitle

1
00:00:20,000 --> 00:00:24,400
a bla bla ble a bla bla ble
a bla bla ble
 
2 
00:00:24,600 --> 00:00:27,800 
a bla bla ble... 

Extensions

Some subtitles feature html tags inside the SubRip text:

  • <b>...</b>: bold
  • <s>...</s>: strikethrough
  • <u>...</u>: underline
  • <i>...</i>: italic
  • <font color=... face=...>: font attributes