Image

Imagebrutal_truth wrote in Imagelinux

DVD Creation in Linux...

I figured this out last night with a large pot of coffee... You want to make a DVD out of some avi files? You will need a few things. First you will need mplayer. Second you will need dvdauthor. Third you will need dvd+rw-tools. Fourth you will need a dvd burner and a blank dvd-r. So assuming that you have those, let us begin!

The encoding of the avi file(s) is the reason you need to have mplayer.
The video format of a dvd is fairly simple mpeg. The audio is ac3. To check your file(s) run the following command at your terminal:

mplayer -vo dummy -ao dummy -identify *.avi 2>&1 | grep AUDIO_FORMAT | cut -d '=' -f 2

If the format of the audio for avi file(s) is correct it should return hwac3. However, this is usually not the case (most people will get a number, 85). And, if you are lucky, unlike the rest of us, you will need to take the following step:

mencoder -oac copy -ovc lavc -of mpeg -mpegopts format=dvd -vf scale=720:480,harddup -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:keyint=18:aspect=4/3 -ofps 30000/1001 -o filename.mpg filename.avi

If you are unlucky, do the following:

mencoder -oac copy -ovc lavc -of mpeg -mpegopts format=dvd -vf scale=720:480,harddup -srate 48000 -af lavcresample=48000 -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:keyint=18:aspect=4/3:acodec=ac3:abitrate=192 -ofps 30000/1001 -o filename.mpg filename.avi

Your next step is rather easy really. Create an XML document with the following content:

<dvdauthor>
  <vmgm />
    <titleset>
      <titles>
        <pgc>
          <vob file="filename.mpg" />
          <vob file="filename2.mpg" />
        </pgc>
      </titles>
    </titleset>
</dvdauthor>


After that is done you will need to execute the following:

dvdauthor -o dvd -x dvd.xml

This will create the DVD layout that you will need. To burn that to disc you can use the following command, or a burning program such as GnomeBaker, or k3b. The command is:

growisofs -dvd-compat -Z /dev/dvdrw -dvd-video ./dvd/

Just be sure to replace /dev/dvdrw with you computer's dvd device name, such as /dev/sr0, or /dev/cdrom.

That should do it, so pop it in the player, kick back and enjoy!

(this was done on GoboLinux and Slackware Linux, if it does not work on your distribution, let me know)