Easy DVD authoring revisited: Adding subtitles
Back on march I posted a method to author DVDs under linux. That post titled Easy DVD (with no menus) authoring using linux may not be the easiest way to author DVDs, there might be simpler solutions but as of today that method still works on Linux Mint 8 (Ubuntu 9.10). Now I’m in the need of adding subtitles to a video so that’s why I’m updating that Easy DVD authoring method to include subtitles on the DVD.
To add subtitles we are going to use spumux, wich is an open source utility that is part of DVDAuthor. Spumux multiplex subtitles into an MPEG stream. Its use is fairly simple:
spumux example.xml < example.mpg > example-with-subtitles.mpg
where example.xml is the configuration file that defines the way subtitles will be multiplexed.
Ok, let’s start. First of all copy the font you wanto to use to the .spumux directory on your home. That directory is where spumux looks for fonts so if it doesn’t exist create it because it’s necessary. I like Vera.ttf font so that’s the one I’ll use. Now create the XML configuration file with your favorite editor (that’s nano subtitle.xml) and add the following:
<subpictures>
<stream>
<textsub filename="subtitle.srt" characterset="ISO8859-1"
fontsize="27.0" font="Vera.ttf" horizontal-alignment="center"
vertical-alignment="bottom" left-margin="60" right-margin="60"
top-margin="20" bottom-margin="30" subtitle-fps="29.97"
movie-fps="29.97" movie-width="720" movie-height="472"/>
</stream>
</subpictures>just be sure to rename “subtitle.srt” to the name of the subtitle file you are using, also keep in mind that that the subtitle-fps and movie-fps value of 29.97 is valid for NTSC movies, for PAL those values should be “25.00”.
Now with the subtitle.xml file created, after combining the audio and video files with mplex and before using dvdauthor add the subtitles to the movie using the following spumux command mentioned before, just replacing “example.xml” with “subtitle.xml” and “example.mpg” and “example-with-subtitles.mpg” with your desired filenames.
After a while you will have subtitles on your movie. Happy DVD authoring and Happy New Year! See you on 2010!
0 comments
