NOTE: This is a ported post from the old Mutaku site. Original post information:
Sunday, January 02 2011 @ 12:18 AM EST Contributed by: xiao_haozi
Sometimes you find the need to backup a personal DVD. There are many GUI tools available that are up to the task, but sometimes some good, old command-line magic is just what you need to get the job done… especially with some more troublesome tasks.
I recently received a personal video that had been burned to a dual layer DVD and region coded. I wanted to make a copy for myself but had some trouble getting the DVD to open in tools like K3B and K9Copy. So I went to some old command-line magic to get things done the simple and old school way.
I will simply outline each step quickly to give you an idea of how things are done and let you tweak things to meet your situation. Hopefully, things will be pretty evident where changes will need to be made to meet your personal setup such as device identifiers, file names, and audio/video quality preferences.
Also note, this is for personal, non-encrypted DVDs. This won’t work on commercial DVDs that use CSS based encryption and isn’t a tutorial intended for those purposes. This tutorial is aimed to backup your personal videos.
To briefly summarize, we will first do a direct copy of the DVD drive contents and make a temporary file with our project name “this_project”. We then will encode the contents using dvd quality parameters with mencoder (and these can be adjusted to suit your own space/quality limitations and desires). After creating the new DVD project with dvdauthor, giving use the appropriate video_ts and audio_ts directory structures, we write this to a DVD with growisofs.
The actual rip part:
dd if=/dev/sr0 of=this_project.iso
The mencoder part (this is all a one-liner) to create the DVD quality mpeg:
mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=dvd:tsaf\ -vf scale=720:480,harddup -srate 48000 -af lavcresample=48000 \ -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:\ vbitrate=5000:keyint=18:vstrict=0:acodec=ac3:abitrate=192:autoaspect -ofps 30000/1001\ -o this_project_dvdqual.mpg this_project.iso
Making the iso- create this xml called this_project.xml… here we won’t make any chapters:
<dvdauthor> <vmgm> <titleset> <titles> <pgc> <vob file="this_project_dvdqual.mpg"> </pgc> </titles> </titleset> </dvdauthor>
Now we will author the DVD with the structure we called for in the xml file and then burn the DVD iso image:
dvdauthor -o this_project -x this_project.xml growisofs -dvd-compat -Z /dev/sr0 -dvd-video ./this_project_dvd/
As you can see, it’s a pretty simple process. The most intimidating step is creating the temporary mpeg file with mencoder, but you can easily follow the writeup here if you wish to change any of the parameters. However, the ones I have chosen and outlined above should give you a pretty nice standard NTSC DVD format video. It’s really not that bad.