RSS feed logo RSS Feed | About Pantz.org
Puting video onto a DVD in linux
Posted on 05-31-2006 22:34:00 EST | Updated on 05-31-2006 22:34:00 EST
Section: /software/mencoder/ | Permanent Link

For this you will need the programs mencoder,mplayer,dvdauthor, and growisofs. On Debian based systems you can just apt-get these packages except for mplayer and mencoder. You can get those for Debian from here. Make sure you go to the mplayer website and download and install the full codecs packs. On debian theses should go in /usr/lib/win32/.

The lines below work like this: mencoder converts the video you have to a NTSC scaled DVD MPEG format. With Dvdauthor you will make a file called dvdauthor.xml and put the XML code below in it. Then edit it according to your file name and times in mins you want your chapters at. This is given to dvdauthor as a config file. The directory "DVD" is created with your new DVD files in it. You will then test this with mplayer by pointing it to your DVD directory. If it plays then it was created correctly. Growisofs is then used to burn the blank DVD in your drive in a DVD format. You will have to change the path to the DVD drive below to your DVD buring device. After it is burned you should be able to pop it in a DVD drive and it will just start playing the video. The following are an example of the commands in order.

Encode the file to DVD compliant format. Change anything you need below like aspect ratio or audio or video bitrate.

mencoder -oac lavc -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=6000:keyint=18:aspect=4/3:acodec=ac3:abitrate=384 -ofps 30000/1001 -o converted_video.mpg video_to_convert.avi

Use this as a template for your dvdauthor XML file. Create a file called dvdauthor.xml. Put in the code below. Chapters are in minutes. If you want to put another video in then put another "vob file=..." line below the first one. Change it according to your needs.

<dvdauthor>
  <vmgm />
    <titleset>

      <titles>
        <pgc>
          <vob file="converted_video.mpg" chapters="0,5:00,10:00,15:00,20:00" />
        </pgc>
      </titles>
    </titleset>

</dvdauthor>

Run DVD author program to create the dvd.

dvdauthor -o DVD -x dvdauthor.xml

Test that the DVD works.

mplayer dvd:// -dvd-device ./DVD

Burn the DVD to a blank DVD. Change /dev/hdb below to your DVD drive.

growisofs -dvd-compat -Z /dev/hdb -dvd-video ./DVD/

Del.icio.us! | Digg Me! | Reddit!

Related stories