Ripping and Editing DVD Footage

The other way of getting source footage is extracting it from DVDs digitally (note that the other way isn't downloading divx files - if you want to rip off footage then don't ask me to hold your hand :P). This has lots of advantages over analogue methods and you should always rip DVDs if you can.

You will notice that this guide has been rewritten since the old guide so you may want to read it all again as better methods may be open to you.

Note - If you have a DVD player and want to capture them I would advise against it as it will always be poorer quality. However, you might find this method more convenient, which is fine but you want good quality, right? OK, let's begin.

Ripping DVDs

OK, so you got those shiny new DVDs then? Right - first thing to do is to choose a program. It doesn't really matter which one you choose as they all do the same thing which is copy the DVDs to your HD whilst removing the encryption. It's a common misconception that different ripping programs give better visual quality, they don't - they just either work or they don't work.

The best programs are:

Smartripper - The one I use because I know it works for me.
DVDDecrypter - The other one, which is very good, nice and simple and very effective. It may even be better than Smartripper now too.

Now, once you have them you might actually need something else. If I were to ask you "Do you have an ASPI layer?" you'd probably give me a strange look. But don't worry, it's not too painful it's just installing something.

Well, in order to accurately extract DVDs (and audio, see the other guide) you really need a software interface called an ASPI layer. If you have Windows 98 or ME then you may already have one. If you have Windows 2000 or XP, then you may need to get one as ASPI drivers aren't included by default. The ASPI driver are usually installed as part of Adaptec's SCSI drivers.

To check and see if you have an ASPI layer, get the ASPI Checker from here.

If you don't have an ASPI layer then you can still install one using a program called ForceASPI which you can get from here and it will allow you to install the drivers without having an adaptec card. It also comes with the most stable version of the drivers and works with everything that isn't Widows 95. For more aspi related information look here. Please read the help files before using forceASPI and follow the instructions to the letter. I don't want you hosing your OS and then coming crying to me about it.

OK, so you have your ripping program and your ASPI layer... geektastic. Put in your DVD and open up your DVD ripping program. The most important thing with DVD ripping is whatever way you do it, do it the same way each time. This will make it possible to exactly reconstruct things if you need to.

Now, you many notice that a DVD might have many different "Titles" and "chapters" and things like that. If you feel confident enough to find the stuff you need then go ahead and rip - the main section of the dvd will be the longest so it will be easy to find. Alternatively, there is always an option to rip by files instead of by "Titles" - this can be much easier if you have a DVD with a very complicated structure. If in doubt, read Doom9's guide on ripping DVDs as it has lots of pretty pictures :)

When you are done you will be left with a bunch of files called things like vts_01.ifo and vts_01_1.vob. It's the .vob files we are interested in but, for your information, the .ifo file contains things like chapter info and subtitles.


Using the DVDs

Once you have your vobs, you can't just edit them like that because they aren't generally editable on their own (see 5 for the exception that proves the rule). You have to interpret the vob files using a program so video programs can read them.

There are 5main ways of accessing DVD footage, and 3 are crap and one is mostly crap ;)

1) DirectShow Filters - this is a VERY VERY BAD way of doing this. You can register filters from DVD playback software like PowerDVD and this will sometimes allow you to open up vobs in programs like Premiere. However, this method is NOT frame accurate at all and is a terrible way to edit DVDs.

2) FlashMPEG. The first thing I will say here is do not use FlaskMPEG. It's slower than method 4 (below), it has lots of bugs, lots of its extra features are ugly and don't work properly and it's just not very good. It may seem simple, but the extra speed, accuracy and flexibility of method 4. It also operates in RGB mode which means you can't compress to YUV without converting the colorspace. We want to compress to YUV because it's the same as the dvd source and it's smaller when compressed. Another method that unfortunately uses RGB is...

3) VFAPI Conversion - this is the old method of doing things. It works but has 3 very big disadvantages. 1) It converts your footage to RGB which isn't good as DVD footage is YUV and you will have to convert (see here for why). 2) It is slow 3) You can only have 1 VFAPI file open at once otherwise they start reading from each other and crashing. This is bad. Don't use it, use this method:

