Maestrosbt 4 0

Download 134.04 Kb.
Date conversion29.04.2016
Size134.04 Kb.
This small utility was made to help with the creation of subtitles for various DVD/SVCD authoring tools and utilities, including Spruce DVD Maestro, Daikin Scenarist, I Author and submux. Additionally, it can be used with VirtualDub to hard-code subtitles into several video file formats (including AVI), or may be to just preview the generation without actually burning a SVCD/DVD.
MaestroSBT takes as input a script file made with the popular Sub Station Alpha ( and outputs a script file and a series of bitmaps for the parsed subtitles. The script file can be created in the following formats: .SON (DVD Maestro), .TXT (I-Author), .SST (Scenarist), .SUB (Philips IMG 2.0) and .SUB (submux). The bitmap files can be generated in several formats, but each authoring tool has its own requirements. In the case of VirtualDub, MaestroSBT integrates to it as a plug-in.
In a very rude description, this is what MaestroSBT does:
You provide: a SSA script (a text file with subtitles and their timings).
You get: the bitmaps with the subtitles converted from text to graphics, plus a .SON, .SST, .TXT or .SUB file that tells your DVD/SVCD authoring tool how to read the bitmap files and where in the timeline of your movie clip must each bitmap (subtitle) must be placed.
This readme file is my best documentation effort so far. Please take into account that my English is not very good (my mother tongue is Spanish), so it may be unclear, confusing or even wrong. I would really appreciate if you send me any corrections or improvements to this document to Please also write me with your stories of success or failure. :)

Change log
Moved to changelog.txt

Product versions
The program was tested with SSA version 4.08 (the latest available at the time of writing), Spruce DVD Maestro 2.9 build 2912, I Author version and Scenarist It is also known to work well with ReelDVD version The VirtualDub version used was 1.4.6.
MaestroSBT works fine in Windows 2000, and I think it should work in other Windows as well. I don't think it will perform well in Windows 95, as anti-alias will probably be not available.

Known issues
This release of MaestroSBT lacks support of some SSA features, as follows:

  • Embedded bitmaps, sounds, movies and commands.

  • Karaoke.

  • Shadows.

  • Secondary and tertiary colors on collisions.

  • Time units other than 1/100th of seconds (it seems that SSA doesn't support other either).

  • Effects (banner, karaoke, etc.).

Also, these limitations apply:

  • Outline size can be set only from 0 (none) to 4.

Since antialias is done by the video driver, no antialias is done if your desktop is in a color resolution that doesn't allow for antialias or if the driver itself doesn't provide antialias support. Windows 95 doesn’t support it natively. It needs the Plus! Pack or the font smoothing pack, which can be downloaded freely from Microsoft at Windows 98 and newer already have this natively.

It has also an arbitrary scale for the conversion of font sizes (although proportional) to the output format. You'll have to experiment with the font sizes 'till you get what you expect. I use Verdana 48, for instance.
Support for right-to-left written languages is provided by a home-made bidirectional algorithm that should work for most of the cases but is far from perfect.

Why colors are so strange? A little background
Subpictures (subtitles) in DVD/SVCD can have only four different combinations of color and transparency level. They are named: text, emphasis 1, emphasis 2 and background. These combinations make a palette of four entries, each entry having a different color/transparency setting. One of them should be used as the background (100% transparent), so only three different colors will be available for subtitling. Usually, one is used for the text color, one for the text outline and the last for the text anti-alias (smoothing of the pixelation in curves and diagonals). This is how MaestroSBT works by default, but it can be said to reserve two or three colors for text, by sacrificing the antialias and the outline.
Except for submux, in other authoring tools the color processing is not straight. Though the bitmaps can be created using the target (desired) colors, the final colors are usually selected from within the script (.SON, .SST, etc.) by other means:
1) In case of DVD (.SON or .SST), by the use of pre-determined colors, named color keys. This color keys make reference to the four currently selected colors of a color palette. By changing which group of four colors from the palette are active at a given time (Color statement), the script changes the meaning of the color keys in the bitmaps. The color keys are usually red, black, blue and white. In DVD Maestro, red, black, blue and white are the color keys for the color maps 1 to 4, respectively. In Scenarist, the color keys can be changed in the settings, but defaults to black, red, blue and white for picture, enhance 1, enhance 2 and background. This coding is arbitrary, as one can draw the main text in the enhance 2 color and use the picture color for background, and the program will not be able to tell the difference. For example, imagine a white text with red outline. A pink antialias will be calculated from those colors. When MaestroSBT generates the bitmap, these will be the results:
Text (color 1) will look blue.

Outline (color 2) will look black.

Antialias (color 3) will look red.

Background (color 4) will look white.

... but the .SON script will specify that in that particular subpicture, color 1 must look white with transparency 0%, color 2 must look red with transparency 0%, color 3 must look pink with transparency 0%, and color 4 must have a transparency of 100% (color doesn't matter).
2) In case of SVCD (.TXT, I Author), by the palette position. In this case, MaestroSBT uses the same colors in the bitmap as the subtitles (except for the background, for which takes the main text color), so the bitmaps will look pretty much as they will appear on the screen, provided that they have an outline. The lack of outline is not harmful in any way, except that the bitmaps will not look as expected when used outside the authoring programs.
3) In the case of submux, it takes the colors directly out of the bitmaps, as one naturally would expect from this kind of tool. ;) Transparency levels are either defaulted or taken from the .SUB script, though.

