
MicroDVD

MicroDVD is a subtitle file format for digital video. Its name is derived from the MicroDVD Player, a media player application designed to play DVD videos along with subtitles, originally developed by Tiamat Software. The application was first released in 2000 but development ended in 2001. Media players that support the format are able to interpret MicroDVD subtitles and mix their contents with their corresponding video files.
Format.
Specification.
MicroDVD subtitle files have the filename extension. These files may come along with a video file and/or created/modified by the user. Media player applications that support external subtitle files are usually responsible for locating correct files.
MicroDVD subtitle files consist of multiple lines, each defining a portion of the subtitle text that must be displayed between certain given video frames. The line syntax is:
codice_1
For example, if "Hello!" is to be displayed during the first 25 frames of a digital video, clip or movie, the corresponding file must contain the line:
codice_2
The duration of the text being displayed depends on the frame rate of the corresponding video file. For example, if the frame rate of the corresponding video file is 25 frames per seconds and the subtitle file in last example is accompanied with, "Hello!" is displayed for one second.
The software the MicroDVD Player expects the subtitle file to begin with the tag [BEGIN], and end with the tag [END].
Control Codes.
The font size cannot be configured in .sub files, only in player, but the font style of the subtitle displayed may be changed using control codes. The available control codes and their purpose are given:
The control code codice_3 defines font style.
codice_4
"Hello!" is displayed in italic.
codice_5
"Hello!" is displayed in bold.
codice_6
"Hello!" is underlined.
codice_7
"Hello!" is stroked.
The control code codice_8 defines font name.
codice_9
"Hello!" is displayed using the defined font, with the string "fontname" determining the desired font. For example:
codice_10
"Hello!" is displayed in the Arial typeface.
The control code codice_11 defines font size.
codice_12
"Hello!" is displayed at the defined font size, with the string "size" determining the desired size as an integer number. For example:
codice_13
"Hello!" is displayed at the font size of 10.
The control code codice_14 defines font color.
codice_15
"Hello!" is displayed in a defined color. The color format is: $BBGGRR (8 bits blue, 8 bits green and 8 bits red). For example:
codice_16
"Hello!" is displayed in full intensity red.
Note that this is not standard RGB color model, instead the color order is reversed.
The control code codice_17 defines subtitle position relative to video.
codice_18
"Hello!" is displayed at the coordinates (X,Y).
Each line in the subtitle normally displays as a single line. However, the pipe character may be used to break a single line into multiple lines. For example:
codice_19
The above code displays as follows:
codice_20
On the other hand,
codice_21
The above code displays as follows:
codice_22
codice_23
In this case, it is possible to define display values of each line or the whole subtitle line . If the control code is in upper case, it affects the whole subtitle line. If the control code is in lower case, it affects only the line it is contained in. For example:
codice_24
The above code will display as two lines of italic text. But,
codice_25
The above code will display as two lines; the first line in italic, and the second line in bold.
Note that if no more code is used after a pipe character, the following lines will retain the same formatting.
Note that the subtitle positioning code codice_17 must be logically always used in uppercase.
It is also possible to use multiple codes at once. Here is an example:
codice_27
"Hello!" will be displayed underlined and in bold, in red and in the DeJaVuSans font at 12 points.
The default display values for a complete subtitle file may be defined using codice_28, which will override particular line formattings. For example, the following code may be used to display all subtitle line using DeJaVuSans at 10 points and in blue:
codice_29
This line of code may be placed anywhere in the subtitle file. Also note that in this case, all control codes are in uppercase. There is also a code codice_30 to define a particular character set to use:
codice_31
Defines that the Greek character set should be used. This code can be used only in the {DEFAULT} line.