DVD Subtitles (with spumux and Windows)

The knowledge of turning text-only subtitles into something that can be burned onto a DVD (to be viewed in a DVD player) seems somewhat scattered when writing this, so I decided to put together my own notes for future reference.

What you should already have at this point:

  • your video pre-muxed – i.e. an MPEG file containing both the video and the audio (in this example we’ll call it movie.mpg)
  • your subtitles in a subtitle format text file (the_subtitles.srt in this example)

What you will end up with is an MPEG file with the subtitles muxed together with the video and audio tracks. Note: At this time, I do not know how to make the DVD display the subtitles when selected from a menu, nor automatically when the movie is played. A software DVD player (I use PowerDVD) does allow me to select the subtitle track from the DVD to be played, but I doubt it can be achieved with a stand-alone player. I do not know if DVDStyler currently even supports making DVDs with selectable subtitles. If you know it does, and also know how it’s done, please comment below.

Ok, here’s how to proceed:

  1. First, you need the dvdauthor package, which has spumux for Windows in it (release 0.6.9 is the highest one with pre-compiled Windows binaries available on the site at the moment). Put it somewhere in your path, or more typically, put it somewhere and then add the location to your path, as there’s a heap of files and I’m not sure which ones are necessary for spumux to do its thing.
  2. You then take the font you wish to use (from C:\Windows\Fonts\) – say, Arial (arial.ttf) – and copy it in the same directory with your video. This probably isn’t necessary, but it eases writing the config file in the next step, as you don’t need to specify paths there. It seems that providing the path from within the XML file doesn’t work – at least I got a maybe the font path is wrong notice when I tried it.
  3. Next, you create an XML file – we’ll name it config.xml in this case – in your video directory, with the following contents:

    <subpictures>
     <stream>
      <textsub filename="the_subtitles.srt"
        characterset="ISO8859-1"
        fontsize="28.0" font="arial.ttf"
        horizontal-alignment="left"
        vertical-alignment="bottom"
        left-margin="60" right-margin="60"
        top-margin="20" bottom-margin="30"
        subtitle-fps="25" movie-fps="25"
        movie-width="720" movie-height="576"
      />
     </stream>
    </subpictures>

    Feel free to adjust the parameters to your taste and/or need.

  4. Then you call spumux to do the subtitling:

    spumux config.xml < movie.mpg > movie_subtitled.mpg

I nicked most of this off a PDF file (Eli Billauer’s DVD Authoring in Linux). The contents of config.xml seem to be originally from spumux’s man page.