1SPUMUX(1)                     DVDAuthor Man Pages                    SPUMUX(1)
2
3
4

NAME

6       spumux  -  generates  and  multiplexes subtitles into an existing mpeg2
7       program stream
8

SYNOPSIS

10       spumux [ -m dvd | -m cvd | -m svcd ] [ -s stream ] [ -v level ] [ -P  ]
11       file < mpeg > mpeg-with-subtitles
12
13

DESCRIPTION

15       spumux  encodes the subtitles and multiplexes it into the mpeg2 program
16       stream.
17
18       -m mode
19              Sets the encoding for the subtitles.  Can be dvd, cvd, or  svcd.
20              Default is dvd.
21
22       -s stream
23              Sets the subtitle stream id.  Default is 0.
24
25       -v level
26              Sets the verbosity level.
27
28       -P     Enables a progress bar.
29
30       Here's a sample configuration file:
31
32       <subpictures>
33          <stream>
34             <spu start="start-time" [ end="end-time" ] [ image="picture.png" ]
35                  [ highlight="picture.png" ] [ select="picture.png" ]
36                  [ transparent="color-code" ] [ force="yes" ]
37                  [ autooutline="infer" [ outlinewidth="width" ]
38                    [ autoorder="rows" | autoorder="columns" ] ]
39                  [ xoffset="x-coord" yoffset="y-coord" ] >
40                <button [ name="name" ] [ x0="x0" ] [ y0="y0" ] [ x1="x1" ]
41                        [ y1="y1" ] [ up="name" ] [ down="name" ]
42                        [ left="name" ] [ right="name" ] />
43                <action [ name="name" ] />
44             </spu>
45          </stream>
46       </subpictures>
47
48       Each  subtitle  image  is  described  by  an  <spu> tag.  The start and
49       optional end attributes describe when the subtitle will be displayed on
50       the  screen,  in "HR:MM:SS.HU".  The image attribute describes the main
51       subtitle image, which can either be a PNG or BMP file.  If  your  image
52       is not a full screen image, you can use xoffset and yoffset to move the
53       picture around.  In the advent that the  author  is  unable  to  use  a
54       graphics  format  with an alpha channel, then the transparent attribute
55       can be used to describe which color should  become  fully  transparent.
56       The color is in hexadecimal as "RRGGBB".  If you want to force the dis‐
57       play of the subtitle, regardless of whether the user has enabled subti‐
58       tles or not, you can use the force tag.  When you are making menus, the
59       force tag is required.
60
61       The remaining attributes and tags are related to  menu  creation.   The
62       highlight  attribute shows what all the buttons look like when they are
63       highlighted (i.e. when you are using the arrows in the menu),  and  the
64       select  attribute  shows  what  all  the buttons look like when the are
65       selected (i.e. for the 1-2 seconds after you press enter in the  menu).
66       If  either  of  these (or the image attribute) are omitted, then spumux
67       creates a blank (totally transparent) image.  Obviously  at  least  one
68       tag should be specified.
69
70       To  aid  in button creation, the autooutline attribute instructs spumux
71       to infer where the buttons are located.  It does this by attempting  to
72       draw rectangles around a composition of the highlight and select images
73       which do not intersect any opaque or semi-opaque pixels.  In  order  to
74       support textual buttons, the attribute outlinewidth allows you to spec‐
75       ify the width of the rectangle which is tested.  Wider rectangles won't
76       be  able  to squeeze between the letters.  Finally, autoorder describes
77       which way to order the automatically detected buttons, which is  impor‐
78       tant for numerically selected buttons and for mapping buttons to button
79       names or to the implied names.
80
81       The button and action tags describe  the  buttons  (visibly  selectable
82       objects  on the screen) and actions (commands that are executed as soon
83       as the associated key is pressed on the remote).  If you are using  the
84       autooutline  feature,  just  designing  buttons,  are  happy  with  the
85       inferred button navigation, and can deal  with  the  simplistic  naming
86       system,  then  you  actually do not even need to specify any buttons or
87       actions.  Otherwise, read on.
88
89       The name attribute is used to give a button or action an easy to  refer
90       to  name.  By default they are numbered sequentially starting with "1".
91       The up, down, left, and right names describe  which  button  or  action
92       should  be  tied  to  the  corresponding key when the current button is
93       highlighted, though if omitted spumux will use a reasonably intelligent
94       algorithm to determine which buttons to move to.
95
96       The  (x0,y0)  coordinates  describe  the  upper left hand corner inclu‐
97       sively, while the (x1,y1) coordinates describe  the  lower  right  hand
98       corner  EXclusively.   The  coordinates start at 0,0 for the upper left
99       hand corner.  Ideally, the y0 and y1 coordinates should both  be  even,
100       so  the  button  edges fully empasses two interlaced scanlines, even if
101       there is no data in the extra scanline.  Some DVD players will fill  in
102       the  extra  scanline  if it is not specified; spumux makes an effort to
103       ensure that will be transparent but there is no guarantee.
104