4) Avisynth plugin MPEG2DEC - This is the daddy. It is frame accurate, quicker than anything else, works well, allows access to numerous other excellent features in AVIsynth and is what we will use in this guide. No other method is currently better.

5) Native DVD editing - I don't know much about this but if you have hardware that can do it you probably already know more about it than me. Premiere 6.5 also has native mpeg2 support but it isn't as quick as the avisynth method. Also, you have to demux the vob files so it's just as complicated really. You might as well use MPEG2DEC and avisynth. It's better :) It is also possible to edit with mpeg2 using new drivers and the DV500 but I've no full reports yet on how good it is at doing this.

So, as you've guessed we'll be doing method 4. The easiest thing to do at this point would be to download and install my AMVapp as it contains all the necessary programs and copies them to all the right places. If you want to do it all yourself then the software you need is:

DVD2AVI version 1.76 - do not get a newer version, it wont work for what we are doing)
AVISynth - at time of writing the guide, the latest version is 2.06. Go here for the latest.
MPEG2DEC.dll - an avisynth plugin that interprets dvd2avi project files.


DVD2AVI Project Making:

Now that you've ripped the VOB files, open up DVD2AVI version 1.76 and select Open from the File menu. Select the first VOB file in whatever series you'll be converting/editing with (i.e. the VOB that ends with 1). It should the automatically add all the rest of the VOBs in the series. If you happen to have files with numbers more than 10 then you have to add vob numbers 10, 20, 30 etc to complete the list.

After you select all the video files, click OK. Then open the Audio menu and under the Track submenu, select "None". Note - skipping the audio also makes project making much faster so it is advisable.

Colour Space - YUV

YUV -> RGB - PC Scale

[the wise amongst you will realise that those last 2 options don't actually matter, they are just placebo]

Set the Field Options in the Video menu to "Swap Fields" - it's not necessary for plain old software editors but this fixes problems with some capture cards (namely the DV500) outputting swapped fields later. the reason for this is that DV has the opposite field dominance than most DVDs. Fun.

DO NOT SET FORCE FILM as it is very very unlikely that the source you are working on will have enough FILM footage to easily remove interlacing. If you want to check, use the preview [F5] button. Under Video Type it will say either:

FILM n%
NTSC n%
Progressive
Interlaced

You can only use Force Film if it says FILM 97% or higher or if it says Progressive, otherwise it will look really bad. Even if it does say FILM 97% you may still get many interlaced frames appearing. Don't worry though, we can get rid of the interlacing with another method later, so it will all turn out good.

Once you've got all these settings right, select "Save Project" from the File Menu, or just hit F4. Save your project somewhere and then let it go for a while. Note well that although it is possible to select an area of the vob to create as a project, this is VERY VERY difficult to recreate perfectly so I recommend only doing a full dvd or one vob at a time so you can remake the project if you need to.

OK, make the project - if it takes much more than about 20 minutes with these settings then you need a serious defrag or you need to stop using your USB Hard Drive :)


Using the DVD2AVI Project:

At this point you need to use the wonderfully flexible application AVISynth. You should read the section on the basics of AVISynth if you aren't familiar with the software already. Once you've done that, you need to make an AVISynth file that will import a dvd2avi project.

Using the MPEG2DEC plugin provided in the AMVapp installer, it's very simple to open D2V files within an AVISynth script. There is an example script called "Basic Vob Import.avs" which you can access from the AMVapp folder in your Start Menu.

If you are not using the AMVapp or Avisynth 2.06+ then you may have to load the mpeg2dec plugin manually. If you have AMVapp, skip this:

Edit your AVS file in Notepad, type in the command to load the plugin:

LoadPlugin("C:\AVSFilters\MPEG2DEC.DLL")