How to use MaestroSBT
DVD/SVCD, the simple case
Open the program and select an input SSA file (SSA Script Source). Click in [Timing]. Set the same value for FPS in and FPS out (usually 29.97 for NTSC and 25 for PAL systems) and close. Click in [Styles]. Order your styles according to their importance and close. Click [Set files]. Select the output script name. Specify the file extension according to your needs: a ".SON" extension for DVD Maestro, ".SST" for Scenarist, ".TXT" for I Author. Note that there are two “.SUB” options: one is for submux and the other is Philips IMG format v2.0. If you are using submux, ensure that you use either BMP 4 or 8 bits uncompressed, because this utility doesn’t handle compressed bitmaps. I suggest creating an empty folder for the target file, because bitmap files will be placed in the same folder, and there can be many of them. Close the files dialog. You can click on “Preview” to check how the subtitles will be rendered. Now you can click "Convert" in the main window. You should save these settings for a later use; when you do, MaestroSBT will add some lines (marked as SSA comments) to the SSA file. For this reason, it's recommended that you save it with under a different name.

Importing the bitmaps into DVD Maestro
Make sure you have a single movie in the timeline, long enough for your subtitles to fit in. Also make sure that the movie clip starts at 0:00:00:00 in the SMPTE time offset (under the "wall clock" of the timeline). Right click in the desired subtitle track and choose "Import subtitles file". Select your SON file as input. DVD Maestro will report the number of subtitles imported (they may or may not match the number of SSA dialogues in your script!). Right click in one of them... you'll probably notice that colors are wrong. Go to the "Colors" tab and click on "Edit palette". Select "Load" in the palette dialog and select the palette file created by MaestroSBT. There you are. If your subtitles appear to be out of sync, read later about the FPS In and FPS Out settings.

Importing the bitmaps into Scenarist
When creating the scenarist project, Scenarist will ask for the conversion colors: these will be the colors you must use in MaestroSBT as color keys. The defaults (for MaestroSBT and Scenarist) are: E2 = blue, E1 = red, P = black and Bg = white. You must change these values in Scenarist (or in MaestroSBT) if they were set differently. You should also set in Scenarist the corresponding drop type (drop frame or non drop frame).
Before importing the subtitles, you must set the Scenarist palette to match the generated bitmaps. Go to settingscolor palette and add a new palette with any name you like. Open the .SST file with notepad and look for the “Palette entries” section. You will see a list of up to sixteen RGB values. You must enter those color values in order in the palette. Ensure that your new palette remains selected before closing the palette dialog.
In the track editor, select the track you like, then click toolsimport subtitle. Click in “File path” for the desired subtitle track (normally the 1st), and select the generated .SST file. Then, click start (the importing will be done) and close the dialog.

Importing the bitmaps into I Author
Open the I Author muxer. You need separated video and audio files. The video file is a ".m2v" renamed as ".mpv". The audio files are one or more ".mpa". Select these files in the appropriate fields. Check the "OGT Active" box and select the .txt file generated by MaestroSBT in the Sub OGT #1 field. You can select more scripts in OGT #2 to #4, if you want. Select an output .mps file name and click Start. Import the .mps file into the I Author's project. Read the encoding tips later in this file. If I Author muxer keeps giving you weird messages and/or hangs, suspect that the bitrate of your .mpv and .mpa combined (plus the subtitles and muxing overhead) are too high (you will have to re-encode them with lower bitrates). Other reason can be the tool you used for creating the video file.

Using submux
There are several tools that provide a graphic interface for submux (submuxGUI is one). The current example is for the command line version of submux.
Use the latest version of submux you can get. The one that comes with DVD2SVCD (not compiled with CYGWIN) seems to be the most reliable. Have your MPEG2 file ready with an .mpg extension. Place all files in the same directory (submux, your movie, the bitmaps and the .sub script), go to the DOS box (command), and change to the directory were the files are. Type:
submux –s 0 yourfile.mpg yourscript.sub yourfile-subbed.mpg
This will add your subtitles to the movie file, in the first stream and with the SVCD subtitle format. You can then use the output file (yourfile-subbed.mpg) as a new input file for submux and add new subtitle streams (-s 1, -s 2, etc.). I know of no method to specify the language of the stream.
However, most SVCD players don’t support subtitles in SVCD discs, or don’t support the SVCD subtitle format, but another format named CVD, which submux can generate if the –C flag is used (the letter is a capital c). You’ll have to shoot in the dark and test what subtitle formats your player supports, if any.
Supposedly you could also mix CVD and SVCD subtitles in the same MPEG file, so you could add both to your file in order to improve player compatibility.

VirtualDub operation
Open MaestroSBT and select an input SSA file (SSA Script Source). Click in [Timing]. Set the same value for FPS in and FPS out (usually 29.97 for NTSC and 25 for PAL systems… must match the encoding of the movie to open in VirtualDub) and close. Click in [Rendering] and select the appropriate Horizontal and Vertical size values (leave “minus 2” checked for DVD/SVCD projects). Close the rendering dialog. Click in [Styles]. Order your styles according to their importance and close. Click in [Edit & Preview]. Click on the SSA icon in the left of the Close button. The “feeding virtualdub” dialog appears.
In SSA, open the selected movie file. In video, filters, click Add. Select the “resize” plugin, click OK and set it to the same width and height as set in the rendering dialog of MaestroSBT. Click in the Add button again. If the MaestroSBT plugin is not installed in the SSA plugins directory, click Load and select the file “VDubMaestroSBT.vdf”. Select the filter “MSBT subtitler 1.0” and click OK. Close the filters dialog. As MaestroSBT is already willing to feed the filter with data, the next time you preview the movie (F5) the filter will collect the subtitling information and display the movie with subtitles.
You can make any changes within MaestroSBT, click the SSA icon, make ALT-TAB and preview them in VirtualDub. Every time the preview starts, the filter detects that there’s a MaestroSBT instance willing to feed subtitles and collects them.
You can use this method as a real-time preview of the subtitles you will later use in a DVD/SVCD authoring tool, or to create a subtitled AVI file from your source by generating it from VirtualDub.

