Analog5:002 Article 007
From Hak5
DVD to AVI: A brief How-to for Windows
By: DigiP
Published: March 20th, 2007
################################################## #### .##########################- #### #### +### ## ### -# #- ### ### #### +#### ## ### ~######## ###- ~### #### +### ### ##P ## ### ###- ######### #### ### ##- # #- ######### ##################################################
Ok, a lot of people have asked this question, and I see that there are many ways to do this. First, I want to stress that I do not condone piracy. Copying DVD's from your own home videos is more what this is intended for and you will need an UNLOCKED dvd in order to do this. Cough...
So, you wanted to rip your home video dvds to your pc to put clips on the web, like clips on youtube, etc, but your not quite sure how to get it from your dvd to your pc in a useable format. Mainly you will want this in either an mpeg or avi format, but were talking about that AVI format just for its common use on windows and the many codecs and programs for compressing and editing them.
Get your tools ready: (See also: http://nickyguides.digital-digest.com/synth-vdub.htm) First things you will need are some Mpeg-2 filters to read a DVD. Now, people with a software dvd player will notice they can watch dvd's on their pc, but this is only because the program can decoded the mpeg-2 video stream (VOB files are actually mpegs) but copying them to the pc from the dvd itself makes them unreadable because they are encrypted. You would need a program to copy these from the dvd to an unlocked format on the pc, but that would be against the law..google...cough..Most home made dvds are already unlocked.
Second, you will need an AC3 filter (if you want to keep original AC3 multichannel sound) or decoder for AC3 to stereo output. This is because DVD's contain many different audio streams and can have multiple languages on one disc.
And thirdly, you will need a program that can tie all of these together in order to read the dvd files and output it to AVI (or mpeg depending on the software you chose).
I personally use AVISynth and VirtualDub for all my editing of DVD material, and most other formats that use DirectShow filters for importing video files, but you can use others like T-Mpeg, etc. (check google)
The first thing you will want to do is get those Mpeg filters and reg them into windows. You can use regsvr32 from the Run prompt for Multiple_MPEG2_Source.ax, Mpeg2Parser.ax and Mpeg2Decoder.ax or if your not handy with that, drag and drop them onto RegDrop: http://files.divx-digest.com/nicky/regdrop.zip
YOU DO NOT NEED THE DUMP.AX, WAVDEST.AX or IVIAUDIO.AX! Delete them!
Install AviSynth and Unzip/Compile/Install virtual Dub on your pc or get an already compiled version.
Once you have everything installed, you will want to grab your dvd. Your now going to write a simple script that will allow you to import the dvd files to VirtualDub. Open any text editor. Type the following:
DirectShowSource("drive:\somefile.vob")
where drive is the drive the files are on and somefile.vob is the first vob file you want to import. For ripped dvds on the hard drive that contian extra content, you will have to see which files are for which in your dvd once you open them in virtual dub.
Now save that file as "MyDvds.avs" and open it with Virtual Dub. For advanced editing, I "Ask for extended options" when opeing a file. This gives you some other things you can play with before opening the files, like change frame rate, split interlaced video, etc. You will have to experiment to see what works best for your needs, but you will usually want to de-interlace the video, as well as resize them to a smaller screen res for ease of use. You can also specify these commands in the avisynth script we just made, so get familiar with the commands and making small clips.
Now that you have it loaded, you will see two video windows. The one on the left is the original video, the one on the right is what your output will look like when finished. Click play button and you will see the video. Click stop, and then the second play button and you will see the original and dubbed output. This gives you an idea of the basics. Now lets add some compression. Go to the menu for VIDEO and then select COMPRESSION. Scroll down to the xvid codec and click configure. Now this will be where you set your compression levels. Each person has their own preference, but I like to set it to a target bitrate of 800 (click the Target Quantizer to toggle back and forth) This is great for smooth video and fast action as well as keeping the size down on the avi putput. Now we need to change the audio settings. Select AUDIO and then Full Processing on the menu. This enables advanced audio editing features. You can now select COMPRESSION. Check off MP3 and then on the right 48kB/24,000. This is where you will save 90% of the file size when converting the files. Otherwise the AVI file will be as large if not LARGER than the original file. You can also add a video filter to reduce the size of the output as well, but that is up to you. I personally would not suggest keeping the original size if it is going to be uploaded to the web, but for personal viewing, this may be ok on a fast pc. If reducing the size, start with the easiest setting 2:1 reduction High Quality. This will speed up the conversion as well.
Now save the file as an avi somewhere on your pc and your all done! You can use virtual dub to delete certain parts and save just small clips, like 30 seconds, or whatever, but you will have to get used to the program and its interface to do this. I am not going to go into it any further than what I just showed you, but google is your friend, so get er' done.
A 148 meg vob file can usually be reduced to about 28 megs using the methods I have shown here. You can achieve even smaller footprints by changing the codec settings for both the video and audio, but you will start to degrade the quality as you go down that road.
Any questions on any of these programs, see their respective sites for notes, or check google.
- -Digip


