Ripping DVD Movies to XviD (DivX/MPEG-4)
Published: 2010-12-28 Last Modified: 2013-12-12
Update (August 2013): this guide is probably obsolete now that most people - myself included - prefer the high definition quality of blu-ray rips encoded with the far superior H.264/AVC codecs. I'll leave this page here for reference anyway.
Disclaimer: copying movies is probably illegal where you live, however making backups of movies you own for personal use should be fine. This guide is for informational purposes only, use it at your own risk. The author claims no responsibility for how you choose to use this information.
This guide will show you how to convert a DVD movie into an AVI file, using the XviD codec. There are many other ways to do this, and I've tried most of them. This is the method that works best for me. For this guide, I'll be converting the DVD "Superman Returns" into a 700MB AVI file that will fit on a standard CD-R.
What you will need:
• a Windows PC with a DVD drive and plenty of memory
• a fast processor (the faster the better)
• at least 12GB of spare hard disk space
• various software (detailed below)
Part 1: Get the Software
All of the software mentioned in this guide has been personally tested and is used regularly by me, and is guaranteed not to mess anything up on your system if used as described herein. This may seem like a lengthy process but at least it only has to be done once! :)
Download and install the XviD codec. You can download the latest version here, or you can get version 1.2.2 locally from here. Screenshots in this guide are from version 1.2.2.
We need an MP3 codec to compress the movie's audio track. Download the Lame ACM MP3 codec from here. Unzip to a new folder, then right-click on "LameACM.inf" and from the pop-up menu select "Install". After installation the ZIP and extracted files can be safely deleted.
You will also need the AC3 ACM codec to decode DVD audio, get it here. As above, unzip and right-click on "AC3ACM.inf" then click "Install". Delete installation files when done.
VirtualDub is the main program we'll be using to do the transcoding work, along with the MPEG-2 plugin to decode DVD video. There are two options to get VirtualDub - the easiest is to download it locally here, this is version 1.9.10 with the MPEG-2 plugin already installed. Unzip to a permanent folder, I use "C:\Program Files\VirtualDub". You might also want to create a shortcut on your desktop to the "VirtualDub.exe" file.
The other option is to get it from the official site here. Unzip as above, then you'll need to get the MPEG-2 plugin separately. Get it here or locally here. Unzip and place the "MPEG2.vdplugin" into your VirtualDub\plugins folder.
Finally you'll need DVD Shrink, this program actually rips the movie from the disc to your hard drive, in the process cracking the CSS encryption of the DVD. Get it locally here or from the official page here. Unzip the "DVD Shrink.exe" file to a permanent folder of your choice, and again create a shortcut if you like.
Part 2: Rip the Movie to your Computer
Put the DVD into your drive and fire up DVD Shrink. In the program, click on the "Re-author" button. Your DVD drive should show up in the panel on the right-hand side. Double-click on it to open. Now you should see a list of titles on the DVD. Hopefully the main movie should be highlighted already. Check the length in the "Duration" column to make sure. The extras will generally be shorter.
Click and hold on the main movie file and drag it to the left-hand column of the DVD Shrink window and release. A dialog will pop up and the movie will flick through quickly as the program analyses the disc.
When the analysis is complete, at the top of the right-hand column switch to the "Compression Settings" tab. Under "Video", change the setting to "No Compression". Under audio, deselect any extra streams. Generally you'll want to keep stream 1, which is usually something like "AC3 5.1-ch English". Under "Subpicture" (subtitles), uncheck all the boxes. For this guide we will not be using any subtitles - where small parts of movies use them they are usually hard-coded into the video anyway.
Click the "Backup!" button. A notification may pop up warning you about the target size, but since we're not burning this to DVD anyway click "Yes" to continue. Under "Select backup target" choose "Hard Disk Folder". Under "Select target folder" browse to a temporary folder where you'd like to save the files from the DVD. Remember you'll need a fair bit of free disk space, 4-10GB depending on the movie. You can uncheck "Create VIDEO_TS and AUDIO_TS subfolders". Do not forget where you're saving the files!
Under the "DVD Region" tab, select "Region Free". Click "OK" and wait for the movie to copy over. This can take anywhere from 20 minutes to an hour or more, depending on the length of the movie and the speed of your computer. When it's done you can close DVD Shrink.
Part 3: Convert the Movie to XviD
Run VirtualDub. Click on the "File" menu and then click "Open video file...". Navigate to the folder where you saved the DVD files above and you will see a list of VOBs. Highlight the first VOB file, then check the box at the bottom that says "Ask for extended options after this dialog". Then click "Open".
Check "Open multiple VOB files as one virtual file" then click "OK".
A list of VOB files found in the folder will appear. Click "OK". It will take a few moments to scan the VOB files.
Now the first thing we want to do is adjust the audio compression settings. So click the "Audio" menu and select "Full processing mode". Then, again in the "Audio" menu, select "Conversion...". These settings are a matter of personal preference, but for reference I always choose a Sampling rate of "44100Hz", check "High quality", Precision as "No change", and Channels to "Stereo". Refer to the following screenshot.
Click "OK" to close. Again on the "Audio" menu, this time select "Compression...". On the left-hand side select "Lame MP3" and on the right, "44100 kHz, 128 kbps CBR, Stereo". This will give us a nice compromise between file size and audio quality. Click "OK" to exit.
Also on the "Audio" menu, you can find settings to adjust the volume... I generally bump it up 250 to 300% as the AC3 audio always seems too low. This of course is optional and a matter of personal taste, and will vary from movie to movie.
Now we move on to the video settings. Firstly we need to determine if the video is interlaced. At the bottom of the VirtualDub window you will see playback controls. Press the play button with the "I" on it, this will start playback of the input stream. Watch the movie for a while... if you notice jagged zig-zag looking edges, especially when there is side to side movement, your video is interlaced. See the following "Star Trek" screenshot for an example of what interlacing looks like.
If your video IS interlaced, click the "Video" menu, then click "Filters...". Click the "Add..." button. Locate and click on "deinterlace" then click "OK". Another dialog will pop up with deinterlacing settings. I always use the default settings, "Yadif" and "Keep top field" and these seem to work fine. Click "OK". Now you should have something like this.
Whether or not the video is interlaced, we'll need to resize and crop the video now. So, still in the "Filters" section ("Video" menu, "Filters...") click "Add..." again. Click on "resize" and then "OK". A settings dialog will appear. Select New size "Absolute (pixels)" and Aspect ratio "Disabled". Now, most movies fall into two aspect ratios - 16:9 (standard high definition) or 2.39:1 (theatrical widescreen). If your movie is 16:9 you will use 720 x 400 as your resolution, and 720 x 300 if it's 2.39:1. If there are thick black bars above and below the video in the preview window, it is most likely a 2.39:1 movie so enter 720 x 300 as your resolution.
Now your filters window should look something like this (of course, without the interlacing filter if your movie is not interlaced). Please note that if your movie IS interlaced, the deinterlace filter should always come before (above) any other filters. You can use the "Move up" and "Move down" buttons to re-order.
Now you want to click once on the "resize" filter line to highlight it, and then click on the "Cropping..." button. A preview window will come up, and you'll want to scan through the film to a frame that is light pretty much all around, so you can easily adjust the cropping tool to remove any back borders. When you're done it should look something like this.
Most 2.39:1 films will require around 70-80 pixels cropped from both the top and bottom, and 16:9 films 0-20. These figures are just a guide, your results may vary. Click "OK" to confirm the crop settings. Click "OK" again to exit the filter page. Your VirtualDub should now look something like this. Note the wide black bars on the input pane, indicating that this is a 2.39:1 aspect ratio film.
This next part is not really necessary, a matter of choice again. Removing the end credits - I always do it to slightly increase the quality of the rip as it gives you a marginally higher bitrate to work with. To do so, use the navigation slider at the bottom of the window to locate the beginning of the end credits, then click the small left-arrow button highlighted in the following screenshot. This marks the beginning of the part of the film we want to delete.
Then drag the slider all the way to the end of the film, and click the right-arrow button highlighted above. The end credits portion should now be highlighted, so you can go ahead and click the "Edit" menu and then "Delete".
With the slider all the way to the end of the movie, take note of the total length of the film as we'll need this to calculate the bitrate to use. In this example the movie is 2 hours and 20 minutes, after the credits have been cropped.
Now we have to configure the XviD compression settings. Click the "Video" menu and then click "Compression...". In the selection box, find "Xvid MPEG-4 Codec" and click to highlight. Then click the "Configure" button.
The "Profile @ Level" should be set to "Advanced Simple @ L5". For "Encoding type, select "Twopass - 1st pass". Then click "OK".
Click "OK" again to close the compression settings, and then on the "File" menu, select "Run video analysis pass". This step will take a while, depending on your processor's speed. My laptop generally takes about 20-60 minutes for the first pass. Go make a coffee and watch a Simpsons episode, or dig in the garden or something. VirtualDub will show a total estimated time for the first pass.
When it's done, click back into "Video" and "Compression...". The XviD codec should still be highlighted, so click the "Configure" button again. Now you'll want to change the "Encoding type" to "Twopass - 2nd pass". Also click the button below "Encoding type" until it says "Target bitrate (kbps)". Then click the button "calc...".
We use this next window to calculate our target bitrate, based on the expected size of the resulting AVI file. It's handy to have a 700MB file that will fit on a CD-R, so we'll use that size for this guide. Really it all depends on where you'll store the movie, if size is not an issue then I recommend not dropping below 700-800kbps bitrate if possible. Anything less than this will unfortunately give you a fairly poor quality rip, but with some longer movies you will have no choice.
Anyway the dropdown box at the top of the window has a few preset options, so choose the "716800" option which is how many bytes can supposedly be squeezed onto a standard CD-R. You'll also need to enter the hours and minutes of your movie into the fields provided. Finally, make sure that your audio settings are correct, ie MP3-CBR @ 128kbps if you've used the settings in this guide.
Click "OK" to close the bitrate calculator. Now you'll see that it has entered your recommended target bitrate automatically.
This is where you can manually adjust the bitrate. As you can see, with "Superman Returns" being quite long at 2 hours 20 minutes, the calculated bitrate is just 571kbps - very low. If I'm going to burn the movie to CD-R, I always subtract about 8 from the bitrate provided, just to be sure. Sometimes you'll encode an entire movie and then it will be something like 1MB too big to fit on a CD, and you have to start over with the 2nd pass. So for 571kbps I would adjust down to 563 or 564. Click "OK" when done.
If the size of the movie file is not an issue, simply change the bitrate here to 800 or more, depending on how much disk space you want it to consume. It's not necessary to use the bitrate calculator in this instance.
Click "OK" again to exit the compression settings. Finally, go to the "File" menu again, and this time choose "Save as AVI...". A dialog will pop up asking you where you want to save the movie, and once you enter that info the second pass will begin. This will take a bit longer than the first pass, but when it's finished you will have your finished XviD AVI file. :)
Don't forget to go back and delete the VOB files once you're finished with them, as they will quickly chew up your hard drive space if left.