MicroDVD was a proprietary player and format from Tiamat Software, first released in March 2000 and developed until 2001. No full specification has been published, so this page reports what public descriptions and the FFmpeg reader establish.
One subtitle
A file is plain text with one subtitle per line:
{start}{end}text
| Part | Format | Meaning |
|---|---|---|
{start} | Decimal integer in braces | The frame at which the subtitle appears. |
{end} | Decimal integer in braces, or empty {} | The frame at which it disappears. FFmpeg gives an empty end an unknown duration. |
text | Rest of the line | The subtitle, with optional control codes. |
| | Vertical bar | Breaks the text onto a new display line. |
At 25 frames per second, {0}{25}Hello! lasts one second. The time depends
entirely on the frame rate of the video the file was made for.
Frame rate line
The format has no header field for the frame rate. By a convention among players, the first line of many files holds it as the text of a subtitle at frame 1:
{1}{1}25.000
FFmpeg recognises such a line within the first three lines when its frame number is at most 1 and the number is above 3 and below 100. Without one, it assumes 23.976 frames per second unless told otherwise.
The DEFAULT line
A line beginning {DEFAULT} sets formatting for the whole file:
{DEFAULT}{}{C:$FF0000}{F:DeJaVuSans}{S:10}
Its codes are written in upper case. FFmpeg looks for this line only among the first
three lines and uses the text after the 11-character {DEFAULT}{} prefix
as the track’s default style.
Telling it apart
The extension .sub is shared with other subtitle formats, notably the
binary half of a VobSub pair. FFmpeg decides by
checking that each of the first three lines, after an optional UTF-8 byte order mark,
has the form {N}{}text, {N}{M}text or
{DEFAULT}{}text.
Not confirmed
Character encoding is not defined. Files are usually a local code page, or UTF-8 when a byte order mark is present.