README

Need more useless stuff to read on teh internetz?

DVD Ripping, Linux-Style

Posted by anjilslaire on August 21, 2008

Yeah, I’m a slacker. been 2 weeks since last post. That’s a problem with Linux: Things don’t often break when you get it up  running 🙂

OK, today I’m going to give a rundown on how to rip & encode your precious DVD movie collection from the original disc to xvid format (.avi) which is playable and convenient to stream across your LAN to your display of choice, therefore removing the need to keep using (and potentially scratching) your discs.. In my case, that’s a TV with an XBMC-enabled xbox.

1. Ripping from the original media
Most DVDs are encrypted with some scheme to prevent your backing up of your own purchased media. Now, truth be told, the decrypting tools native to Linux are not on par with those available to Windows. Sony’s ARccOS protection is pretty crafty, and frankly does a rough job to the dvd standard spec. Luckily, there are relatively few discs with this garbage on them.

In many cases, the now-defunct DVDShrink works great to rip the vast majority of titles, and works perfectly under wine. Just install it, and set the Windows version to XP. I have mfc420.dll, quartz.dll & riched20.dll set to native/builtin. Yes, K9Copy in Linux does this, but I’m a fan of DVDShrink, and I know it has great quality. Your choice.

However, for more stubborn titles, DVDFAB HD Decrypter works great under wine as well, and is even ilsted as supported under Linux via wine by it’s developers. I run it under wine as Windows 2000 with mfc42.dll in the library as native.built-in

Use one of these 2 apps to rip the main movie only, including the single language track of your choice (English 5.1 personally) to your hard drive. DVDFAB does this with no compression, and you need to manually override it in Shrink, unless you’re looking to put it back on a single layer dvd. But that’s another post 🙂

2.Encoding
After you have the decrypted files on your harddrive, (they are in a VIDEO_TS directory, comprised of several .VOBs, .BUPs, and IFOs), you’ll want to re-encode them into a cohesive single high quality file for playback. My preference is XVID, because its open source, and high great quality. For encoding, enter Acidrip. It’s in the Ubuntu repositories, and is simply a sudo apt-get install acidrip away.

Launch Acidrip, go to the Video tab, and configure it as follows:
Codec: lavc
Passes: 2
Options: vcodec=mpeg4:vhq:v4mv:vqmin=2

Now, the tricky part. Well, not really. You want the bits/Px to sit at .200, which the hint on this window tells you is a great ratio and the picture will be good. Not too high (wasteful) and not too low (blocky/pixelated). So, go to the Path window and point it at your source directory (where your .vob files are) and hit Load.
Change the bitrate until the bits/px reach .200, and it should change to a grey color. You may need to enable the Lock box to change the bits. On most movies, this ends up with a bitrate of 2067, or somewhere abouts. You can now save your settings, although I prefer to save it without the final destination listed in the Load field, as it changes depending on the film title.

Oh, enable Crop, and hit Detect. This will detect th formatting and avoid processing the blank black bard on a widescreen movie. Saves on quality, and video size. Why waste time & size on blank space?

OK, with all that set, flip over to the General tab, name the movie, and input the destination in th File name field. I prefer this:
/home/username/movies/%T. This puts them in my movies folder, with a filename the same as the Track Title. Handy, huh?

In Audio, I prefer the following:
Codec: mp3lame
Options: abr:br=128
Leave Gain a 0

I don’t include extra subtitle racks, so the rest is empty.

Whern you’re ready, click Start, and away it goes. On my Athlon 3200+ 2gigs ram, the average 2 hour movie takes a couple hours. YMMV. I suggest not doing anything else remotely intensive with the CPU in the meantime.

When it completes (remember, 2 Passes. It improves the quality), be sure to delete the original DVD files to save space, unless you want them for something else, or to burn a backup. I’ve discovered that most movies processed this way have a great picture (on a 31″ standard TV, as well as a monitor) and good sound (through a 100watt receiver) with a file size between 1.2 – 2 gig each.

When I’m done, I store them on a share on my server, and stream them to my XBMC systems connected to each TV in my house (living room and bedroom) It works awesome, and I never have to see the annoying spam & adverts on a movie, or search for my discs stored away in a box or a shelf somewhere.

Enjoy 🙂

Advertisements

5 Responses to “DVD Ripping, Linux-Style”

  1. Douglas said

    Hi there

    I have just ripped a dvd that I now want to record a copy to a new disc. I used DVD:Rip for this and have ended up with a single .ifo file, a nav.log file and a logfile.txt in a directory named ifo. then another directory with 4 vob files numbered 001 through 004 and a rip file.

    Each of the vob’s will play in Totem. I have downloaded nero for linux, (recommended from another post in ubuntu forums) and tried to move the vob files into the Video_TS folder, but it will not let me. Says it will only accept Video_TS.VOB as the file name, well I can’t name them all the same name can I. So I ended up here, and found your post. I can follow all your solution but you leave the finished movie on your server, I want to burn it to play on a standard DVD Pal TV

    Can you point me to the next steps to take to get this done?

  2. anjilslaire said

    Ah, sure thing.

    After you get the files onto your hard drive, you need to need to get them small enough to fit on a single-layer dvd (in most cases).
    If you’re using DVDShrink, this is easy. Load up the files using the Open Files menu, and navigate to the directory where the files are located.

    (In a standard DVD structure, EVERYTHING is located in a VIDEO_TS folder. Don’t know why you have files in multiple folders)

    Once you have it loaded up in Shrink, you can set the compression to automatic in Reauthor Mode, and remove any unneeded extras (languages), previews, etc. When you set it to encode, select to save it as an ISO somewhere
    Let it encode the movie, and you’ll end up with an ISO about 4.3gig or less, enough to fit on a dvd.

    Fire up your preferred burner, and burn the ISO.

    Alternately, you can have Shrink encode them to files, and then just make a video DVD with the Video_TS folder as the root of the disc, with th vobs and others inside of that.

  3. Paul said

    an easier suggestion: (Command line)

    Rip dvd title to hard drive with mplayer: (Creates a single movie file)

    mplayer dvd://1 -dumpstream -dumpfile MOVIENAME.mpg

    the “1” is the title# to rip. If you have multiple titles, type:

    mplayer dvd://1 then mplayer dvd://2 … etc until you find the main movie.

    convert to xvid:

    mencoder MOVIE.mpg -o MOVIE.avi -ovc lavc -oac lavc -lavcopts acodec=libmp3lame: abitrate=128 vcodec=xvid

    smaller file size and easier… and best of all -> ALL LINUX!

  4. anjilslaire said

    Yes thats easier, but as noted there are newer titles that do not rip via standard linux tools. If its only CSS that would work fine, but that’s not always the case, hence the need for newer tools to handle the newer encryption methods.
    Smaler file size. Whats th bitrate & resolution?
    Also, I prefer to manage the bitrate & crop the title via acidrip. Yes, I like the laziness of the GUI. However, I do use the konsole only for many things, including converting video to PSP format.

    Regardless, I suspect most people who need help ripping movies are more comfy with a GUI

    Thanks for the input, though 🙂

  5. Random T. said

    I follow your blog for quite a long time and should tell you that your articles always prove to be of a high value and quality for readers.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: