Things you might want to install:
transcode
ffmpeg
mplayer
xine
dvdauthor
dvd+-rw-tools
My list of websites to this topic:
Foto & Video
I assume, that you have already edited your video (using e.g. cinelerra or Kino) and that you have exported your movie to an uncompressed DV-avi stream. If your favourite video editor allows exporting mpeg2 streams you can skip the first step.
Part1: Preparing the pieces:
First thing is to convert the DV-avi to an mpeg stream. There are different ways to do so, e.g. using transcode or mplayer, but I will using ffmpeg in the following.
Next step is to extract the movie and audio stream out of the freshly created mpeg file:
I’m using mpeg2 audio as it has sufficient audio quality. The above noted ffmpeg command produces an ac3 audio stream which you can also use if you want. In this case, extract it using -x ac3 and skip the conversion to mp2. Using cinelerra you can also create ac3 sound with a multi-speaker setup, so you don’t need the steps above.
Part 2: Combining the pieces
Done that you’ll have to put the pieces together again to a mpeg-file for dvdauthor. Do this using
If you want subtitles you need to create two files: One containing the actual subtitle text with start and end information, let’s call it subtitle.srt:
1
00:00:05,500 --> 00:00:07,000
Subtitle one
2
00:00:08,900 --> 00:00:10,000
You can write long sentences if you want, they will be wrapped automatically. <subpictures>
<stream>
<textsub filename="subtitle.srt" characterset="ISO8859-1"
fontsize="24.0" font="Verdana.ttf" horizontal-alignment="center"
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>Part 3: Creating a menu
You need an image of 720x576 (for PAL that is). Gimp has templates for this. Here you simply paint the buttons on the background but be aware of overscan, so to be on the safe side leave a margin of about 120px on the left and right side and about 10px from above and below. So, if you’re using gimp, create your background image and then add a new transparent layer. Select the newly created layer and paint the button outlines around your button for the higlighting effect. Next, duplicate this layer and change the color of your button outlines for the selection effect. Finally, select only the background image and save it as background.jpg.
Now, select only the layer with the highlight buttons and save this as background_high.png and do the same step for the selection buttons and save it as background_select.png.
It is important that those png files don’t contain more than four colors where the transparency also counts as color! If you want to have some fancy shadow effects or something else this probably won’t work.
The next step is to create a mpg movie out of the images:
Also we need some silence audio.
If you want you can also use some real music. In this case make sure you have enough movie material (read enough frames) matching your audio. You can tune this with the -n100 parameter above in the ppmtoy4m command by increasing the number of frames.
Now, we need again to combine audio and video:
To embed the buttons to the video, we again use spumux. Save the following as menu.xml
<subpictures>
<stream>
<spu start="00:00:00.0" end="00:00:00.0"
highlight="background_high.png"
select="background_select.png"
autooutline="infer"
autoorder="rows"/>
</stream>
</subpictures>Then run spumux:
Part 4: Build the DVD
Finally all the pieces need to be combined in a DVD structure which is done using dvdauthor. Again we need a xml file to describe the content of the DVD, we call it dvd.xml. There are several menu hierarchies: You have one menu at the root of the DVD (the vmgm one, the title-menu of the DVD) from where you can jump to the menus of the different titlesets. A DVD may contain one or more titlesets and you can have several menu pages per menu simply by defining several menu files. For a detailed explanation of the possible menu hierarchies visit http://www.tappin.me.uk/Linux/dvd.html
<dvdauthor dest="/output/directory/DVD">
<vmgm>
<menus lang="de">
<video format="pal" aspect="4:3" resolution="720x576" />
<pgc entry="title">
<pre>jump titleset 1 menu;</pre>
</pgc>
</menus>
</vmgm>
<titleset>
<menus>
<pgc entry="root">
<button>jump title 1;</button>
<button>jump title 2;</button>
<button>jump title 3;</button>
<button>jump title 4;</button>
<button>jump menu 2;</button>
<vob file="menu.mpg"/>
</pgc>
</menus>
<titles>
<audio lang="de" />
<audio lang="de" />
<subpicture lang="de" />
<pgc>
<vob file="title1.mpg" chapters="0,12:51,17:16,23:20"/>
<post>jump title 2;</post>
</pgc>
<pgc>
<vob file="title2.mpg"/>
<post>jump title 3;</post>
</pgc>
<pgc>
<vob file="title3.mpg"/>
<post>jump title 4;</post>
</pgc>
<pgc>
<vob file="title4.mpg" chapters="0,8:01,11:29"/>
<post>call menu;</post>
</pgc>
</titles>
</titleset>
</dvdauthor>The DVD structure can now be created using
Some general notes:
If you want to use DVD+R DL etc. have a look what your DVD writer is setting as booktype for the DVD. Many standalone DVD players require this to be set to "DVD-ROM". You can toggle this on some writers using dvd+rw-booktype prior to burning the DVD. If this is not possible with your writer you’ll have to look for another way to burn your DVD. Also be aware of the layer change which can cause some trouble with certain DVD players. I’ve finally split my data to two ordinary DVD-R...




