Subtitle formats: Difference between revisions

Jump to navigation Jump to search
(→‎SSA - SubStation Alpha: added spec link)
 
(15 intermediate revisions by 2 users not shown)
Line 1: Line 1:
= Reference links =
* http://suntechnic.ru/amusements/subtitles/subtitles_overview.html
* http://subs.com.ru/list.php?c=subtitle_formats
=ASS - Advanced SubStation Alpha=
=ASS - Advanced SubStation Alpha=
Official website:  
Official website:  
Line 34: Line 39:
Dialogue: 0,0:00:01.18,0:00:06.85,DefaultVCD, NTP,0000,0000,0000,,{\pos(400,570)}Like an Angel with pity on nobody\NThe second line in subtitle
Dialogue: 0,0:00:01.18,0:00:06.85,DefaultVCD, NTP,0000,0000,0000,,{\pos(400,570)}Like an Angel with pity on nobody\NThe second line in subtitle
</pre>
</pre>
=DivX Subtitle (XSUB)=
Official website:
Wikipedia:
===What is DivX Subtitle===
===Format specifications===
Format specifications:
===Example===
=FSB - FanSubber Script=
Official website:
Wikipedia:
===What is FanSubber Script===
===Format specifications===
Format specifications:
===Example===




Line 128: Line 159:
timestamp: 00:00:01:101, filepos: 000000000
timestamp: 00:00:01:101, filepos: 000000000
timestamp: 00:00:08:708, filepos: 000001000</pre>
timestamp: 00:00:08:708, filepos: 000001000</pre>
=KATE=
Official website: https://wiki.xiph.org/OggKate
Wikipedia:
===What is KATE===
Kate is an overlay codec, originally designed for karaoke and text, that can be multiplexed in Ogg.
Text and images can be carried and animated by a Kate stream. Most of the time, they will (optionally) be multiplexed with audio/video to carry subtitles, song lyrics (with or without karaoke data), etc.
===Format specifications===
Format specifications:
===Example===




Line 192: Line 239:
===Example===
===Example===


=S2K - Sasami2k script=
Official website:
Wikipedia:
===What is Sasami2k script===
===Format specifications===
Format specifications:
===Example===
<pre>
// translated by Sami2Sasami 1.0.7.300
// contact: nuclei@shinbiro.com
;Set.Slot=1
;Set.Time.Delay=15000
;Set.Alpha.End=256
;Set.Alpha.Start=256
;Set.Alpha.Step=-300
;Set.Font.Bold=0
;Set.Font.Color=#EEF4FB
;Set.Font.Outline.Color=#00101010
;Set.Font.Outline2.Color=#01101010
;Set.Font.Size=9
;Set.Font.Face=№ЩЕБ
;Buffer.Push=1
;Buffer.Pop=1
;Set.Time.Start=18352
;Set.Start.Position.x=117
;Set.End.Position.x=117
;Set.Start.Position.y=203
;Set.End.Position.y=203
;Set.Start.Position.x=117
;Set.End.Position.x=117
;Set.Start.Position.y=203
;Set.End.Position.y=203
 
;(ї¬°бµК)
;Set.Start.Position.x=164
;Set.End.Position.x=164
;Set.Start.Position.y=203
;Set.End.Position.y=203
;Set.Start.Position.x=164
;Set.End.Position.x=164
;Set.Start.Position.y=203
;Set.End.Position.y=203
Long, long ago,
;Set.Start.Position.x=160
;Set.End.Position.x=160
;Set.Start.Position.y=221
;Set.End.Position.y=221
;Set.Start.Position.x=160
;Set.End.Position.x=160
;Set.Start.Position.y=221
;Set.End.Position.y=221