Main dialog
Set files: Opens the files dialog box, to specify the target script file and -optionally- a previous script from which honor its palette file.
Rendering: Opens the rendering options dialog box, to change many rendering options, like the output bitmap size, the number of colors available for text, word wrapping, etc.
Timing: Opens the timing dialog box, to set the proper fps values.
Segments: Opens the segments dialog box, to enter which part/s of the SSA script you want to convert, and make time shifts on them.
Styles: Opens the style precedence dialog box, to specify which styles are more important when the available colors are scarce.
Edit & preview: Opens the preview dialog box, to view how the bitmaps will look like, and change their positions or text if needed. The preview dialog also provides the means to feed the VirtualDub filter with subtitle information.
Generate: Generates the output script and bitmaps.
No bitmaps: Check this to avoid the creation of the bitmap files when generating the output script file. This saves some time when running tests, but must be used only if the changes from previous generates are known not to require new bitmaps. Keep in mind that most changes made to the SSA script or in MaestroSBT dialogs will lead to a script that won't match previously created bitmap files. Always uncheck this for the final run.
Snap times to frames: (From the Tools menu). Opens the snap times tool.
Export to SRT: (From the File menu). Converts the SSA file into SRT format. Only subtitles within the defined segments will be exported. No compensation is provided for collision resolution, and most formatting is lost because of the SRT file format limitations.
Export to

Captions Inc.: (From the File menu). Converts the SSA file into a Captions Inc. text file. Color values are converted to their nearest fixed color, and screen positioning is respected when possible. Most of the formatting is lost due to the Captions Inc. format limitations (boldness, font size, horizontal positioning, etc.).
Compatibility: (From the File menu). This is a set of options that can be used to make MaestroSBT to behave as in previous versions on some particular subjects. This can be used if a you worked hard on manual positioning for a file with an old version of MaestroSBT and you find that bug corrections in newer versions of it change the positions you set in a way that you find annoying.

Files dialog
Output script: The name for the output file. Choose the appropriate extension according to the target application: “.SON” for DVD Maestro, “.SST” for Scenarist, “.TXT” for I Author and “.SUB” for submux. If you want to create a Philips IMG 2.0 script, you must say so in the rendering dialog.
Output palette file: A palette file (.spf) that MaestroSBT will create if you select the SON format and which you can use in DVD Maestro as input. You cannot change this field. This file will be needed because bitmaps will not have the desired colors, but only blue, red, white and black instead (as needed by DVD Maestro). The palette file tells DVD Maestro which real colors you want where the bitmap have the phony colors.
Output image files: The pattern for the name of the output bitmap files. Files will be named numerically, from 0001 to the number of bitmap files.
Honor palette: In DVD Maestro, when you have multiple subtitle tracks, you can only have one palette for all of them. What you can do is to tell MaestroSBT to build the palette for the new subtitles starting from the colors used in a previous .SON file, thus having the colors of the new one in the exact same order as the first. Otherwise, your colors could mix up. i.e., suppose you have three subtitle tracks: English, Spanish and French. You should parse English first, then parse Spanish second, telling MaestroSBT to honor English file's palette, and finally French, telling MaestroSBT to honor Spanish file's palette. You should then use French's palette in DVD Maestro as input. Unclear? Do some tests and you'll get it. Note that the file you point to here is a .SON script file created by MaestroSBT, not the .SPF palette file.

Rendering options dialog
Script format: Select the type of output script. Select .SON for DVD Maestro, .SST for Scenarist,.TXT for I Author, .SUB for submux and .SUB again (a different .SUB, though) for Philips IMG 2.0 format.
Bitmap format: Select the type of bitmap to create. Bitmap format support varies from tool to tool. I Author won't take 8 bpp bitmaps, and submux cannot handle other that uncompressed BMPs. The less space consuming format usually is Windows BMP 4 bits (compressed). If you take your time to fully investigate about which formats your tool supports (checking the results on a standalone player), please e-mail me.
Output resolution: Change to a predefined resolution setting. Note that I Author normally uses 720 as the subpicture width, even if your encoding is 480x480 or 480x576, so you should always use 720 as the width.
Horizontal: Set the horizontal resolution for the created subpictures (bitmaps). Bitmaps' maximum horizontal size (and the virtual screen width) will be what's said by this parameter. Read the warning about I-Author in the previous paragraph.
Vertical: Set the vertical resolution for the subpictures (the bitmaps) to create. Bitmaps' maximum vertical size (and the virtual screen height) will be what's said by this parameter (minus 2, if the "minus 2 pixels" box is checked).
Fixed width: Bitmap width is set fixedly at the value entered here, if any. Clipping will be done only vertically. This field is of little use.
Full width: Check to keep MaestroSBT from clipping the bitmaps horizontally.

