Difference between revisions of "SubViewer"

From VideoLAN Wiki
Jump to navigation Jump to search
m (Sections)
m (Format)
Line 6: Line 6:
 
===SubViewer 1===
 
===SubViewer 1===
 
A sample SubViewer document may look like;
 
A sample SubViewer document may look like;
:[INFORMATION] <-- beginning of optional info section, closing tag required<br>
+
<pre>
:[TITLE] Title of film.<br>
+
[INFORMATION] <-- beginning of optional info section, closing tag required
:[AUTHOR] Author of film.<br>
+
[TITLE] Title of film.
:[SOURCE] Arbitrary text<br>
+
[AUTHOR] Author of film.
:[FILEPATH] Arbitrary text<br>
+
[SOURCE] Arbitrary text
:[DELAY]    (time in frames to delay all subtitles<br>
+
[FILEPATH] Arbitrary text
:[COMMENT]  Arbitrary text<br>
+
[DELAY]    (time in frames to delay all subtitles
:[END INFORMATION]<br>
+
[COMMENT]  Arbitrary text
:[SUBTITLE]  <-- beginning of subtitle section, no closing tag required.<br>
+
[END INFORMATION]
:[COLF]&HFFFFFF,[SIZE]12,[FONT]Times New Roman<br>
+
[SUBTITLE]  <-- beginning of subtitle section, no closing tag required.
:00:01:00.10,00:02:00.20<br>
+
[COLF]&HFFFFFF,[SIZE]12,[FONT]Times New Roman
:Oh, no.<br>
+
00:01:00.10,00:02:00.20
:The eggs are hatching!<br>
+
Oh, no.
:<blank line><br>
+
The eggs are hatching!
:00:02:00.30,00:03:00.40<br>
+
<blank line>
:No, never mind, I was hallucinating.<br>
+
00:02:00.30,00:03:00.40
 
+
No, never mind, I was hallucinating.
 +
</pre>
  
 
===SubViewer 2===
 
===SubViewer 2===
In SubViewer 2.0 format, the whole subtitle is written on one line, with line breaks indicated by [br], as follows:
+
In SubViewer 2.0 format, the whole subtitle is written on one line, with line breaks indicated by <code>[br]</code>, as follows:
 
+
<pre>
:00:01:00.10,00:02:00.20<br>
+
00:01:00.10,00:02:00.20
:Oh, no.[br]The eggs are hatching!<br>
+
Oh, no.[br]The eggs are hatching!
 
+
</pre>
  
 
==References==
 
==References==

Revision as of 06:10, 6 April 2019

SubViewer is a file format for storing subtitles. It may have the file extension .sub.

Specification

SubViewer 1

A sample SubViewer document may look like;

[INFORMATION] <-- beginning of optional info section, closing tag required
[TITLE] Title of film.
[AUTHOR] Author of film.
[SOURCE] Arbitrary text
[FILEPATH] Arbitrary text
[DELAY]    (time in frames to delay all subtitles
[COMMENT]  Arbitrary text
[END INFORMATION]
[SUBTITLE]   <-- beginning of subtitle section, no closing tag required.
[COLF]&HFFFFFF,[SIZE]12,[FONT]Times New Roman
00:01:00.10,00:02:00.20
Oh, no.
The eggs are hatching!
<blank line>
00:02:00.30,00:03:00.40
No, never mind, I was hallucinating.

SubViewer 2

In SubViewer 2.0 format, the whole subtitle is written on one line, with line breaks indicated by [br], as follows:

00:01:00.10,00:02:00.20
Oh, no.[br]The eggs are hatching!

References

Divxstation article by Stachken