Note that MPEG2Source doesn't open MPEG2 files themselves, only the D2V project files created in DVD2AVI - this is because getting frame-accurate random seeking within an MPEG2 stream is almost impossible without scanning it first. When you make the D2V file you are essentially building a GOP index that allows for seeking.

OK, add this line which is the command to load your D2V file:

MPEG2Source("D:\myproject.d2v")

Do this for each DVD2AVI project file you have. Now you have your avisynth file or files. You can load them into lots of video programs, like Premiere, Virtualdub and TMPGenc.

At this point there are several options open to you:

1) Create clips for source footage. This can be useful for those who find it unwieldy to edit with full episodes and full dvds. It can also give you a good pool of footage to work from and saves searching around for footage. However, if you want to keep the best quality then the files you make are going to be very big so you better have a big HD. Backing up these big files is also difficult. I do not recommend this method if you want to re-create the project later but don't want to spend days burning CDs with your clips on. If you make clips and lose your footage you are up the proverbial creek without the proverbial paddle. (You could make a note of the frame numbers of the clips you are making... but that would be insanely long-winded)

2) Edit directly with the avisynth files in Premiere - The best quality but can be slow.

3) Getting DVD quality but being able to edit quickly - This is my favourite method but it does take longer to set up. It is very good for editing though and you won't lose any quality at all in the long run.

 

Method 1: Creating Clips for Source Footage:

I'm sure you've already read the codec guide, if not do so now. The only codec I recommend is HuffYUV as you will not be losing any quality. [except marginally if your editing program, such as Premiere, converts to RGB for effects]

DO NOT USE DIVX or any divx variant. They are terrible, nigh impossible to edit with and the quality, no matter how good it looks to you when you are editing, will just make everything look much worse than it should when you finish.

DO NOT USE MPEG1 - lots of people like using mpeg1 for editing. However, even in Premiere and other programs that have mpeg1 support, the editing will not be frame accurate and you may find that the cut you thought was spot-on actually pops into the next scene when editing. This is very bad, not to mention that the quality will be pretty poo when it's all done too.

Also, do not use mjpeg unless you really have to - if you have the space for HuffYUV then please use HuffYUV. If you MUST use MJPEG choose a very high quality. If you want to make DV files, use your native software.

The Interlacing Question

Now, at this point, as we are just making clips, we can decide now whether or not to remove any interlacing. Now, many many people who are new to video editing seem to presume that interlacing is this really evil thing and that they don't understand why it's on the DVD they've just ripped.

Your DVD is supposed to be interlaced unless it is a lovely progressive film movie :)

All video editing programs are designed to edit with interlaced footage as that's what most footage is. So, it's not at all problematic to edit with interlaced footage. However, you do have a choice of whether to or not. Either way is fine but progressive (non-interlaced) frames have the following advantages:

1) You don't have to worry about fields and field order.
2) You can slow down and move around footage without having to use an ugly deinterlacer in your video editing package (Premiere's deinterlacer sucks, etc)
3) You can easily capture still frames for editing in photo editing programs.
4) It is easier to get rid of interlacing before editing rather than after and if you are doing online distribution then you need to remove interlacing at some point and this is the best way.

So, what I will say to you is this - if you think the advantages listed above are good for you then remove interlacing before you edit....

If you do decide that you want to remove interlacing then you have to read the IVTC section of the avisynth guide.

IVTC (Inverse Telecine) is a method of restoring the original frames of any animation that was originally 24fps (FILM) - see here for a more technical explanation.

 

At this point, you should have an AVIsynth file (that is either progressive or not). Load up virtualdub and open it. The codec we are going to use in this guide is HuffYUV. It comes as standard with the AMVapp.

Now, go to Video -> Compressor and choose HuffYUV. If you have 4 versions of HuffYUV displayed, the you have a DirectX 8.1 huffyuv fix. Don't worry, they are all the same when you encode things.