Minus 2 pixels: Subpictures in VCD/SVCD are supposed to be 2 pixels shorter than the output resolution. Uncheck this if you want MaestroSBT to generate bitmaps of full height, but you should not.
Don't clip bitmaps: This keeps MaestroSBT from saving some disk space and makes it write the bitmaps at their full resolution (i.e. 720x478). Normally, MaestroSBT would clip them to the smallest possible rectangle. This option is mandatory for Scenarist and recommended for I Author. You shouldn’t use it for submux, because it will fail complaining about the image size.

Line spacing: If set, changes the default line spacing (as reported by Windows) in a given percentage. If not set, the default is 100%. Individual line spacing in the styles override this global setting.
Character extra: If set, changes the default character spacing (kerning) by the given number of pixels, that can be negative. If not set, the default is 0. Individual character spacing in the styles override this global setting.
Balanced word wrap: If checked, MaestroSBT will try to render text lines as width-balanced as possible when word wrapping.
No horizontal collision: If checked, MaestroSBT will assume that subtitles with different horizontal alignment or with different horizontal margins do not collide. This is useful for overlapping dialogs (one person speaks on the left, and another on the right) when you are certain that the dialogs will not collide.
Intelligent collision: Uncheck only for compatibility with scripts tuned with previous versions of MaestroSBT. If checked, MaestroSBT will use a much improved algorithm for collision detection in which collision is detected according to the subtitle’s boxes, and the subtitles keep their position across frames. This is much close to how SSA works.
Collision foreseeing: If checked, MaestroSBT will “foresee” collisions of current subtitles and reserve room for the forthcoming colliding subtitles. With this set, subtitle placement is made in a way that if two subtitles collide and one is to appear first, this subtitle "saves” space for the next so the second subtitle is placed below the first. This is equivalent to SSA "Reverse" collision mode.
Script font code page: Used for international font scripts. Whether you need Latvian, Greek or other, you should set the correct code page for your fonts in the styles dialog. If you want MaestroSBT to ignore the code pages marked in the SSA styles, you can override them here. However, inline style overrides in SSA will always be respected.
Right to left language: Click here to make MaestroSBT order the text right to left in languages that need so, as Hebrew and Arabic.
4:3 compensation: With this set, fonts will be condensed or expanded horizontally in order to compensate the aspect ratio for a 4:3 screen. This is the recommended setting.
Color rendering: This allows you to select the maximum number of colors per picture used simultaneously for the text face. As the three available colors are normally used for text face, antialias and outline, the last two would be sacrificed, in that order, in case of selecting two or three colors for text face.
Sticky colors: If checked, MaestroSBT will make every possible effort to keep each subtitle's colors once they’re given. Color collisions usually change the colors of the subtitles if they collide with others in a future frame. Please notice that this setting will override the style precedence as well, which may not be what you want.
Balanced word wrap: If checked, MaestroSBT will try to render text lines as width-balanced as possible when word wrapping.
Color keys: Click here to open the color keys dialog. In this dialog you can change the color keys used for primary text, outline, anti-alias and background.

Timing dialog
FPS In: This is the FPS value in which your movie is encoded. For example, NTSC is usually 29.97, and PAL is 25. As the SSA script expresses times in 100ths of seconds, MaestroSBT will convert these into frame numbers.
FPS Out: Normally, you should put here the same value as in FPS In. However, if you are using NTSC and the video file is not encoded in drop-frame format, you should use 30 here. This is particularly true for DVD Maestro, as it takes the drop/non-drop flag directly from the .m2v file. You can force the drop-frame flags using Inward’s pulldown:
Drop frame: Check this to use drop-frame timing code. This is only for NTSC, and Scenarist seems to be the only authoring tool reading drop-frame scripts.

Segments dialog
Here you define which part/s of the SSA script you want to parse, if you won't parse it as a whole, if you want to parse just some parts, or if you want to modify the subtitle position in time. For example, your SSA file could span for a whole 2:15 h. length movie, and you are making a miniDVD of only a part of it... let's say from 0:30 to 1:00. Then you use the Segments dialog as follows:
Start: 0:30:00.00

End: 1:00:00.00

Seg.Pos in source: 0:30:00.00

Seg.Pos in dest.:

Or yet, suppose your first subtitle starts in 0:31:33.50, then you might use:
Start: 0:31:33.50

End: 1:00:00.00

Seg.Pos in source: 0:30:00.00

Seg.Pos in dest.:

The last field (Segment position in destination) expresses the time corresponding to the first frame of the file to subtitle in the authoring tool’s timeline. It is the only one that can be entered SMPTE (HH:MM:SS:FF) instead of in hundredths of second (HH:MM:SS:hh) if a colon is used as the last field separator. Drop frame code must be used if drop frame was selected in the Timing dialog.
The segment position in destination field can also be used for when you have many video segments in DVD Maestro's timeline. For each subtitle segment you are parsing, specify here the start position of the corresponding video segment in DVD Maestro's timeline. But be warned, there seems to be a bug in DVD Maestro about importing subtitles when there are many (more than one) video segments in the timeline. What I do is to temporarily delete the segments from the timeline, put an image file (BMP) as only segment and make it long enough to receive all the subtitles. Then, after importing the subtitles, I delete the bitmap and place the correct segments in the timeline again.
The math behind the scene is as follows:
SbtTime = ( SSATime - Seg.Pos in source ) * FPSIN / FPSOUT + Seg.Pos in dest.

