|
DVD to CD backup
UPDATE dvdripui.pl is easier to use than dvdrip.pl (below), but does have the extra requirement of needing the Curses::UI Perl module to run in addition to the packages listed below. There are some very basic instructions inside the script itself, but it should be fairly self-explanatory. dvdripui.pl is not intended to work for everybody, but it probably will without having to edit it, or with very minimal editing. When you run dvdripui.pl, you'll see a text based GUI something like this .. - DISC - title BS2_1 vmg_id DVDVIDEO-VMG provider_id longest_track 1 video NTSC 720 x 480 @ 29.97fps duration 1h 59m 31s audio [0x80, 6ch, Japanese ] subtitles [0x21, en, English, Undefined ] - OUTPUT - target size [700MB ] audio bitrate [128kbps ] [q]uit [t]est [d]dump You can select an audio track and subtitles by using tab to move between the fields, and using the up / down arrows or enter to make a selection.. Press 't' to start MPlayer and verify that you've chosen the audio and subtitles you want to rip (press 'q' to exit MPlayer). Press 'd' to popup a dialogue box with the appropriate mencoder command line, press 'q' to quit. Like I say - it should work for you. I wrote it for myself, so it may not be exactly what you want .. but feel free to hack it and pass it on. This a very brief HOWTO describing the method that I use to backup my video DVDs to a CD in Linux. I'm not claiming that this is the easiest / fastest / most reliable method, just that it works for me and suits my limited attention span. Software requirements:
Each of the above packages comes with enough documentation to allow you to compile and install them so I'm not going to cover that here. Obviously they need to work for what follows. In the case of MPlayer I would suggest that you compile it with as many of the optional packages supported as possible. The MPlayer website has a comprehensive list of mandatory and optional libraries - use it and install everything! NB: Here's what I would do:
Then drop a DVD into your drive and, as an ordinary user, try running lsdvd. If it complains that it can't find a library or that encrypted discs aren't supported, then you need to make the libdvdcss and libdvdread libs available. This is what I did as root: cd /usr/lib ln -s /usr/local/lib/libdvdread.a libdvdread.a ln -s /usr/local/lib/libdvdread.la libdvdread.la ln -s /usr/local/lib/libdvdread.so libdvdread.so ln -s /usr/local/lib/libdvdread.so.2 libdvdread.so.2 ln -s /usr/local/lib/libdvdread.so.2.0.2 libdvdread.so.2.0.2 ln -s /usr/local/lib/libdvdcss.a libdvdcss.a ln -s /usr/local/lib/libdvdcss.la libdvdcss.la ln -s /usr/local/lib/libdvdcss.so libdvdcss.so ln -s /usr/local/lib/libdvdcss.so.2 libdvdcss.so.2 ln -s /usr/local/lib/libdvdcss.so.2.0.8 libdvdcss.so.2.0.8 Try lsdvd again. If you get some kind of reasonable looking output you're now officially 90% of the way there. Next thing I do is to run dvdrip.pl. dvdrip.pl is a Perl script that makes life a little easier for me. It uses lsdvd to return all of the important information about a DVD that I need for backing up purposes. Download the file, make it executable and run it. You should see something like this (for The Transporter, PAL, region 2 - I've broken the long lines to preserve the page layout).. Running lsdvd .. DONE Longest track is 1 Video: 5303.16 sec / 88 min, PAL, 16/9, 720x576 @ 25fps Audio #128: English, Undefined, ac3, 48000KHz Sample: mplayer -quiet dvd://1 -aid 128 Rip : mencoder dvd://1 -aid 128 -ovc lavc -lavcopts vcodec=mpeg4:vhq:vbitrate=927\ -vop scale -zoom -xy 640 -oac mp3lame -lameopts br=128 -o TRANSPORTER.avi Audio #129: English, Undefined, ac3, 48000KHz Sample: mplayer -quiet dvd://1 -aid 129 Rip : mencoder dvd://1 -aid 129 -ovc lavc -lavcopts vcodec=mpeg4:vhq:vbitrate=927\ -vop scale -zoom -xy 640 -oac mp3lame -lameopts br=128 -o TRANSPORTER.avi Audio #130: English, Undefined, ac3, 48000KHz Sample: mplayer -quiet dvd://1 -aid 130 Rip : mencoder dvd://1 -aid 130 -ovc lavc -lavcopts vcodec=mpeg4:vhq:vbitrate=927\ -vop scale -zoom -xy 640 -oac mp3lame -lameopts br=128 -o TRANSPORTER.avi dvdrip.pl works on the assumption that the longest track on the DVD is the one you want to backup. Sorry. If that's not what you want you'll need to look elsewhere. OK, so the first 3 lines of the output are just for informational purposes and are fairly self-explanatory. The following blocks are for each audio channel associated with the longest track. In the above example, there are 3 usable audio tracks which are all described as 'English', which isn't very much help because you don't want to backup a DVD with the director's commentary when you really wanted the regular soundtrack. dvdrip.pl works for me. Each 'Sample' entry is a command line that I run (I copy and paste with my mouse) that will start MPlayer and ask it to play the DVD with that audio track. I use this to make make sure I'm about to back up the correct audio track. When I've found the correct audio track, I then copy and paste the 'Rip' line that is immediately under the correct 'Sample' line and .. err .. that's it. mencoder should now produce an AVI file of a size suitable for backing up to a single CD. dvdrip.pl accepts exactly one, optional, command line parameter - the approximate output file size. If you run dvdrip.pl without this parameter it will assume that you want to create an AVI file of approximately 700MB that will fit onto a single CD. You can override this behaviour by telling dvdrip.pl to aim for a smaller, or larger, file size by supplying a target file size in kilobytes on the command line. e.g. dvdrip.pl 350000 .. will produce an AVI of roughly 350MB in size. You should be careful with this. dvdrip.pl assumes that you want to encode the audio at 16Kb/s - this means that there is a set overhead storage requirement just for the audio data (think 16Kb for every second in the movie). If you specify a target file size that is less than this overhead, dvdrip.pl will produce a mencoder command line where 'vbitrate=' is followed by a negative number. This won't work. Obviously. If you want to produce smaller AVI files, experiment with different file size values until you find something usable. Or you could always hack dvdrip.pl to do your bidding. |
||||||||||||||||||||||||||||||||||||||||||||||||||||