<html>
<head>
<!--- Translation from RTF performed by UnRTF, version 0.18.1 --->
<!--- For information about this marvellous program, --->
<!--- please go to http://www.geocities.com/tuorfa --->
<!--- document uses ANSI character set --->
<!--- font table contains 2 fonts total --->
<!--author: Kotus--->
<!--- creaton date: 30 August 1998 23:30 --->
<!--- revision date: 18 December 1998 13:13 --->
<!--- total pages: 18 --->
<!--- total words: 4155 --->
<!--- total chars: 23686 --->
</head>
<body><font face="Times New Roman"><font size=2><center></font></font><font face="Times New Roman"><font size=2><b><font face="Arial"><span style="font-size:16pt">Sub Station Alpha v4.00 Script Format<br>
</span></font></b></font></font><font face="Times New Roman"><font size=2></font></font></center>
<b><font face="Arial"><br>
<br>
</font></b><b><font face="Arial"></font></b><b><font face="Arial"><font size=2>1.
</font></font></b><b><font face="Arial"></font></b><b><font face="Arial">General information<br>
</font></b><b><font face="Arial"></font></b><b><font face="Arial"><font size=2>2.
</font></font></b><b><font face="Arial">The [sections] of a Sub Station Alpha script<br>
</font></b><b><font face="Arial"></font></b><b><font face="Arial"><font size=2>3.
</font></font></b><b><font face="Arial">The line types in a Sub Station Alpha script<br>
</font></b><b><font face="Arial"></font></b><b><font face="Arial"><font size=2>4.
</font></font></b><b><font face="Arial">Header lines, [Script Info] section<br>
</font></b><b><font face="Arial"></font></b><b><font face="Arial"><font size=2>5.
</font></font></b><b><font face="Arial">Style lines, [v4 Styles] section<br>
</font></b><b><font face="Arial"></font></b><b><font face="Arial"><font size=2>6.
</font></font></b><b><font face="Arial">Dialogue event lines, [Events] section<br>
</font></b><b><font face="Arial"></font></b><b><font face="Arial"><font size=2>7.
</font></font></b><b><font face="Arial">Comment lines, [Events] section<br>
</font></b><b><font face="Arial"></font></b><b><font face="Arial"><font size=2>8.
</font></font></b><b><font face="Arial">Picture event lines, [Events] section<br>
</font></b><b><font face="Arial"></font></b><b><font face="Arial"><font size=2>9.
</font></font></b><b><font face="Arial">Movie event line, [Events] section<br>
</font></b><b><font face="Arial"></font></b><b><font face="Arial"><font size=2>10.
</font></font></b><b><font face="Arial">Sound event lines, [Events] section<br>
</font></b><b><font face="Arial"></font></b><b><font face="Arial"><font size=2>11.
</font></font></b><b><font face="Arial">Command event lines, [Events] section<br>
</font></b><font face="Arial"><br>
</font><b><font face="Arial">Appendix A: Style override codes<br>
Appendix B: Embedded font/picture encoding<br>
</font></b><font face="Arial"><br>
</font><center><b><font face="Arial"><font size=3><u><p><hr><p>
1. General Information</u></font></font></b><b><font face="Arial"><font size=3><br>
</font></font></b><font face="Arial"><br>
</font></center>
<font face="Arial">The information in this document assumes that you are familiar with the terms and concepts used by Sub Station Alpha (SSA). These are documented in SSA's help file, ssa.hlp which is distributed with the program, or can be downloaded separatelyfrom http://www.eswat.demon.co.uk.<br>
<br>
</font><font face="Arial"></font><b><font face="Arial"><font size=2>1.
</font></font></b><font face="Arial"></font><b><font face="Arial">The SSA v4.00 script format is different to previous versions of SSA<br>
</font></b><font face="Arial">SSA v4.00 will read scripts from older versions, but v4.00 scripts will not load into older versions of SSA correctly.<br>
<br>
Some of the changes in the script format are intended to allow all versions of SSA from v4.00 onwards to read any present or future SSA scripts. In particular, the new "Format" lines allow SSA to read only the information it recognises and discard any new information that is added in future scripts.<br>
</font><b><font face="Arial"><br>
</font></b><b><font face="Arial"></font></b><b><font face="Arial"><font size=2>2.
</font></font></b><b><font face="Arial">Scripts are plain (DOS) text files.<br>
</font></b><font face="Arial">This means they can be "manually" editied using any text editor, but caution must be exercised when doing this - SSA assumes that scripts will adhere to the "rules" set out in this document, and any errors may lead to unpredictable results when the script is loaded into SSA.</font><b><font face="Arial"><br>
</font></b><font face="Arial"><br>
</font><font face="Arial"></font><b><font face="Arial"><font size=2>2.
</font></font></b><font face="Arial"></font><b><font face="Arial">The script is divided into ``ini file'' style sections<br>
</font></b><font face="Arial">However, SSA scripts are not true Windows .ini files and you cannot do certain things you might expect!<br>
<br>
</font><font face="Arial"></font><b><font face="Arial"><font size=2>3.
</font></font></b><font face="Arial"></font><b><font face="Arial">Most lines in each section begin with some sort of code - a "line descriptor"</font></b><font face="Arial">, to say what information is held in it. The descriptor is terminated by a colon.<br>
</font><font face="Arial"><br>
</font><b><font face="Arial">3.
The information fields in each line are separated by a commas.<br>
</font></b><font face="Arial">
This makes it illegal to use commas in character names and style names (SSA prevents you putting commas in these). It also makes it quite easy to load chunks of an SSA script into a spreadsheet as a CSV file, and chop out columns of information you need for another subtitling program.<br>
<br>
</font><b><font face="Arial">4.
SSA does not care what order events are entered in.<br>
</font></b><font face="Arial">
They could be entered in complete reverse order, and SSA would still play everything correctly in the right order ie. you cannot assume that each dialogue line is in chronological order in the script file.<br>
</font><font face="Arial"><br>
</font><b><font face="Arial">5.
Incorrectly formatted lines are ignored.<br>
</font></b><font face="Arial">SSA will discard any lines it doesn't understand, and give a warning after the script has loaded giving the number of lines it discarded.<br>
</font><font face="Arial"><br>
</font><b><font face="Arial">6.
Lines cannot be split<br>
</font></b><font face="Arial">
Each entry in a script contains all its information in a single line.<br>
</font><font face="Arial"><br>
</font><b><font face="Arial">7.
If unknown styles are used in the script, the *Default style will be used.<br>
</font></b><font face="Arial">
For example, if lines have been pasted in from another script, without the corresponding Style information then when SSA plays the script, the Default style settings will be used.<br>
</font><font face="Arial"><br>
</font><b><font face="Arial">8.
If a Style specifies a font which is not installed, then Arial will be used instead.<br>
</font></b><font face="Arial">
This can happen with scripts which you did not create yourself - the original authors may have fonts installed which you don't have.<br>
<br>
</font><center><b><font face="Arial"><font size=3><u><p><hr><p>
2. The sections in a Sub Station Alpha script<br>
<br>
</u></font></font></b></center>
<b><font face="Arial">[Script Info]<br>
</font></b><font face="Arial">This section contains headers and general information about the script.<br>
The line that says ``[Script Info]'' </font><b><font face="Arial">must</font></b><font face="Arial"> be the first line in a v4 script.<br>
<br>
</font><b><font face="Arial">[v4 Styles]<br>
</font></b><font face="Arial">This section contains all Style definitions required by the script. Each ``Style'' used by subtitles in the script should be defined here.<br>
<br>
</font><b><font face="Arial">[Events]<br>
</font></b><font face="Arial">This section contains all the events for the script - all the subtitles, comments, pictures, sounds, movies and commands. Basically, everything that you see in Sub Station Alpha's main-screen ``grid'' is in this section.<br>
<br>
</font><b><font face="Arial">[Fonts]<br>
</font></b><font face="Arial">This section contains text-encoded font files, if the user opted to embed non-standard fonts in the script. Only truetype fonts can be embedded in SSA scripts. Each font file is started with a single line in the format:<br>
<br>
</font><b><font face="Arial">fontname: <name of file><br>
</font></b><font face="Arial"><br>
The word ``</font><b><font face="Arial">fontname</font></b><font face="Arial">'' must be in lower case (upper case will be interpretted as part of a text-encoded file). </font><b><font face="Arial"><br>
</font></b><font face="Arial"><br>
</font><b><font face="Arial"><name of file></font></b><font face="Arial"> is the file name that SSA will use when saving the font file. It is:<br>
the name of the original truetype font,<br>
plus an underscore,<br>
plus an optional ``B'' if Bold,<br>
plus an optional ``I'' if Italic,<br>
plus a number specifying the font encoding (character set),<br>
plus ``.ttf''<br>
Eg.<br>
fontname: chaucer_B0.ttf<br>
fontname: comic_0.ttf<br>
<br>
The fontname line is followed by lines of printable characters, representing the binary values which make up the font file. Each line is 80 characters long, except the last one which may be less.<br>
<br>
The conversion from binary to printable characters is a form of Uuencoding, the details of this encoding is contained in "Appendix B", below.<br>
<br>
</font><b><font face="Arial">[Graphics]<br>
</font></b><font face="Arial">This sections contains text-encoded graphic files, if the user opted to embed any pictures they used in the script. The binary picture files are text-encoded, which is inefficient, but ensures that SSA scripts can still be handled by any text editor, if required.<br>
<br>
Each graphic file is started with a single line in the format:<br>
</font><b><font face="Arial">filename: <name of file></font></b><font face="Arial"><br>
<br>
The word ``</font><b><font face="Arial">filename</font></b><font face="Arial">'' must be in lower case (upper case will be interpreted as part of a text-encoded file). <br>
<br>
</font><b><font face="Arial"><name of file></font></b><font face="Arial"> is the file name that SSA will use when saving the picture file. It will match the filename of a picture used in the script.<br>
<br>
SSA saves any files found in the script in a subdirectory off SSA's program directory, "Pictures"<br>
eg. c:program filesSub Station Alpha v4.00Pictures. SSA will attempt to load files using the paths specified in the script, but if they are not found, it will look in the "Pictures" subdirectory for them.<br>
<br>
The fontname line is followed by lines of printable characters, fontrepresenting the binary values which make up the picture font file - format is as per embedded font files.<br>
</font><center><font face="Arial"><p><hr><p>
</font><b><font face="Arial"><font size=3><u>3. The line types in a Sub Station Alpha script<br>
</u></font></font></b><font face="Arial"><br>
</font></center>
<font face="Arial"><br>
This briefly describes each of the line types that can appear in a Sub Station Alpha Script. Full details of the information held in each line type is in the next chapter.<br>
<br>
</font><b><font face="Arial">!:</font></b><font face="Arial">
This is a comment used in the script file only. It is not visible when you load the script into SSA.<br>
</font><font face="Arial"><br>
</font><b><font face="Arial">Title:</font></b><font face="Arial">
This is a description of the script<br>
<br>
</font><b><font face="Arial">Original Script:</font></b><font face="Arial">
The original author(s) of the script<br>
<br>
</font><b><font face="Arial">Original Translation:
</font></b><font face="Arial">(optional) The original translator of the dialogue<br>
<br>
</font><b><font face="Arial">Original Editing:
</font></b><font face="Arial">(optional) The original script editor(s), typically whoever took the raw translation and turned it into idiomatic english and reworded for readability.<br>
<br>
</font><b><font face="Arial">Original Timing:</font></b><font face="Arial">
(optional) Whoever timed the original script<br>
<br>
</font><b><font face="Arial">Synch Point:</font></b><font face="Arial">
(optional) Description of where in the video the script should begin playback.<br>
</font><font face="Arial"><br>
</font><b><font face="Arial">Script Updated By:</font></b><font face="Arial">
(optional) Names of any other subtitling groups who edited the original script.<br>
<br>
</font><b><font face="Arial">Update Details:</font></b><font face="Arial">
The details of any updates to the original script made by other subtilting groups.<br>
</font><b><font face="Arial"><br>
ScriptType:</font></b><font face="Arial">
This is the SSA script format version eg. "V3.00".<br>
<br>
</font><b><font face="Arial">Collisions:</font></b><font face="Arial">
This determines how subtitles are moved, when preventing onscreen collisions<br>
<br>
</font><b><font face="Arial">PlayResY:</font></b><font face="Arial">
This is the height of the screen used by the authors when playing the script.<br>
<br>
</font><b><font face="Arial">PlayResX:</font></b><font face="Arial">
This is the width of the screen used by the authors when playing the script.<br>
</font><font face="Arial"><br>
</font><b><font face="Arial">PlayDepth:
</font></b><font face="Arial">This is the colour depth used by the authors when playing the script.<br>
</font><font face="Arial"><br>
</font><b><font face="Arial">Timer:</font></b><font face="Arial">
This is the Timer Speed for the script, as a percentage.<br>
eg. "100.0000" is exactly 100%.<br>
<br>
The timer speed is a time multiplier applied to SSA's clock to provide a ramp time.<br>
</font><font face="Arial"><br>
</font><b><font face="Arial">Style:</font></b><font face="Arial">
This is a Style definition, used to format text displayed by the script.<br>
</font><font face="Arial"><br>
</font><b><font face="Arial">Dialogue:</font></b><font face="Arial">
This is a Dialogue event, ie. Some text to display.<br>
<br>
</font><b><font face="Arial">Comment:</font></b><font face="Arial">
This is a "comment" event.<br>
This contains the same information as a Dialogue, Picture, Sound, Movie, or Command event, but it is ignored during script playback.<br>
</font><font face="Arial"><br>
</font><b><font face="Arial">Picture:</font></b><font face="Arial">
This is a "picture" event, which means SSA will display the specified .bmp, .jpg, .gif, .ico or .wmf graphic.<br>
</font><font face="Arial"><br>
</font><b><font face="Arial">Sound:</font></b><font face="Arial">
This is a "sound" event, which means SSA will play the specified .wav file.<br>
<br>
</font><b><font face="Arial">Movie:</font></b><font face="Arial">
This is a "movie" event, which means SSA will play the specified .avi file.<br>
</font><font face="Arial"><br>
</font><b><font face="Arial">Command:</font></b><font face="Arial">
This is a "command" event, which means SSA will execute the specified program as a background task.<br>
</font><font face="Arial"><br>
</font><center><b><font face="Arial"><font size=3><u><p><hr><p>
4. Header lines, [Script Info] section<br>
<br>
</u></font></font></b></center>
<b><font face="Arial">;</font></b><font face="Arial">
Semicolon. Any text can follow the semicolon</font><b><font face="Arial"><br>
</font></b><font face="Arial">
This is a comment used in the script file only. It is not visible when you load the script into SSA. The semicolon </font><b><font face="Arial">must</font></b><font face="Arial"> be the first character in the line. This replaces the </font><b><font face="Arial">!:</font></b><font face="Arial"> line type used in previous script versions.<br>
</font><font face="Arial"><br>
</font><b><font face="Arial">Title:</font></b><font face="Arial">
This is a description of the script. If the original author(s) did not provide this information then <untitled> is automatically substituted.<br>
<br>
</font><b><font face="Arial">Original Script:</font></b><font face="Arial">
The original author(s) of the script. If the original author(s) did not provide this information then <unknown> is automatically substituted.<br>
</font><font face="Arial"><br>
</font><b><font face="Arial">Original Translation:
</font></b><font face="Arial">(optional) The original translator of the dialogue. This entry does not appear if no information was entered by the author.<br>
</font><font face="Arial"><br>
</font><b><font face="Arial">Original Editing:
</font></b><font face="Arial">(optional) The original script editor(s), typically whoever took the raw translation and turned it into idiomatic english and reworded for readability. This entry does not appear if no information was entered by the author.<br>
<br>
</font><b><font face="Arial">Original Timing:</font></b><font face="Arial">
(optional) Whoever timed the original script. This entry does not appear if no information was entered by the author.<br>
</font><font face="Arial"><br>
</font><b><font face="Arial">Synch Point:</font></b><font face="Arial">
(optional) Description of where in the video the script should begin playback. This entry does not appear if no information was entered by the author.<br>
</font><font face="Arial"><br>
</font><b><font face="Arial">Script Updated By:</font></b><font face="Arial">
(optional) Names of any other subtitling groups who edited the original script. This entry does not appear if subsequent editors did not enter the information.<br>
<br>
</font><b><font face="Arial">Update Details:</font></b><font face="Arial">
The details of any updates to the original script - made by other subtitling groups. This entry does not appear if subsequent editors did not enter any information.<br>
</font><b><font face="Arial"><br>
ScriptType:</font></b><font face="Arial">
This is the SSA script format version eg. "V4.00". It is used by SSA to give a warning if you are using a version of SSA older than the version that created the script.<br>
<br>
</font><b><font face="Arial">Collisions:</font></b><font face="Arial">
This determines how subtitles are moved, when automatically preventing onscreen collisions.<br>
<br>
If the entry says "</font><b><font face="Arial">Normal</font></b><font face="Arial">" then SSA will attempt to position subtitles in the position specified by the "margins". However, subtitles can be shifted vertically to prevent onscreen collisions. With "normal" collision prevention, the subtitles will "stack up" one above the other - but they will always be positioned as close the vertical (bottom) margin as possible - filling in "gaps" in other subtitles if one large enough is available.<br>
<br>
If the entry says "</font><b><font face="Arial">Reverse</font></b><font face="Arial">" then subtitles will be shifted upwards to make room for subsequent overlapping subtitles. This means the subtitles can nearly always be read top-down - but it also means that the first subtitle can appear half way up the screen before the subsequent overlapping subtitles appear. It can use a lot of screen area.<br>
<br>
</font><b><font face="Arial">PlayResY:</font></b><font face="Arial">
This is the height of the screen used by the script's author(s) when playing the script. SSA v4 will automatically select the nearest enabled setting, if you are using Directdraw playback.<br>
<br>
</font><b><font face="Arial">PlayResX:</font></b><font face="Arial">
This is the width of the screen used by the script's author(s) when playing the script. SSA will automatically select the nearest enabled, setting if you are using Directdraw playback.<br>
</font><font face="Arial"><br>
</font><b><font face="Arial">PlayDepth:
</font></b><font face="Arial">This is the colour depth used by the script's author(s) when playing the script. SSA will automatically select the nearest enabled setting if you are using Directdraw playback.<br>
</font><font face="Arial"><br>
</font><b><font face="Arial">Timer:</font></b><font face="Arial">
This is the Timer Speed for the script, as a percentage.<br>
eg. "100.0000" is exactly 100%. It has four digits following the decimal point.<br>
<br>
The timer speed is a time multiplier applied to SSA's clock to stretch or compress the duration of a script. A speed greater than 100% will reduce the overall duration, and means that subtitles will progressively appear sooner and sooner. A speed less than 100% will increase the overall duration of the script means subtitles will progressively appear later and later (like a positive ramp time).<br>
<br>
The stretching or compressing only occurs during script playback - this value does not change the actual timings for each event listed in the script.<br>
<br>
Check the SSA user guide if you want to know why "Timer Speed" is more powerful than "Ramp Time", even though they both achieve the same result.<br>
</font><font face="Arial"><br>
</font><center><b><font face="Arial"><font size=3><u><p><hr><p>
5. Style Lines, [v4 Styles] section</u></font></font></b><font face="Arial"><br>
</font></center>
<font face="Arial"><br>
Styles define the appearance and position of subtitles. All styles used by the script are are defined by a Style line in the script.<br>
<br>
Any of the the settings in the Style, (except shadow/outline type and depth) can overridden by control codes in the subtitle text.<br>
<br>
The fields which appear in each Style definition line are named in a special line with the line type ``Format:''. The Format line must appear before any Styles - because it defines how SSA will interpret the Style definition lines. The field names listed in the format line must be correctly spelled! The fields are as follows:<br>
</font><b><font face="Arial"><br>
Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, TertiaryColour, BackColour, Bold, Italic, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, AlphaLevel, Encoding<br>
</font></b><font face="Arial"><br>
The format line allows new fields to be added to the script format in future, and yet allow old versions of the software to read the fields it recognises - even if the field order is changed.<br>
<br>
Field 1:
</font><b><font face="Arial">Name</font></b><font face="Arial">. The name of the Style. Case sensitive. Cannot include commas.<br>
<br>
Field 2:
</font><b><font face="Arial">Fontname</font></b><font face="Arial">. The fontname as used by Windows. Case-sensitive.<br>
<br>
Field 3:
</font><b><font face="Arial">Fontsize</font></b><font face="Arial">.<br>
<br>
</font><font face="Arial">Field 4:
</font><b><font face="Arial">PrimaryColour.</font></b><font face="Arial"> A long integer BGR (blue-green-red) value. ie. the byte order in the hexadecimal equivelent of this number is BBGGRR<br>
<br>
This is the colour that a subtitle will normally appear in.<br>
</font><font face="Arial"><br>
</font><font face="Arial">Field 5:
</font><b><font face="Arial">SecondaryColour.</font></b><font face="Arial"> A long integer BGR (blue-green-red) value. ie. the byte order in the hexadecimal equivelent of this number is BBGGRR<br>
<br>
This colour may be used instead of the Primary colour when a subtitle is automatically shifted to prevent an onscreen collsion, to distinguish the different subtitles.<br>
</font><font face="Arial"><br>
</font><font face="Arial">Field 6:
</font><b><font face="Arial">TertiaryColour</font></b><font face="Arial">. A long integer BGR (blue-green-red) value. ie. the byte order in the hexadecimal equivelent of this number is BBGGRR<br>
<br>
This colour may be used instead of the Primary or Secondary colour when a subtitle is automatically shifted to prevent an onscreen collsion, to distinguish the different subtitles.<br>
</font><font face="Arial"><br>
</font><font face="Arial">Field 7:
</font><b><font face="Arial">BackColour</font></b><font face="Arial">. This is the colour of the subtitle outline or shadow, if these are used. A long integer BGR (blue-green-red) value. ie. the byte order in the hexadecimal equivelent of this number is BBGGRR.<br>
</font><font face="Arial"><br>
</font><font face="Arial">Field 8:
</font><b><font face="Arial">Bold</font></b><font face="Arial">. This defines whether text is bold (true) or not (false). -1 is True, 0 is False. This is independant of the Italic attribute - you can have have text which is both bold and italic.<br>
</font><font face="Arial"><br>
</font><font face="Arial">Field 9:
</font><b><font face="Arial">Italic</font></b><font face="Arial">. This defines whether text is italic (true) or not (false). -1 is True, 0 is False. This is independant of the bold attribute - you can have have text which is both bold and italic.<br>
</font><font face="Arial"><br>
Field 10:
</font><b><font face="Arial">BorderStyle</font></b><font face="Arial">. 1=Outline + drop shadow, 3=Opaque box<br>
<br>
</font><font face="Arial">Field 11:
</font><b><font face="Arial">Outline.</font></b><font face="Arial"> If BorderStyle is 1, then this specifies the width of the outline around the text, in pixels.<br>
Values may be 0, 1, 2, 3 or 4. <br>
</font><font face="Arial"><br>
</font><font face="Arial">Field 12:
</font><b><font face="Arial">Shadow.</font></b><font face="Arial"> If BorderStyle is 1, then this specifies the depth of the drop shadow behind the text, in pixels. Values may be 0, 1, 2, 3 or 4. Drop shadow is always used in addition to an outline - SSA will force an outline of 1 pixel if no outline width is given.<br>
<br>
</font><font face="Arial">Field 13:
</font><b><font face="Arial">Alignment</font></b><font face="Arial">. This sets how text is "justified" within the Left/Right onscreen margins, and also the vertical placing. Values may be 1=Left, 2=Centered, 3=Right. Add 4 to the value for a "Toptitle". Add 8 to the value for a "Midtitle".<br>
eg. 5 = left-justified toptitle<br>
</font><font face="Arial"><br>
</font><font face="Arial">Field 14:
</font><b><font face="Arial">MarginL</font></b><font face="Arial">. This defines the Left Margin in pixels. It is the distance from the left-hand edge of the screen.The three onscreen margins (MarginL, MarginR, MarginV) define areas in which the subtitle text will be displayed.<br>
</font><font face="Arial"><br>
</font><font face="Arial">Field 15:
</font><b><font face="Arial">MarginR</font></b><font face="Arial">. This defines the Right Margin in pixels. It is the distance from the </font><b><font face="Arial">right-hand</font></b><font face="Arial"> edge of the screen. The three onscreen margins (MarginL, MarginR, MarginV) define areas in which the subtitle text will be displayed.<br>
</font><font face="Arial"><br>
</font><font face="Arial">Field 16:
</font><b><font face="Arial">MarginV</font></b><font face="Arial">. This defines the vertical Left Margin in pixels.<br>
For a </font><b><font face="Arial">subtitle</font></b><font face="Arial">, it is the distance from the </font><b><font face="Arial">bottom</font></b><font face="Arial"> of the screen.<br>
For a </font><b><font face="Arial">toptitle</font></b><font face="Arial">, it is the distance from the </font><b><font face="Arial">top</font></b><font face="Arial"> of the screen.<br>
For a </font><b><font face="Arial">midtitle</font></b><font face="Arial">, the value is ignored - the text will be vertically centred<br>
<br>
</font><font face="Arial">Field 17:
</font><b><font face="Arial">AlphaLevel.</font></b><font face="Arial"> This defines the transparency of the text. SSA does not use this yet.<br>
<br>
</font><font face="Arial">Field 18:
</font><b><font face="Arial">Encoding. </font></b><font face="Arial">This specifies the font character set or encoding and on multi-lingual Windows installations it provides access to characters used in multiple than one languages. It is usually 0 (zero) for English (Western, ANSI) Windows.<br>
</font><font face="Arial"><br>
</font><font face="Arial"><p><hr><p>
<br>
</font><center><b><font face="Arial"><font size=3><u>5. Dialogue event lines, [Events] section<br>
</u></font></font></b></center>
<b><font face="Arial"><br>
</font></b><font face="Arial">These contain the subtitle text, their timings, and how it should be displayed.<br>
</font><font face="Arial">The fields which appear in each Dialogue line are defined by a </font><b><font face="Arial">Format:</font></b><font face="Arial"> line, which must appear before any events in the section. The format line specifies how SSA will interpret all following Event lines. The field names must be spelled correctly, and are as follows:<br>
</font><b><font face="Arial"><br>
Marked, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text<br>
<br>
</font></b><font face="Arial">The last field will always be the Text field, so that it can contain commas. The format line allows new fields to be added to the script format in future, and yet allow old versions of the software to read the fields it recognises - even if the field order is changed.<br>
</font><font face="Arial"><br>
</font><font face="Arial">Field 1:
</font><b><font face="Arial">Marked<br>
</font></b><font face="Arial">Marked=0 means the line is not shown as "marked" in SSA.<br>
</font><font face="Arial">
Marked=1 means the line is shown as "marked" in SSA.<br>
</font><font face="Arial"><br>
</font><font face="Arial">Field 2:
</font><b><font face="Arial">Start</font></b><font face="Arial"><br>
Start Time of the Event, in 0:00:00:00 format ie. Hrs:Mins:Secs:hundredths. This is the time elapsed during script playback at which the text will appear onscreen. Note that there is a </font><b><font face="Arial">single</font></b><font face="Arial"> digit for the hours!<br>
</font><font face="Arial"><br>
</font><font face="Arial">Field 3:
</font><b><font face="Arial">End</font></b><font face="Arial"><br>
End Time of the Event, in 0:00:00:00 format ie. Hrs:Mins:Secs:hundredths. This is the time elapsed during script playback at which the text will disappear offscreen. Note that there is a </font><b><font face="Arial">single</font></b><font face="Arial"> digit for the hours!<br>
</font><font face="Arial"><br>
</font><font face="Arial">Field 4:
</font><b><font face="Arial">Style<br>
</font></b><font face="Arial">Style name. If it is "Default", then your </font><b><font face="Arial">own</font></b><font face="Arial"> *Default style will be subtituted.<br>
</font><font face="Arial"><br>
</font><font face="Arial">
However, the Default style used by the script author IS stored in the script even though SSA ignores it - so if you want to use it, the information is there - you could even change the Name in the Style definition line, so that it will appear in the list of "script" styles.<br>
</font><font face="Arial"><br>
</font><font face="Arial">Field 5:
</font><b><font face="Arial">Name<br>
</font></b><font face="Arial">Character name. This is the name of the character who speaks the dialogue. It is for information only, to make the script is easier to follow when editing/timing.<br>
</font><font face="Arial"><br>
</font><font face="Arial">Field 6:
</font><b><font face="Arial">MarginL</font></b><font face="Arial"><br>
4-figure Left Margin override. The values are in pixels. All zeroes means the default margins defined by the style are used.<br>
</font><font face="Arial"><br>
</font><font face="Arial">Field 7:
</font><b><font face="Arial">MarginR</font></b><font face="Arial"><br>
4-figure Right Margin override. The values are in pixels. All zeroes means the default margins defined by the style are used.<br>
</font><font face="Arial"><br>
</font><font face="Arial">Field 8:
</font><b><font face="Arial">MarginV</font></b><font face="Arial"><br>
4-figure Bottom Margin override. The values are in pixels. All zeroes means the default margins defined by the style are used.<br>
</font><font face="Arial"><br>
</font><font face="Arial">Field 9:
</font><b><font face="Arial">Effect</font></b><font face="Arial"><br>
Transition Effect. This is either empty, or contains information for one of the three transition effects implemented in SSA v4.x<br>
</font><font face="Arial"><br>
</font><font face="Arial">
The effect names are case sensitive and must appear exactly as shown. The effect names do </font><b><font face="Arial">not</font></b><font face="Arial"> have quote marks around them.<br>
</font><font face="Arial"><br>
</font><b><font face="Arial">"Karaoke"</font></b><font face="Arial"> means that the text will be successively highlighted one word at a time.<br>
<br>
</font><font face="Arial">
</font><b><font face="Arial">"Scroll up;y1;y2;delay"</font></b><font face="Arial"> means that the text/picture will scroll up the screen. The parameters after the words "Scroll up" are separated by semicolons.<br>
</font><font face="Arial"><br>
</font><font face="Arial">
The y1 and y2 values define a vertical region on the screen in which the text will scroll. The values are in pixels, and it doesn't matter which value (top or bottom) comes first. If the values are zeroes then the text will scroll up the full height of the screen.<br>
</font><font face="Arial"><br>
</font><font face="Arial">
The delay value can be a number from 1 to 100, and it slows down the speed of the scrolling - zero means no delay and the scrolling will be as fast as possible.<br>
</font><font face="Arial"><br>
</font><font face="Arial">
</font><b><font face="Arial">``Banner;delay'' </font></b><font face="Arial">means that text will be forced into a single line, regardless of length, and scrolled from right to left accross the screen.<br>
<br>
The delay value can be a number from 1 to 100, and it slows down the speed of the scrolling - zero means no delay and the scrolling will be as fast as possible.<br>
</font><font face="Arial"><br>
</font><font face="Arial">Field 10:
</font><b><font face="Arial">Text</font></b><font face="Arial"><br>
Subtitle Text. This is the actual text which will be displayed as a subtitle onscreen. Everything after the 9th comma is treated as the subtitle text, so it can include commas.<br>
</font><font face="Arial"><br>
</font><font face="Arial">
The text can include n codes which is a line break, and can include Style Override control codes, which appear between braces .<br>
</font><font face="Arial"><br>
</font><center><b><font face="Arial"><font size=3><u><p><hr><p>
6. Comment event lines, [Events] section<br>
</u></font></font></b></center>
<font face="Arial"><br>
</font><font face="Arial">These can contain the same information as any of the other event line types, but they will be ignored when the script is played.<br>
</font><font face="Arial"><br>
</font><center><b><font face="Arial"><font size=3><u><p><hr><p>
7.
Picture event lines, [Events] section<br>
</u></font></font></b></center>
<b><font face="Arial"><font size=3><u><br>
</u></font></font></b><font face="Arial">These contain the same information as Dialogue events, but Field 10 contains the full path and filename of the picture to display, instead of subtitle text.<br>
</font><font face="Arial"><br>
The Style specified is ignored. The "scroll up" transition effect can be used for picture events.<br>
<br>
</font><font face="Arial">The Left and Vertical Margin Overrides specify the bottom-left corner position of the picture. A left margin of all zeroes means that the picture will be horizontally centered. A vertical margin of all zeroes means that the picture will be vertically centered. <br>
</font><font face="Arial"><br>
<br>
</font><center><b><font face="Arial"><font size=3><u><p><hr><p>
8.
Sound event lines, [Events] section<br>
</u></font></font></b></center>
<center><b><font face="Arial"><font size=3><u><br>
</u></font></font></b></center>
<font face="Arial">These contain the same information as Dialogue events, but Field 10 contains the full path and filename of the wav file to play, instead of subtitle text.<br>
</font><font face="Arial"><br>
</font><font face="Arial">The Style and margins are ignored. The End time is also ignored - the wav will play until it finishes, or until another wav file is played.<br>
</font><font face="Arial"><br>
</font><font face="Arial">If an avi movie is played at the same time as a wav is already playing, then any sound in the avi will not be heard. Similarly, if a wav starts playing when an avi movie with sound is already playing then the wav will not be heard.<br>
</font><font face="Arial"><br>
</font><font face="Arial"><br>
</font><center><b><font face="Arial"><font size=3><u><p><hr><p>
9.
Movie event lines, [Events] section<br>
</u></font></font></b></center>
<center><b><font face="Arial"><font size=3><u><br>
</u></font></font></b></center>
<font face="Arial">These contain the same information as Dialogue events, but Field 10 contains the full path and filename of the avi file to play, instead of subtitle text.<br>
</font><font face="Arial"><br>
The Style is ignored. Transition effects are ignored.<br>
<br>
</font><font face="Arial">The End time specifies when the movie picture will disappear - but if th eavi file lasts longer, then the sound will continue to be heard.<br>
</font><font face="Arial"><br>
</font><font face="Arial">The Left and vertical Margin Overrides specify the TOP-LEFT corner position of the picture (unlike picture events). A left margin of all zeroes means that the picture will be horizontally centered. a vertical margin of all zeroes means that the picture will be verticall centered. <br>
</font><font face="Arial"><br>
</font><font face="Arial">If an avi movie is played at the same time as a wav is already playing, then any sound in the avi will not be heard. Similarly, if a wav starts playing when an avi movie with sound is already playing then the wav will not be heard.<br>
</font><font face="Arial"><br>
</font><center><b><font face="Arial"><font size=3><u><p><hr><p>
10. Command event lines, [Events] section<br>
</u></font></font></b></center>
<center><b><font face="Arial"><br>
</font></b></center>
<font face="Arial">These contain the same information as Dialogue events, but Field 10 contains the full path and filename of the program to execute, instead of subtitle text.<br>
</font><font face="Arial"><br>
</font><font face="Arial">The Style is ignored. The margins are ignored. Transition effects are ignored. The End time is also ignored - the program will execute until it ends, or is "manually" closed.<br>
</font><font face="Arial"><br>
</font><b><font face="Arial">There are also internal SSA commands which can appear in SSA scripts - the "SSA:Pause", ``SSA:Wait for trigger'' command events, and genlock control commands. These all begin with "SSA:"<br>
</font></b><font face="Arial"><br>
</font><font face="Arial">The SSA:Pause command has the same effect as pressing "P" during script playback. It is useful as a second "synch point" to resume subtitling after switching sides of a laserdisk.<br>
</font><font face="Arial"><br>
</font><font face="Arial">The ``SSA:Wait for audio trigger'' command has the same effect as pressing "P" during script playback, but pausing is automatically cancelled if the audio input to the computer exceeds a specified ``trigger'' level. It is useful as a second "synch point" to resume subtitling after switching sides of a laserdisk. The audio triggering can be overridden to resume playback - by pressing "P".<br>
</font><font face="Arial"><br>
Audio triggering "times out" after 10 minutes - If no audio peak of sufficient magnitude is received, and "P" is not pressed within 10 minutes - then playback will resume anyway.<br>
</font><center><b><font face="Arial"><font size=3><u><p><hr><p>
Appendix A: Style override codes<br>
</u></font></font></b></center>
<b><font face="Arial"><font size=3><br>
</font></font></b><font face="Arial">This is a reference which may be useful for those of you who wish to learn the style override codes, so you can type them in manually without using the "override style" dialogue box.<br>
</font><font face="Arial"><br>
All Override codes appear within braces except the newline n and N codes.<br>
All override codes are always preceded by a backslash par <br>
Several overrides can be used within one set of braces.<br>
<br>
</font><font face="Arial">Each override affects all text following the override. To apply an override only to selected text, you need a second "cancelling" override after the selected text, to "undo" the effect of the first override.<br>
</font><font face="Arial"><br>
</font><font face="Arial">Some overrides automatically apply to ALL the text - currently this is just alignment overrides, but more may be added later (eg. Shadow/outline depth overrides).<br>
</font><font face="Arial"><br>
</font><b><font face="Arial">n</font></b><font face="Arial">
New line (carriage return)<br>
n is ignored by SSA if ``smart-wrapping'' is enabled<br>
</font><font face="Arial">
</font><b><font face="Arial">eg. This is the first linenand this is the second<br>
<br>
N
</font></b><font face="Arial">New line (carriage return). This is used by SSA instead of n if <br>
</font><font face="Arial">
``smart-wrapping'' is enabled.</font><b><font face="Arial"><br>
</font></b><font face="Arial"><br>
</font><b><font face="Arial">b</font></b><font face="Arial"><0 or 1>
b1 makes the text bold. b0 forces non-bold text.<br>
</font><b><font face="Arial">
eg. There is a b1bold b0word here<br>
</font></b><font face="Arial"><br>
</font><b><font face="Arial">i</font></b><font face="Arial"><1 or 0>
i1 makes the text italic. i0 forces non-italic text.<br>
</font><b><font face="Arial">
eg. There is an i1italicised i0word here<br>
</font></b><font face="Arial"><br>
</font><b><font face="Arial">fn</font></b><font face="Arial"><font name>
<font name> specifies a font which you have installed in Windows. This is case sensitive.<br>
</font><b><font face="Arial">
eg. Here is some fnCourier Newfixed space text</font></b><font face="Arial"><br>
<br>
If you use a font name that doesn't exist, then Arial will be used instead.<br>
<br>
</font><b><font face="Arial">fs</font></b><font face="Arial"><font size>
<font size> is a number specifying a font point size.<br>
</font><b><font face="Arial">eg. fs16This is small text. fs28This is large text<br>
<br>
fe</font></b><font face="Arial"><charset>
<charset> is a number specifying the character set (font encoding)</font><b><font face="Arial"><br>
</font></b><font face="Arial"><br>
</font><b><font face="Arial">c&H</font></b><font face="Arial"><bbggrr></font><b><font face="Arial">&
</font></b><font face="Arial"><bbggrr> is a hexadecimal RGB value, but in reverse order. Leading zeroes are not required.<br>
</font><b><font face="Arial">
eg. c&HFF&This is pure, full intensity red<br>
c&HFF00&This is pure, full intensity Green<br>
c&HFF0000&This is pure, full intensity Blue<br>
c&HFFFFFF&This is White<br>
c&HA0A0A&This is dark grey<br>
<br>
a</font></b><font face="Arial"><alignment>
<alignment> is a number specifying the onscreen aligment/positioning of a subtitle.<br>
<br>
A value of 1 specifies a left-justified subtitle<br>
A value of 2 specifies a centred subtitle<br>
A value of 3 specifies a right-justified subtitle<br>
<br>
Adding 4 to the value specifies a "Toptitle"<br>
Adding 8 to the value specifies a "Midtitle"<br>
<br>
</font><b><font face="Arial">
eg. a1This is a left-justified subtitle<br>
a2This is a centred subtitle<br>
a3This is a right-justified subtitle<br>
</font></b><b><font face="Arial"><br>
</font></b><b><font face="Arial">
a5This is a left-justified toptitle<br>
</font></b><b><font face="Arial">
a11This is a right-justified midtitle<br>
</font></b><b><font face="Arial"><br>
</font></b><b><font face="Arial">k</font></b><font face="Arial"><duration>
<duration> is the amount of time that each section of text is highlighted for in a dialogue event with the Karaoke effect. The durations are in hundredths of seconds.<br>
</font><font face="Arial"><br>
</font><b><font face="Arial">
eg. k94This k48is k24a k150karaoke k94line<br>
</font></b><font face="Arial"><br>
</font><b><font face="Arial">r
</font></b><font face="Arial">This cancels all previous style overrides in a line<br>
</font><center><font face="Arial"><p><hr><p>
</font><b><font face="Arial"><font size=4><u>Appendix B: embedded font/picture encoding<br>
</u></font></font></b></center>
<font face="Arial"><font size=3><br>
</font></font><font face="Arial">SSA's font and picture file embeddeding is a form of UUEncoding.<br>
<br>
It takes a binary file, three bytes at a time, and converts the 24bits of those bytes into four 6-bit numbers. 33 is added to each of these four numbers, and the corresponding ascii character for each number is written into the script file.<br>
<br>
The offset of 33 means that lower-case characters cannot appear in the encoded output, and this is why the ``filename'' lines are always lower case.<br>
<br>
Each line of an encoded file is 80 characters long, except the last one, which may be shorter.<br>
<br>
If the length of the file being encoded is not an exact multiple of 3, then for odd-number filelengths, the last byte is multiplied by hexadecimal 100, and the most significant 12 bits are converted to two characters as above. For even-number filelengths, the last two bytes are multiplied by hexadecimal 10000, and the most significant 18 bits are converted to three characters as above. <br>
<br>
There is no terminating code for the embedded files. If a new [section] starts in the script, or if another filename line is found, or the end of the script file is reached then the file is considered complete.<br>
<br>
</font></body>
</html>