turning subtitles on with dvdauthor
Forced subtitles vs. normal subtitles
This example config for spumux adds 2 seconds of normal subtitles and 2 seconds of forced subtitles to the test clip
spumux_config.xml
<subpictures> <stream> <spu start="00:00:00.00" end="00:00:02.00" image="test.png" force="no" /> <spu start="00:00:02.00" end="00:00:04.00" image="test.png" force="yes" /> </stream> </subpictures>
This example config for dvdauthor has three titles. Each title consists of the same clip made with the config above. Before each title a <pre> command sets the subtitle to show and after each title a <post> command jumps to the next title.
- The first title will show no subtitles.
- For the second title the subtitles are set for stream 0 (first stream), but it will not be shown except if it is forced subtitles.
- For the third title, subtitles are also set for stream 0. But now all subtitles will be shown.
To enable both forced and unforced subtitles you have to add 64 to the subtitle stream nr.
dvdauthor_config.xml
<dvdauthor dest="test" > <vmgm> </vmgm> <titleset> <titles> <pgc> <!-- no subtitles are set --> <vob file="sub.mpg" /> <post> jump title 2; </post> </pgc> <pgc> <!-- set subtitle register (SPRM 2) to stream 0 only forced subtitles of stream 0 will be shown --> <pre> subtitle=0; </pre> <vob file="sub.mpg" /> <post> jump title 3; </post> </pgc> <pgc> <!-- set subtitle register (SPRM 2) to stream 0 forced subtitles and regular subtitles of stream 0 will be shown --> <pre> subtitle=64; </pre> <vob file="sub.mpg" /> <post> jump title 1; </post> </pgc> </titles> </titleset> </dvdauthor>
You can also inlude these commands in the <button> sections if you wanted to.
Most dvd players will allow you to turn each subtitle stream on/off as you desire - ignoring these commands.
These test clips worked as expected when I tested it in xine, but ogle for some reason only showed the subtitles when everything (64) was turned on.
If you want more detailed control over the <pre> and <post> commands I can recommend a free program called pgcedit. It has a handy trace mode that you can use to step through the dvd commands and get an idea of what is going on. You can also use it to change the subtitle color table and various other options after the dvd was authored.