Styles dialog
Here you express which styles you consider more important than others. This is used by MaestroSBT for collision resolution, as I'll explain later. By clicking in each style you can see what attributes it has. By clicking in [Edit style] or double-clicking on the style you can edit the supported attributes of it. Note that some unsupported SSA attributes (like shadow) may be inadvertently changed by MaestroSBT when editing the style.
These are the meanings of the fields in the edit style dialog:
Top title, etc.: The vertical alignment of the subtitles.
Align left, etc.: The horizontal alignment of the subtitles.
Bottom margin, etc.: The margins for the subtitle. These values are normally scaled according to the output resolution.
Use MaestroSBT scale: Checking this box, values affected by internal MaestroSBT conversions are shown and taken in their final (after conversion) form. The values affected are the font size and the horizontal/vertical margins. If this box is unchecked, the values are shown and taken as seen in SSA.
Font face: The name of the font used for the subtitles. Click on [Change] to change it.
Font size: The size (in points) of the font used for the subtitles. Click on [Change] to change it.
Font style: The styles (italic, bold) of the font used for the subtitles. Click on [Change] to change them.
Font script: The character script (Western, Arabic, Hebrew, etc.) of the font used for the subtitles. Click on [Change] to change it.
Text color: The text color for the subtitles. Click on [Change] or click in the color box to change it.
Outline color: The color for the outline (if any) on the subtitles. Click on [Change] or click in the color box to change it.
Outline size: The amount of outline (between 0 and 4) for the subtitles.
Extra char. spacing: The amount in pixels (can be negative) to add or subtract from the normal inter-character spacing of the subtitles (kerning). If not set the global setting from the rendering dialog will be used.
Allow processing of

kerning pairs: Let’s MaestroSBT correct the inter-character spacing for certain letter combinations that may look artificial like “To”, “Av”, etc. if the selected font provides the proper information.
Ligate characters

when needed: Use character ligatures if the font allows it.
Use diacritics when

available: Allows the use of diacritics if the font and the text have them.
Line spacing: The percentage for the line spacing of the subtitles. Normal is 100%. If the value is zero (default) the global setting from the rendering dialog will be used.
Sample: An arbitrary text for the sample window. You can use SSA overrides like {\b1}, {\i1}, etc. to mix different types of rendering.
Sample box: It’s a sample rendering of the sample text given with the current style attributes. The background color is set automatically to black or white depending on the needed contrast. To manually select a different background color, click in the sample box.

Edit & preview dialog
Here you can edit every subtitle position, while previewing the bitmaps. This is the meaning of the dialog elements:
Subpicture start: Indicates the start SMPTE time of the current subpicture. One subpicture can hold one or more subtitles, and each subtitle can span across many subpictures.
If you click in this field, a list of all the start times of the subpictures will show, so you can select a new frame to jump to.
Subpicture stop: Indicates the stop SMPTE time of the current subpicture. Unless “Stop is FNV” is set, the value represented here is the last frame where the subpicture will be visible. If “Stop is FNV” is set, then the value represented here is the first frame where the subpicture will not be visible.
If you click in this field, a list of all the start times of the subpictures will show, so you can select a new frame to jump to.
<<: Used to move to the previous subpicture.
>>: Used to move to the next subpicture.
Stop is FNV: Controls whether stop times are shown as the last visible frame or the first non-visible frame.
Subtitle start: Indicates the start SMPTE time of the currently selected subtitle, if any.
Subtitle stop: Indicates the stop SMPTE time of the currently selected subtitle, if any. Unless “Stop is FNV” is set, the value represented here is the last frame where the subtitle will be visible. If “Stop is FNV” is set, then the value represented here is the first frame where the subtitle will not be visible.
Coordinate buttons: These six buttons show the coordinates of the currently selected subtitle. According to their position, they reflect the left, the center, the right, the top, the middle and the bottom of the subtitle, counting from (0,0). Notice that normally you use the “minus 2” setting, meaning that no subtitle will show up above the (0,2) coordinate. The background will not show these two lines either. When one of the horizontal or vertical buttons is sunk, mouse dragging of the subtitles will be snapped to the guidelines according to the corresponding subtitle coordinate. If you click one of these buttons while holding the CTRL key, a guideline will be added (or removed) in this position.
Manual position: This item is checked if the position of the selected subtitle has been changed from where MaestroSBT had automatically calculated. If you uncheck this, the subtitle will move to the calculated position. If you check it, the subtitle will be locked to its current position, even if the size of the text or other conditions change.
Restore: Restores any position changes that the selected subtitle had while showing the current subpicture.
Edit subtitle: Click here to edit the selected subtitle’s text and/or times. See the reference for the edit subtitle dialog below.
Next subtitle: Used to cycle the selection among the different subtitles in the subpicture. The selected subtitle will acquire a gray box around it. You can double click on the subtitle to edit its text and times. You can also drag it to a manually selected position.
Guidelines: Click to open the guidelines dialog. Here you can manually add or remove any guidelines.
Background: Click to select a background bitmap, movie or solid color. If “minus 2” is used (the default), the first two pixels of the picture will not be shown. Movie preview is slow…. very slow, but sometimes could be better than nothing, anyway. Please notice that the bitmap or movie to use as background should exactly match the MPEG stream to subtitle in order to use it as an accurate reference… Screen captures can be smaller than the final source due to cropping. If the selected background is a movie, you’ll have to set a time code for the first frame of the movie, which is usually 0:00:00:00 unless your subtitles are shifted as well.
VirtualDub icon: Click on this icon to open the “feed VirtualDub MSBT filter” dialog. By using this, you feed into VirtualDub’s filter the changes made in your script. If the first frame of the movie is not 0:00:00:00, you should indicate the correct value by pressing “Change”.
Current time: Shows the time of the frame shown in the preview. If there’s a movie as background, the current frame could not correspond to any subpicture.
Large slider: Used to navigate the timeline. If there’s a movie selected as background, the left end of the slider points to the first frame of the movie, and the right end of the slider points to the last frame of the movie whether there are subtitles in the range or not. If there’s no movie as background, the left end of the slider points to the start time of the first subpicture, and the right end of the slider points to the stop time of the last subpicture.
Small slider: Used to have a more detailed navigation of the timeline than with the large slider. This sliders allows to move ten positions forward of backwards in the timeline.
Close: Closes the edit/preview dialog.
Besides the visible controls, you can also use the following keys:
Left, Right, Up, Down: If there’s a subtitle selected (by a mouse click or by the use of the cycle button), its position will move one pixel in the corresponding direction. Holding down the CTRL key will make the movement to be in ten pixels increment.
S: Shows/hides the safe area markers.
G: Shows/hides the user guidelines, if any.
E: (Also by double-clicking on the subtitle) Allows editing of the selected subtitle text and times. Editing blinking text is not supported.
A: While holding this key down, the preview shows the current frame in a 4:3 proportion using a rough but fast method. This is useful to check for the correct proportions on the screen.
Ctrl+A: While holding this keys down, the preview shows the current frame in a 4:3 proportion using a fine but very slow method. This is useful to check for the correct proportions on the screen.