Now, THIS IS IMPORTANT - choose Fast Recompress in the Video menu as well. This will mean that the file will not be converted to RGB between Avisynth and HuffYUV - we want to avoid all colourspace conversions. HuffYUV will, by default , convert everything to YUV colourspace when storing data - Fast Recompress makes sure that the DVD info stays as YUV during the compression process. If you use any other recompression option, then Virtualdub will convert it to RGB. You will only have to do this if you need to use a virtualdub filter - which you don't.

If you really really have to use a virtualdub filter for some (odd) reason then make sure you set up the HuffYUV configuration (when you choose the codec) so that under RGB it doesn't have the 'convert to YUV' option but instead says "Predict Gradient (best)". However, if you can use avisynth filters instead then please do, see the avisynth guide for more info.

Also note, only resize your source footage if you really really have to - but in all honesty you shouldn't really have to. Any resizing can be done later when you've finished and it will be much better quality if you resize at the end. The only resizing I can justify is correcting aspect ratio with anamorphic sources - especially if you are using a mixture of anamorphic and non-anamorphic footage. To do that in avisynth, read this.

Once you've got the codec and the compression method set up, you can search through your source using the bar at the bottom and then use the two rightmost buttons (Mark In and Mark Out) to select the area you want to br converted into a clip. After you have chosen the range, simply go into the File menu and choose "Save as avi..."

Repeat as necessary.

Now that you're done, you should go to the section on setting up your Premiere project.


Method 2 Editing DVD footage in Premiere

To edit with your avisynth files in Premiere, you will need to download the latest Premiere Import Plugin. If you have downloaded and installed the AMVapp then you already have it installed. If you have to install it manually then copy it to your Premiere 'Plug-Ins' folder.

One you have this installed, it will allow you to open AVISynth (.avs) files in Premiere.

Note: this method isn't particularly quick at the moment. Seeking and rendering will be slower than you are probably used to. There are things that can help, but only a little. What I recommend is that you get yourself a fast codec (like the PICVideo MJPEG Codec) and select this as the codec in your "Project Settings". This will be the codec used for previews. You can always use a different codec later for exporting but this one is great for fast renders - especially when set to a low quality level. So, if you need to see if something has timed correctly, mjpeg codecs are great for that as they are very quick to decompress when set at low quality.

However, if you find that it's too difficult editing with footage this slowly, then please use method 3.

The Interlacing Question

Now, if you still want to use this method, you can decide now whether or not to remove any interlacing in your script. Now, many many people who are new to video editing seem to presume that interlacing is this really evil thing and that they don't understand why it's on the DVD they've just ripped.

Your DVD is supposed to be interlaced unless it is a lovely progressive film movie :)

All video editing programs are designed to edit with interlaced footage as that's what most footage is. So, it's not at all problematic to edit with interlaced footage. However, you do have a choice of whether to or not. Either way is fine but progressive (non-interlaced) frames have the following advantages:

1) You don't have to worry about fields and field order.
2) You can slow down and move around footage without having to use an ugly deinterlacer in your video editing package (Premiere's deinterlacer sucks, etc)
3) You can easily capture still frames for editing in photo editing programs.
4) It is easier to get rid of interlacing before editing rather than after and if you are doing online distribution then you need to remove interlacing at some point and this is the best way.

Unfortunately there is a big practical concern with using avisynth scripts that remove interlacing in Premiere:

This method of using footage is even slower if you use IVTC in your avisynth script to remove interlacing - by this I mean, MUCH slower. However, you can save yourself a little processing time by using Telecide(post=false) instead of just Telecide() It wont give you that much of an increase in speed, but it's better than nothing. If, on the other hand, your footage is natively non-interlaced (such as a progressive dvd) then you won't need this step and won't have the slowdown.

If you do want to learn how to use IVTC in Avisynth to remove interlacing, read this.

Again, if you find that it's too difficult editing with footage this slowly, then please use method 3.

P.S. If you slow down clips in Premiere to very very slow speeds then it will crash avisynth when you try to export or reload your project. Do not do this. Either make a still and use that or if it crashes when applying lots of filters, try and pre-render the section with a lossless codec.