Ihrie! Hey, lhrie!
;Set.Start.Position.x=160
;Set.End.Position.x=160
;Set.Start.Position.y=203
;Set.End.Position.y=203
;Set.Start.Position.x=160
;Set.End.Position.x=160
;Set.Start.Position.y=203
;Set.End.Position.y=203
;Set.Start.Position.x=160
;Set.End.Position.x=160
;Set.Start.Position.y=221
;Set.End.Position.y=221
;Set.Start.Position.x=160
;Set.End.Position.x=160
;Set.Start.Position.y=221
;Set.End.Position.y=221
What is it, Fam?
</pre>


=SMI - SAMI=
=SMI - SAMI=
Line 281: Line 406:
The SubRip file format is "perhaps the most basic of all subtitle formats." SubRip files are named with the extension .srt, and contain formatted plain text. The time format used is hours:minutes:seconds,milliseconds. The decimal separator used is the comma, since the program was written in France. The line break used is often the CR+LF pair. Subtitles are numbered sequentially, starting at 1. The sections must appear in numbered order in the file, and must also be sorted on start-time. Two sections can not overlap time-wise.  
The SubRip file format is "perhaps the most basic of all subtitle formats." SubRip files are named with the extension .srt, and contain formatted plain text. The time format used is hours:minutes:seconds,milliseconds. The decimal separator used is the comma, since the program was written in France. The line break used is often the CR+LF pair. Subtitles are numbered sequentially, starting at 1. The sections must appear in numbered order in the file, and must also be sorted on start-time. Two sections can not overlap time-wise.  


<pre>Subtitle number
<pre>Subtitle index number
Start time --> End time
Start time --> End time
Text of subtitle (one or more lines)
Text of subtitle (one or more lines)
Blank line</pre>
Blank line</pre>


Three override tags are supported: Bold, Italics and Underline. They use the common HTML-style tag pairs <b>bold</b>, <i>italics</i> and <u>underline</u>.
Three override tags are supported: Bold, Italics and Underline. They use the common HTML-style tag pairs &lt;b&gt;bold&lt;/b&gt;, &lt;i&gt;italics&lt;/i&gt; and &lt;u&gt;underline&lt;/u&gt;.
Changing the font color with &lt;font color="#ff0000"&gt;&lt;/font&gt; or the font size with &lt;font size="35"&gt;&lt;/font&gt; is also possible but not supported by many players.
 
A feature of SubRip files that is supported by almost no players is the positioning of subtitles:
 
<pre>Subtitle index number
Start time --> End time  X1:Position left X2:Position right Y1:Position up Y2:Position down
Text of subtitle (one or more lines)
Blank line</pre>


===Example===
===Example===
Line 296: Line 429:
00:00:24,600 --> 00:00:27,800
00:00:24,600 --> 00:00:27,800
and twenty thousand feet above ground level.</pre>
and twenty thousand feet above ground level.</pre>
<pre>1
00:00:02,001 --> 00:00:16,001  X1:000 X2:000 Y1:050 Y2:100
Let us have some! Let us have some!</pre>




Line 308: Line 445:


===Format specifications===
===Format specifications===
Format specifications:  
Format specifications: http://moodub.free.fr/video/ass-specs.doc