Manually positioning the subtitles: anchor points
Subtitle positions can be manually selected by dragging them with the mouse or by the use of the arrow keys (with or without the use of the CTRL key). If the subtitle is manually positioned, the “manual” check box is checked and a small cyan point is shown in the subtitle. This point may be dragged to any of the corners of the subtitle and is used to anchor it to the corresponding margin. Thus, if the subtitle changes its size whether because its text changed, the style changed the font attributes or other reasons, the subtitle box will always be aligned to the selected anchor point.

Edit subtitle dialog
This dialog is accessed from the Edit & Preview dialog, and allows the editing of most of the subtitle attributes, including the text, style, style overrides and times.
Parameters: Shows the part of the SSA dialog line that is not currently edited.
Style: Is the SSA style associated to this subtitle. You can change it here.
Start time: This is the first frame of the timeline in which this subtitle is visible. Times must be expressed according to the output timeline (i.e., must have the segments applied if any) and must be entered SMPTE (HH:MM:SS:FF). Leave the field blank to respect the current SSA times.
Stop time: This field is affected by the “Stop is FNV” setting of the edit/preview window. If it’s unchecked, this is the last frame of the timeline in which this subtitle is visible; if checked, this is the first frame of the timeline in which this subtitle is not visible. Times must be expressed according to the output timeline (i.e., must have the segments applied if any) and must be entered SMPTE (HH:MM:SS:FF). Leave the field blank to respect the current SSA times.
Use ABSOLUTEIN: If checked, the start time will be used to create a MSBTUSER ABSOLUTEIN override instead of actually changing the SSA timeline. Unchecking this is recommended.
Use ABSOLUTEOUT: If checked, the stop time will be used to create a MSBTUSER ABSOLUTEOUT override instead of actually changing the SSA timeline. Unchecking this is recommended.
Text: This is the subtitle text. Use ENTER to insert a forced new line. Avoid using \\n or \\N. SSA style overrides can be entered here manually or by using the buttons to the right of this control.
Sample: Shows how the subtitle would look like if it faces no color collisions with other subtitles. Click on the sample box to choose a different background color for previewing.
Format buttons: Provide an easy way to enter SSA style overrides. You can change the font face, color, style and code page. You can also cancel all previous overrides. In the font selection dialog, leave unset all the fields you don’t need to change.
Non-breaking space: Inserts a non-breaking space in the text. This is a special kind of white space that is non-breakable, which means that doesn’t allow for word break. For example, if you want the words “Monsters Inc.” to always show in the same line, you can use a non-breaking space between “Monsters” and “Inc.” to do that. Also, non-breaking spaces are never trimmed, so “this    and    this” will not look like “this and this” if you use non-breaking spaces.
Align buttons: Indicates the start SMPTE time of the current subpicture. One subpicture can hold one or more subtitles, and each subtitle can span across many subpictures.
Align buttons: Allows changing the text alignment for this subtitle. Though you can add as many align overrides as you want, only the last override will be used.

Snap times to frames dialog
This tool changes all the SSA script times for the dialog events to values that match current frame times. Consider the following times in a NTSC 29.97 video:




0:00:00.00 and 0:00:00.03 are times in 1/100ths of second where new frames will be found. 0:00:00.01 and 0:00:00.02 are not. After using this tool, the new times will be:




The second and the third will be passed to the next valid value. This is useful for detecting collisions from within SSA.

Take into account that TVs don't display the whole image, as you can see in DVD Maestro safe areas. A minimum 30-40 pixel margin should be set for every SSA style. In the opposite side, PC DVD software does display the whole frame. You can use the preview in the “Edit & preview” dialog to check the margins against the default safe areas.
For I Author multiplexing, take into account that the maximum total bitrate is 2824000 bps (about 2757 kbps), but that's including the audio, the subtitles, mux overhead, padding, etc. So, if your I Author muxer keeps giving you awkward messages, try lowering the bitrate of your encodings a little.
If you use TMPGEnc for video encoding, notice that versions prior to 12j could not encode I Author compatible video streams.

Collision resolution
Color collision:
- If the subtitles appear in the same frame, they have color collision.

- If one subtitle has more than one set of colors (e.g., color override), it has a color collision within itself.

