miniDVD Subs

Authoringware, the maker of DVD Quick Builder and DVD Wise have their own subtitle editor but I have never seen it. This page is here to provide you instructions on how to use subtitle scripts that you can load into StreamWeaver when muxing the VOB. 

You'll notice that the structure of a subtitle file is not so different from the ones used for SVCD, so maybe someone can write a software that will take the ouput of SubRip and convert it to that format. Since SubRip now also writes down positions and timecodes during graphical subtitle ripping it shouldn't be too hard to achieve.

A subtitle file looks like this:

[general]
properties of the general section
[st0001]
properties of the first subtitle
[st0002]
properties of the second subtitle
etc..

The [general] section can contain the following:

left=40
top=400
width=560
height=20
bgcolor=000 000 000 015
fgcolor=255 255 255 015
font=Arial
smoothing=0
pensize=2
fillmode=0

The parameters in this section include:

Left, Top, Width and Height - Parameters define the location and size of the sub title area relative to the top left corner of the sub picture display screen. The size and position of the rectangle assignment must fit within the full screen size of the sub picture raster image, 720x478 for NTSC and 720x574 for PAL. The width of the rectangle area must be sufficient to accommodate the maximum length text within the script file. The character size used by StreamWeaver is based on the font and the height of the display rectangle. For television display it is suggested that a height of 20 be the minimum attempted. Any smaller may result in test that can not be read or is illegible.

Bgcolor - Parameters that define the text background color and opacity. The first 3 fields define the color to be used in the RGB format. The last field defines the opacity where 0 is transparent and 15 is opaque.

Fgcolor - Parameters that define the foreground text color. The first 3 fields define the color in the RGB format. The forth field defines the opacity with 0 for transparent and 15 for opaque.

Font - A parameter that defines the font to be used. Any font that is available in Windows can be used however you should attempt to always use a True Type font if possible.

Smoothing - A parameter that is set to 0 to indicate no edge smoothing and to 1 to indicate use of edge smoothing. Edge smoothing should not be attempted if the height of the text rectangle is less than 40.

Pensize - This parameters defines the pen size which only applies if graphic sub titles are being used. If text sub titles are being used, the normal case, then pen size has not application.

Fillmode - A parameter that is set to 0 to disable the function and to 1 to enable the function. This parameter only applies if generating graphic sub pictures. Text sub pictures is the norm for sub titling applications

The [stXXXXX] section can include the following

type=1
line1text=Now is the time for all good people
line2text=to come to the aid of their country.
imagefile=c:\temp\st0001.bmp
timecode=000 000 010 010
outtimecode=000 000 020 000
alignment=1

Parameter definitions include:

Type - Parameter that defines the type of sub picture being created. In the case of sub titling this should always be set to 1.

Line1text - Is required for all [stnnnn] sections. It defines the text monologue to be rendered on line 1 of the sub title text.

Line2text - Is an optional second line of monologue text. When 2 lines of text are used the second line is located immediately below the first using the same rectangle parameters offset by the height of the line 1 text rectangle.

Imagefile - A parameter that defines the path and name of the sub picture raster image file to be rendered for this monologue sub picture. The file type is always *.BMP.

Timecode - A parameter that defines the synchronization time for this sub picture. The time code is relative to the beginning of the associated video file. The time code files are arrange in order Hour, Minute, Second and Frame.

OutTimecode - An optional time code assignment. When used this time code indicates the end of display of this sub title message. The difference in time between Timecode and OutTimecode is the duration of the sub title message.

Alignment - This parameter indicates the alignment of text within the defined rectangle.

0 for aligned left
1 for aligned center
2 for aligned right

And a word about subtitle file formats in general

Sub Picture files are included into StreamWeaver as Windows *.BMP raster image files. The raster image file must comply with the following.

The format must be 8 bits per pixel, e.g. 256 color.

The resolution must be no larger than:

Resolutions that are less than these maximums are supported however the width and height assignments must be divisible by 2.

Within the raster image the following color assignments are made. No other colors may be used within the raster image for sub picture.

The area of interest color (Blue) can be used to draw a rectangle around the area of interest within the raster image file. The area of interest would contain the content of the sub picture. If this option is used then StreamWeaver will automatically crop the sub picture to the area of interest. If area of interest is not used then StreamWeaver will treat the entire raster image file as the sub picture.

StreamWeaver automatically encodes the sub picture raster image to the DVD-Video sub picture format. As part of this process StreamWeaver also creates a sub picture palette file. The sub picture palette file contains the first 16 colors from the palette of the raster image file it is created from. These palette files can be incorporated into the title as a part of authoring thus allowing use of the colors when presenting sub pictures.

During the sub picture encoding process StreamWeaver will verify the sub picture conforms with the requirements of DVD-Video. One of these requirements is that the resulting sub picture be less than 56K bytes in size. In the event the encoded picture exceeds this limit StreamWeaver will report an error. Recovery from this error will involve redesign of the sub picture to allow its being encoded within the constraints of DVD-Video.

This info was more or less taken directly from the DVDMotion user manual. I hope I won't get sued for taking this. I took the liberty of runing it thru a spell-checker <g>