HANDLING TEXT BASED SUBTITLES

106       Spumux is also able to handle text subtitles, which will be rendered to
107       graphics  by spumux. A lot of different text (must be non-graphic) for‐
108       mats are supported (.sub, .srt, .ssa, .smi, .rt  ,  .txt,  .aqt,  .jss,
109       .js, ass).  Spumux will try to determine the format automatically.
110
111       If processing textbased subtitles no other streams can be defined, but‐
112       tons or others need to be processed in another pass with spumux,  using
113       another xml file.
114
115       Following  .xml  file  shows  the available tags and their default set‐
116       tings.  Only the textsub tag is mandatory, defaults  are  used  if  the
117       specific tag is not specified.
118
119       <subpictures>
120          <stream>
121             <textsub filename="demo1.srt" characterset="ISO8859-1"
122                fontsize="28.0" font="arial.ttf" horizontal-alignment="left"
123                vertical-alignment="bottom" left-margin="60" right-margin="60"
124                top-margin="20" bottom-margin="30" subtitle-fps="25"
125                movie-fps="25" movie-width="720" movie-height="574"
126                force="yes"
127             />
128          </stream>
129       </subpictures>
130
131       The  textsub  tag defines the settings for the text to graphics render‐
132       ing.
133
134       The filename attribute defines the path and name of the input text sub‐
135       title file, this is the only attribute that is mandatory.
136
137       The  characterset attribute defines the characterset to be used, avail‐
138       able charactersets can be  found  at  http://www.gnu.org/software/libi
139       conv.
140
141       The fontsize attribute defines the size of the font in font units.  The
142       font attribute defines the font used. Spumux will look  into  the  home
143       directory  in  subdirectory .spumux for fonts on linux systems and will
144       look into the windows/fonts and subdirectory spumux of the cygwin/mingw
145       home  directory and into the exucution directory for windows based exe‐
146       cution for the specified font. Looking for free fonts? One  listing  is
147       here                                  http://www.microsoft.com/typogra
148       phy/links/links.asp?type=free&part=1 (this is  only  about  fonts,  not
149       about operating systems).
150
151       The  horizontal-alignment attribute defines the horizontal alignment of
152       the subtitles. Options are: "left", "right",  "center"  and  "default".
153       The  "default"  value causes spumux to use the attribute that is in the
154       text subtitle file if the format supports such an attribute.
155
156       The  vertical-alignment  attribute  defines  the  vertical   alignment.
157       Options are: "top", "center" and "bottom".
158
159       The  margin attributes define the minimum blank pixel space between the
160       border of the image and the border of the subtitle lines.
161
162       Defining the subtitle-fps and movie-fps attributes make it possible for
163       spumux to recalculate the subtitle timing if these are not the same.
164
165       The  movie-width and movie-height attributes define the maximum size of
166       the subtitle page, these shouldn't be larger than the fram-size of  the
167       movie  frame,  normally  they  are the same. Some DVD-players more like
168       subtitle frames that are 2 or 4 pixels smaller in height.
169
170       The force option allows you to  force  the  display  of  the  subtitle,
171       regardless of whether the user has enabled subtitles or not.
172
173
174
175                                13 January 2007                      SPUMUX(1)
Impressum