The color collision is treated as follows:
- Subtitles with the highest precedence retain their colors.

- Subtitles not with the highest precedence loose their own colors and take those of the highest. If two or three colors are permitted (by the rendering options dialog), the first two or three subtitles will keep their text color. Outline color is only respected for the first of those subtitles.

- When color overrides are used (more than one color per subtitle line), the color diversity among different subtitles is served first, then the color diversity within subtitles, if there are any colors left.

- If sticky colors is selected, once a subtitle is given a set of colors, those colors will not be taken from it even if another subtitle with a higher precedence collides with it later in time (subtitles have color memory).

Position collision, old method (intelligent collision not checked):
With this method, collision among subtitles (subtitles that appear simultaneously in the same frame) is detected in a raw way, as follows:
- If the subtitles have different vertical alignment (toptitle, midtitle, subtitle), they are assumed not to have space collision, although that's not necessarily true.
- If the subtitles have the same vertical alignment and the lack the {#absolute} flag (see SSA format extensions), they are assumed to have space collision, even if they don't (i.e., there could be one left aligned and the other right aligned, and short enough to avoid the collision).
Collision resolution is done as follows:
- Subtitles with higher precedence are placed higher in the screen, and other subtitles are placed lower.

- Subtitles with the same precedence are placed top to bottom in order of appearing (earlier first).

- Margin settings are only taken from the first subtitle in the collision group, so if subtitles with different margin settings collide, all but the first lose their margin settings.

- Subtitles with manual positioning will not be treated as colliding.

Position collision, intelligent collision checked:
With this method, collision among subtitles is detected by the subtitle area. Subtitle area is calculated as the text box plus the additional amount of space needed to complete any non-standard line spacing of the bottom line of the text. If two subtitles share at least a pixel in their boxes, the subtitles collide.
Collision resolution is done as follows:
- If collision foreseeing is selected, bottom aligned subtitles are assigned a position first, from the last frame to the first. This causes the effect of “prediction”, and is only needed for bottom aligned subtitles.

- Then all frames are processed from first to last, and within each frame the subtitles are processed in the following order: bottom aligned (if collision foreseeing is not selected), then top aligned and finally the middle aligned.

- Position assignment is performed only on non-previously assigned subtitles, which means that the subtitles keep their positions across frames once they were calculated.

- Position assignment is performed in order of alignment (bottom, top, middle) and then by style priority.

- Each bottom aligned subtitle is placed as near to its predicted position as possible, moving it up as needed until it finds no collisions. If moving it up would take it out of the screen, then it is moved down again until it finds no collisions. If moving it down would take it out of the screen too, then it is left in its original predicted position and the collision is not resolved.

- Each top aligned subtitle is placed as near to its predicted position as possible, moving it down as needed until it finds no collisions. If moving it down would take it out of the screen, then it is moved up again until it finds no collisions. If moving it up would take it out of the screen too, then it’s left in its original predicted position and the collision is not resolved.

- Each middle aligned subtitle is placed as near to its predicted position as possible. If it collides where it is, then it is moved up or down to the closest possible position with on collision. If moving it up or down would take it out of the screen, then it’s left in its original predicted position and the collision is not resolved.

SSA script format extensions
Comments are used to store MaestroSBT settings within the SSA file. Do not mess with them, unless you know what you want to achieve. There are two types of comments you can find in the SSA file, after saving it from MaestroSBT:

  • MaestroSBT configuration

  • Dialogue user settings

MaestroSBT configuration
They look like this:
MSBTCONF: OutputFile=C:\test\test.sst

MSBTCONF: Background=C:\test\720x480.bmp

MSBTCONF: FPSin=29.97;DropFrame=1;Colors=2;ResX=720;ResY=480

MSBTCONF: DontClip=1;Minus2=1;FullWidth=1;BWWrap=1;ScrType=SST;BPP=4

MSBTCONF: Color0=ff0000;Color1=ff;Color2=0;Color3=7f7f7f

MSBTCONF: StyleOrder=DVD,Default;VGuides=224,464,704;HGuides=110

MSBTCONF: CodePage=-1;Segment=*,00:01:15.00,*,*;Expected=22

MSBTSTYLE: Default;LineSpacing=120

You don’t have to change them from SSA, because they can be changed from within MaestroSBT by using the different dialogs.
Dialogue user settings
They must appear before the dialogue they affect, and they affect only the one dialogue that follows. They look like this:
ABSOLUTEIN and ABSOLUTEOUT can be used to make manual adjustments to the subtitle times (start and stop). This is supported for backwards compatibility only, because the manual time adjustments should be done from the edit and preview dialog without checking “use ABSOULUTEIN/OUT”. The values are in SMPTE format in the output FPS (whichever it may be), what means that the last field is frames instead of 1/100ths of second. The ABSOLUTEOUT value must be the last frame for the subtitle to appear (not the first it mustn’t appear). ABSOLUTEIN and ABSOLUTEOUT bypass the normal frame arithmetic, so they values are final. However, the segments configuration still uses the original SSA event times for the dialogues to establish if they are part of a segment or not.
POSX and POSY are manual positioning for the subtitle. This is normally inserted by MaestroSBT when editing the subtitles in the preview/edit dialog.
Other settings
I took the liberty to add two more extensions to SSA script flags. These are as follows:
If the text "{#blink}" or "{#blinkN}" appear in the dialogue, the corresponding line will blink with a period of N 100ths of second (default: 100, minimum 10 and maximum 500). Examples:
This {#blink} text will blink

This {#blink30} text will blink faster

This {#blink200} text will blink slower
Blinking is implemented as if the subtitle were actually many shorter subtitles in sequence.
Absolute positioning
If the text "{#absolute}" appears in the dialog, that line will have an absolute positioning, i.e., it will not take part of the collision detection. Example:
This {#absolute} line is placed where it would be as it was alone, even if it collides with others.
I used {#blink} and {#absolute} extensions to place a little sign in a corner of the screen to announce the availability of a special feature in that part of the movie (like "follow the white rabbit").
In future versions of MaestroSBT, {#blink} and {#absolute} will migrate to comment settings within MSBTUSER sections, like ABSOLUTEIN or POSX.

Right to left written languages
Support for right to left written languages has been added, by using the appropriate fonts and checking the “Right to left language” box in the rendering dialog. However, SSA itself doesn’t properly support RTL, so the SSA script must be written “blindly” in the SSA text box by setting it to RTL. If the code page is forced in the rendering dialog, MaestroSBT also forces RTL in the text box used for editing the subtitle text.
I don’t read or speak any RTL written language, so if you find anything weird or wrong in their processing, please let me know, trying to be as didactical as possible.
I noticed that the Arabic character Fatha is not rendered and I don’t know why. May be it’s important, may be not. Please let me know.
There are no plans to support Unicode text for the moment, so the support is only for the basic (ISO) character sets.

Line breaks are performed automatically at word breaks where the line would have got too long. Forced line breaks in subtitles can be expressed with \N (capital N), just like in Avery Lee's Subtitler filter:
This line will break\Nhere.
Soft line breaks (\n or enter) will be converted to spaces. Redundant spaces (like in "abc abc") will be converted to single spaces ("abc abc"), unless between style overrides. If you need redundant spaces, use the non-breaking space character (usually ALT+0160) or “\h”, like this: “abc\h\h\habc”.
By default, if the output format is not .SST, bitmaps are not created full size. Instead, they are cropped to the smallest possible rectangle, and their positions are noted in the script file. Your HD will be thankful. This behavior can be changed in the rendering dialog.
Parsing errors in SSA script are ignored silently when possible. Multiple definitions for the same style are ignored: only the first one will be used.
The color for antialias is calculated from the average between the outline and the text colors.

If DVD Maestro keeps telling you that "no subtitle events were found", check out your video clip starting time. Sometimes MPEG streams have timestamps embedded in them, so rather than maestro's movie timeline starting at 00:00:00:00, it starts at 01:00:00:00 (or more). This shows up as a timecode offset in the movie timeline. You have two ways to solve this:
1) Reset the timecode offset that was embedded in the video file so it will start at 00:00:00:00 before importing the subtitles.
2) Mark the start time of your video clip in MaestroSBT segments dialog, so it will render them with the appropriate time shift. Remember to hit the "Add" button after defining the segment to make it active.
I-Author is a program known for its problems when muxing subtitles. It not only hangs a lot: it also doesn’t generate true SVCD subtitle format, but CVD (Chinese) format instead. Consider using submux for SVCD authoring (it comes with the DVD2SVCD software bundle).
Very few standalone players (and no known software player) are capable of displaying subtitles on SVCD disks. Some play the CVD (I-Author) format, some play the SVCD (Philips) format and very few play both. You will have to make your experience on this with your player.

Time accuracy
All the possible effort was given to provide time conversion accuracy. If the times in the output script don’t match what you expect, take a look at the procedure performed by MaestroSBT:

  1. Every subtitle times are converted into frame numbers, so they acquire a specific frame domain.

  1. The collisions are detected from the frame domains. They collide or not, depending if they share frame numbers or not.

For example, think of the following:

(SSA times)

0:00:00.00  0:00:00.06 Hello

0:00:00.06  0:00:00.11 Bye bye

0:00:00.10  0:00:00.15 Another

(Note that "Bye Bye" seems to stop AFTER "Another" begins).
Assuming the following fictitious (to simplify the example) conversion table:
0:00:00.00 frame #1

0:00:00.03 frame #2

0:00:00.06 frame #3

0:00:00.09 frame #4

0:00:00.12 frame #5

0:00:00.15 frame #6

Then, the subtitles get the following frame slots:
#1  #3 Hello

#3  #4 Bye bye

#4  #6 Another
As the stop times indicate the first frame the subtitles are no longer visible, the showing frames will be:
#1  #2 Hello

#3  #3 Bye bye

#4  #5 Another
In this case, the final timeline goes as follows:
Frame #1 HELLO

Frame #2 HELLO

Frame #3 BYE BYE

Frame #4 ANOTHER

Frame #5 ANOTHER
If you thought "ANOTHER" would collide with "BYE BYE" because of the overlapping times, you were wrong. The point is that they overlap in time, but not in FRAMES. You will find the “Snap times to frames” tool in the Tools menu very useful to eliminate ambiguities like these.

To do
These features are not necessarily planned for future versions. They are only a draft for future work. If you think of something that you would really need, please let me know.
- A font scaling option.

- Save default settings to registry.

- LRU file list.

For suggestions, bug reporting and of course to ask me for the source files, you can contact me at


  • Avery Lee (, for VirtualDub and its subtitler filter, which inspired this program.

  • Kotus, for his excellent work with Sub Station Alpha.

  • Doom9 for his great DVD ripping/authoring site.

  • Nogami Saeko, Dave Flemming, Neil Nadelman for their feedback and (forced) beta testing.

  • Binary Technologies ( for their NexgenIPL libraries.

The database is protected by copyright © 2016
send message

    Main page