A file consists of 4 or 5 parts, declared ala INI file (but it's not an INI !)
A file consists of 4 or 5 sections, declared ala INI file (but it's not an INI!)


The first, "[Script Info]" contains some information about the subtitle file, such as it's title, who created it, type of script and a very important one : "PlayResY". Be carefull of this value, everything in your script (font size, positioning) is scaled by it. Sub Station Alpha uses your desktops Y resolution to write this value, so if a friend with a large monitor and a high screen resolution gives you an edited script, you can mess everything up by saving the script in SSA with your low-cost monitor.
The first section, "[Script Info]" contains some information about the subtitle file, such as its title and author, the type of script and a very important field: "PlayResY". Be careful of this value, everything in your script (font size, positioning) is scaled by it. Sub Station Alpha uses your desktop's Y resolution to write this value, so if a friend with a large monitor and a high screen resolution gives you an edited script, you can mess everything up by saving the script in SSA with your low-cost monitor.


The second, "[V4 Styles]", is a list of style definitions. A style describe how will look a text on the screen. It defines font, font size, primary/.../outile colour, position, aligment etc ...
The second section, "[V4 Styles]", is a list of style definitions. A style describes how text will look on the screen. It defines the font, font size, primary/.../outile colour, position, alignment etc.


For example this :
For example:


<pre>Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, TertiaryColour, BackColour, Bold, Italic, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, AlphaLevel, Encoding
<pre>Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, TertiaryColour, BackColour, Bold, Italic, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, AlphaLevel, Encoding
Style: Wolf main,Wolf_Rain,56,15724527,15724527,15724527,4144959,0,0,1,1,2,2,5,5,30,0,0</pre>
Style: Wolf main,Wolf_Rain,56,15724527,15724527,15724527,4144959,0,0,1,1,2,2,5,5,30,0,0</pre>


The third, "[Events]", is the list of text you want to display at the right timing. You can specify some attribute here. Like the style to use for this event (must be defined in the list), the position of the text (Left, Right, Vertical Margin), an effect. Name is mostly used by translator to know who said this sentence. Timing is in h:mm:ss.cc (centisec).
The third section, "[Events]", is the list of text you want to display at the right time. You can specify some attributes here, like the style to use for each event (must be defined in the style list), the position of the text (Left, Right, Vertical Margin), and an effect. Name is mostly used by translator to know who said each sentence. Times are given as h:mm:ss.cc (centiseconds).


<pre>Format: Marked, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
<pre>Format: Marked, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
Line 327: Line 464:
Dialogue: Marked=0,0:02:42.42,0:02:44.15,Wolf main,autre,0000,0000,0000,,Toujours rien.</pre>
Dialogue: Marked=0,0:02:42.42,0:02:44.15,Wolf main,autre,0000,0000,0000,,Toujours rien.</pre>


"[Pictures]" or "[Fonts]" part can be found in some SSA file, they contains UUE-encoded pictures/font but those features are only used by Sub Station Alpha, i.e. no filter (Vobsub/Avery Lee Subtiler filter) use them.
A "[Fonts]" section can be found in some SSA files. It contains uuencoded fonts. Most software supports it (including VSFilter and libass), but alternative distribution methods such as MKV attachments are safer.
 
The format also supports a "[Graphics]" section with uuencoded files and Picture, Sound, Movie and Command event lines in the "[Events]" section, but these features are only supported by Sub Station Alpha itself, and no standalone renderer (VSFilter, libass, Avery Lee's Subtiler filter) supports them.


===Example===
===Example===
Line 351: Line 490:
Dialogue: Marked=0,0:00:01.18,0:00:06.85,DefaultVCD, NTP,0000,0000,0000,,{\pos(400,570)}Like an angel with pity on nobody
Dialogue: Marked=0,0:00:01.18,0:00:06.85,DefaultVCD, NTP,0000,0000,0000,,{\pos(400,570)}Like an angel with pity on nobody
</pre>
</pre>
=STL - Spruce Subtitle Format=
Official website: http://www.reocities.com/mcpoodle43/DVDMaestro/stl_format.html
Wikipedia:
===What is STL===
The Spruce Subtitle format (extension .stl) was designed specifically for DVDMaestro.
===Format specifications===
Format specifications:
===Example===




Line 418: Line 571:


===Example===
===Example===
<pre>
[INFORMATION] Пожалуйста спаси мою землю
[AUTHOR] Silvan Elf
[SOURCE] Please Save My Earth.
[PRG] 1
[FILEPATH]
[DELAY]
[CD TRACK] 1
[COMMENT]  Перевод с английского.
[END INFORMATION]
[SUBTITLE]
[COLF]&HFFFFFF,[STYLE]no,[SIZE]18,[FONT]Arial
00:00:19.49,00:00:21.55
Хочу домой.
00:00:22.66,00:00:25.75
Я раньше никогда не была в месте [br]Где воздух такой...
00:00:26.66,00:00:28.13
грязный.


00:59:07.21,00:59:08.84
Я хочу поговорить с тобой.


00:59:08.91,00:59:10.11
Так ты умеешь летать, верно?
</pre>


==SUB - VobSub==
==SUB - VobSub==
Line 439: Line 618:
Wikipedia:  
Wikipedia:  


===What is ?===
===What is TMP===
===Format specifications===
===Format specifications===
Format specifications:  
Format specifications:  
Line 494: Line 673:


=TXT=
=TXT=
==TXT - QTtext==
Official website:  
Official website:  


Line 503: Line 683:


===Example===
===Example===
<pre>
{QTtext}{font: Arial}{justify: center}{size:  12}{backcolor:0, 0, 0}
{timescale: 100}{width: 439}{height: 0}
[00:00:05.71]
{justify:center}README.TXT for MAGpie
[00:00:07.03]
{justify:center}Please read this entire document before installing MAGpie.
[00:00:14.98]
{justify:center}*****************
MAGpie 1.0
*****************
[00:00:15.99]
{justify:center}-- SYSTEM REQUIREMENTS
[00:00:16.83]
{justify:center}1. Windows95/98
[00:00:18.43]
{justify:center}2. Microsoft Internet Explorer 4 or higher (http://www.microsoft.com)
</pre>
=USF (Universal Subtitle Format)=
Official website:
Wikipedia: https://en.wikipedia.org/wiki/Universal_Subtitle_Format
===What is Universal Subtitle Format===
Universal Subtitle Format (USF) is a CoreCodec project to create a clean, documented, powerful and easy to use subtitle file format. It is based on XML for flexibility, unicode support, hierarchical system, and ease of administration.
USF subtitles are usually used in Matroska containers.
===Format specifications===
Format specifications:
===Example===
=WebVTT=
Official website:
Wikipedia: https://en.wikipedia.org/wiki/WebVTT
===What is WebVTT===
WebVTT (Web Video Text Tracks) is a W3C standard for displaying timed text in connection with the HTML5 <nowiki><track></nowiki> element.
===Format specifications===
Format specifications:
===Example===
<pre>
WEBVTT
00:11.000 --> 00:13.000
<v Roger Bingham>We are in New York City
00:13.000 --> 00:16.000
<v Roger Bingham>We're actually at the Lucern Hotel, just down the street
00:16.000 --> 00:18.000
<v Roger Bingham>from the American Museum of Natural History
00:18.000 --> 00:20.000
<v Roger Bingham>And with me is Neil deGrasse Tyson
00:20.000 --> 00:22.000
<v Roger Bingham>Astrophysicist, Director of the Hayden Planetarium
00:22.000 --> 00:24.000
<v Roger Bingham>at the AMNH.
00:24.000 --> 00:26.000
<v Roger Bingham>Thank you for walking down here.
00:27.000 --> 00:30.000
<v Roger Bingham>And I want to do a follow-up on the last conversation we did.
00:30.000 --> 00:31.500 align:end size:50%
<v Roger Bingham>When we e-mailed—
00:30.500 --> 00:32.500 align:start size:50%
<v Neil deGrasse Tyson>Didn't we talk about enough in that conversation?
00:32.000 --> 00:35.500 align:end size:50%
<v Roger Bingham>No! No no no no; 'cos 'cos obviously 'cos
00:32.500 --> 00:33.500 align:start size:50%
<v Neil deGrasse Tyson><i>Laughs</i>
00:35.500 --> 00:38.000
<v Roger Bingham>You know I'm so excited my glasses are falling off here.
</pre>




Line 518: Line 792:
The format is mostly a variation of ASS, and XombieSub and ASS files are much alike.  
The format is mostly a variation of ASS, and XombieSub and ASS files are much alike.  


===Format specifications===
Format specifications:
===Example===
=ZEG - ZeroG=
Official website:
Wikipedia:
===What is ?===
===Format specifications===
===Format specifications===
Format specifications:  
Format specifications:  


===Example===
===Example===
5

edits

Navigation menu

MediaWiki spam blocked by CleanTalk.
MediaWiki spam blocked by CleanTalk.