Now that you're done, you should go to the section on setting up your Premiere project.


Method 3: Faster Editing with DVD footage.

I personally find method 2 too slow on my machine, which is why I use a different approach that in the end gives me the same final quality but a much more pleasant editing experience :)

Basically, I take every AVS file I want to use and make an ugly but quick AVI version of each one. It is identical in every frame except in quality. I then edit in Premiere with these low quality versions and when I'm done I get Premiere to switch back to the avs files which means in the end I have DVD quality footage. Yey!

Let me explain in more detail:

First, make avisynth files for all the footage you will want to edit with (usually each dvd2avi project file). Note: As you are now editing with quick files, you might want to use the Avisynth IVTC to make it all progressive, if you can. Interlaced editing is fine, and all video editing programs are designed to be able to edit interlaced footage. However, non-interlaced footage has the following advantages:

1) You don't have to worry about fields and field order.
2) You can slow down and move around footage without having to use an ugly deinterlacer in your video editing package (Premiere's deinterlacer sucks, etc)
3) You can easily capture still frames for editing in photo editing programs.
4) It is easier to get rid of interlacing before editing rather than after and if you are doing online distribution then you need to remove interlacing at some point and this is the best way.

So, if you think these are good things then read this guide on how to make your footage progressive (non-interlaced) in your avisynth script. It will be slow to export but it wont effect the speed of your editing, so I recommend it highly as it will give you great quality.

Now you need to get a codec that is good for editing. This means NO divx, NO mpeg-1, NO cinepak etc. The codec I recommend is the PICVideo MJPEG codec as all the frames are keyframes, the compression is ok and it's VERY FAST. Now, this codec is shareware which means you can use it but it will put a logo on all of your files - but this is ok as we aren't going to use these files for our export. However, I do recommend purchasing a registry key for this codec to remove the logo as it is a great fast codec.

Anyway, in the Virtualdub "Video > Compression..." menu choose PICVideo MJPEG (there might be some other PICvideo codecs, but you don't need those). Now click "Configuration".

Here you can set a quality for your file - the lower the number the worse the quality but the faster the editing - and it is speed we want. Make a couple of little clips and see how low a number you'd want to go - 5 to 10 are ok and will be really quick. Less than 5 and it starts getting too ugly to use, really.

Now choose Fast Recompress from the Video menu and save to an AVI that is named similar to your avs file (so you know which AVI goes with which AVS). Do not change the frame rate - it has to be the same as your avs file. I wouldn't change the resolution either as this will effect how things like motion settings will work when you edit.

Save your avi versions. If you need to make some space, then you can delete your vob files after you have made the avi files but only do this if you can make them again exactly the way you did before as we need them for our export. I personally like to keep the vob files around as you can then access your AVS files to get high quality stills, previews and things like that.

Note: Your low quality files will have slightly different colour shades in comparison to the original so if you are doing any colour keying effects and so on then you will have to switch to the avs version until you have them set up.

Switching Back to the DVD quality AVS Files in Premiere

You should test this out at the very start to make sure this method works for you. Premiere has a facility called Replace Clips, but I find that it sometimes crashes annoyingly. It might work for you, but it is buggy for me. However, the method that works best for me is as follows, to test get an avi clip and put a small section on the timeline.

1) Save your project

2) Save another copy using "Save As..." - you wont need the preview files.

3) Close Premiere

4) Go to the folder where you have all your avi clips and make a new subfolder called 'hidden'. Move all your avi clips into there.

5) Open up the duplicate copy of your project. It will then stop when it can't find an avi file. When it asks you to locate the avi file, instead point to the original avs version. This should load up your project with nice high quality DVD footage. If AVIsynth crashes at any point on the timeline, then make sure you haven't slowed down any of the footage too much or used too many effects on a clip.

Make sure you test this method with a sample clip and a sample export before starting your project to see if you are comfortable with it. It should work fine though - it's what I use for all my AMVs.

Now that you're done, you should go to the section on setting up your Premiere project.