PDA

View Full Version : DVD Subtitle limitations


MasamuneXGP
13th July 2004, 03:23
Heya. Seeing as I'm completely new at this, just got my DVD burner a few weeks ago, etc... I'd like get some information regarding exactly where the line is when it comes to the limits of DVD subtitles.

I recently learned about this Matroska media container that supports really fancy subtitles with different colors and fonts. I have a few Matroska files and I'm interested in transfering them to DVDs that will play in a standalone player... but are standalones even capable of displaying such fancy subtitles? I've seen fonts and colors vary in professional DVDs, but nothing really as fancy as what I'm seeing in these Matroskas... I think I heard somewhere that DVD subtitles are stored as bitmaps in the DVD itself, is that true? And is different positioning on the screen possible, not just bottom center? And if this is possible, what program would I use for converting Matroska's subtitle format (.ssa I think?) to whatever format DVDs use?

Thanks in advance.

unmei
14th July 2004, 14:45
Yes, the subtitles in a DVD are in picture format. It is often a picture that covers the entire screen therefore the text can be placed whereever you want. Also as they are pictures you are not limited to standard fonts - theoretically you can put any font your computer has installed at the time you convert the text to pictures.

Now the big limitation of DVD subtitles is each picture can have at most 4 colors out of 16. This is, there are 16 colors stored globally and each picture references 4 of them - it is a 2-bit paletted "BMP" (which also is RLE compressed but this is not important for the user). Also note that the transparency value of the colors is independent form the palette, for example you have a red in the palette, then you can use this red as fully opaque in one picture and half-transparent in the other - but the 4 colors each only have one transparency value in a picture. Practically this means you need 1 out of the 4 colors for the transparent background and one for the main text color. Then you have either one color for outline and one color to interpolate between two of the others or no outline and two colors to interpolate between fore- and background color.
This color limitation may also be the cause you usually don't see fancy fonts in DVDs - a fancy font with curly serifs and all will look very bad when you cannot interpolate (soften) its edges against the background.
In other words you risk the text will be very hard and annoying to read if you don't stick to plain clear fonts.

And the program you probably want to try can be found in the download section of the www.doom9.net website, in the subtitle section once you click "show all", it is called MaestroSBT and converts SSA to a format readable by the DVD authoring suites DVD Maestro and Scenarist.

MasamuneXGP
14th July 2004, 18:35
Thanks a lot unmei. I have a few (lot) more questions though:

1. Probably a stupid question but... Do the 16 colors have to be THE 16 colors of the standard system palette, or can they be any color you want out of all of 32-bit color?

2. Exactly how precise is this transparency value? Can I have a color be 78.2% transparent or does it have to be something like full, half, or none?

3. Forgive me for not understanding, but just to be clear, each of the 4 colors can have their own seperate transparency value correct? So I can have a fully transparent red, a half transparent blue, etc

4. For some reason, the .ssa file I demuxed from the Matroska can't be read by anything I have without having all kinds of symbols in the subs. This includes Sub Station Alpha itself (which I find very odd). The file is an "SSAv4" format according the comments in it. What program would I use for editing them? Or can MaestroSBT do that as well? Er, perhaps I should have tried it before writing this.. =x

Dimmer
15th July 2004, 01:21
Originally posted by MasamuneXGP
1. Probably a stupid question but... Do the 16 colors have to be THE 16 colors of the standard system palette, or can they be any color you want out of all of 32-bit color?

2. Exactly how precise is this transparency value? Can I have a color be 78.2% transparent or does it have to be something like full, half, or none?

3. Forgive me for not understanding, but just to be clear, each of the 4 colors can have their own seperate transparency value correct? So I can have a fully transparent red, a half transparent blue, etc 1. Each of the 16 colors is a 24-bit color. 16-color palette is set up for each PGC individually. (Don't worry, if you haven't found out what a PGC is you will very soon.)

2. Transparency has 16 levels (4 bit) from 0 (totally invisible) to 15 (opaque).

3. Each of 4 subpicture colors has its own transparency value for every subpicture.

unmei
15th July 2004, 15:10
an example for (3)
For a particular subpicture:
you picked 1=white, 2=black, 3=dark blue and 4=red from the 16 color palette - these have no transparency in the palette (like E-males said).
You could then decide red is your transparent background and then you assign 4 the transparency 0, if you want white your foreground you set the transparency of color 1 to F (=15) and finally dark blue should be the outline ..let's make that not quite opaque, transparency for color 3 to C (=12). If you are not going to have color 2 anywhere in the picture it doesn't matter what transparency (and palette entry) you assign to it.

For (4), in Matroska subtitles are stored in UTF-8 (a Unicode encoding). I think MaestroSBT like most other older tools will not recognise that. Open the SSA file in Notepad (yes the one from windows) and select "save as.."; in the save as dialog you see a dropdown "encoding" - change that to ANSI and save as new file. If now your subtitles are not english, ie a language your system has no codepage for you will have to use anther tool for the UTF-8 to ANSI ("codepage") conversion.

MasamuneXGP
15th July 2004, 21:49
Thanks very much, that's about it. The unicode/ANSI thing worked btw, thanks for the help =)

Schlumpf
16th July 2004, 18:52
How about "moving" subs?
I don't want fancy zoom or turning-effects, but let's just say there is text on the screen moving from the left to the right. Could I place my translation right below it, also moving?

Is there a limit how many subpictures you may include per Second?

Dimmer
17th July 2004, 02:51
Originally posted by Schlumpf
How about "moving" subs?
I don't want fancy zoom or turning-effects, but let's just say there is text on the screen moving from the left to the right. Could I place my translation right below it, also moving?

Is there a limit how many subpictures you may include per Second? You can have a separate subpicture for each video frame. If you have enough patience, you can have the subtitles move any way you want with the same framerate as video. To achieve this, you might want to look for software that can export video as a series of bitmaps, for example Macromedia Flash.

There is also an option to have a subpicture moving across the screen, but that's a fairly advanced function available only in professional authoring programs like Scenarist.