VicBond007's Guide to Working with DVD Footage [Written in 2004]

Moderator: Niotex

User avatar
Guides
Joined: Fri Oct 13, 2023 7:03 pm
Org Profile

VicBond007's Guide to Working with DVD Footage [Written in 2004]

Post by Guides » Thu Mar 21, 2024 1:01 pm


This guide was originally written by Vicbond007 in July 2004.
It is presented as close to its original format as possible, with only obvious typos corrected.
However, it was originally in PDF form, which may be downloaded here.
This is a PDF document (10.1MB) that VicBond007 created for his AMV panel and is now available for download. It is an excellent step-by-step guide that can easily be printed for reading on the go.
The guide on archive.org


User avatar
Guides
Joined: Fri Oct 13, 2023 7:03 pm
Org Profile

Copying a DVD

Post by Guides » Thu Mar 21, 2024 1:08 pm

Copying a DVD
The first step to allow you to use DVD footage as your source, is to copy the DVD to your hard drive. Commercial DVDs are protected by a
Content Scrambling System, abbreviated as CSS.

CSS is a set of 5, 2-digit hexadecimal keys that are only supposedly readable by set-top DVD players, and DVD player software. The purpose of this scrambling code is to prevent you from directly accessing the contents of the disc on your pc, otherwise you could easily make a perfect digital copy by just dragging and dropping the contents of the disk to your computer, or decoding the video stream directly off the disc to an AVI or some other file format.

If you tried to decode the contents of a DVD directly off the disc, the picture would be unrecognizable and scattered with various pink and green boxes. If you try to drag the .vob files off the disc, in most situations, it will transfer, however the data will just be unreadable and appear corrupt. If you want to know all the geeky information about CSS, then you can find out all about it at the following address:
http://www.alleged.com/mirrors/DVD-CSS/

The solution is to copy the DVD to our drive, and remove the encryption in the process. There are several freeware programs out there to let us
do this. We’ll be using DVD Decrypter by Lightning UK. This will let us copy our DVD, as well as remove CSS and Macrovision, a visual anomaly deliberately put into the disc to screw up VCRs, making it almost impossible to record a DVD to a tape (it will also cause problems with many capturing cards, as well as cause difficulty if you try to output your video back to tape.)

Image

User avatar
Guides
Joined: Fri Oct 13, 2023 7:03 pm
Org Profile

Copying a DVD

Post by Guides » Thu Mar 21, 2024 1:16 pm

Choosing Your Region
Depending on where your DVD is from, you may need to modify the firmware on your DVD-ROM before you can read the disc. Even though we are not playing the DVD, a PC DVD-ROM drive is required. A DVD can not be ripped with a basic CD reader/writer drive.

When you buy a DVD that’s content could potentially be distributed in other countries, the DVD is flagged with a region number. If your drive does not match the number, it will not play. If you live in North America and have purchased a legitimate region 1 (North America and Canada) release, then this step is not needed. If you’ve imported your DVD from Japan, the disc is most likely coded region 2, and will require modification to your drive.

Flashing procedures are different for each drive, so be sure to visit
http://forum.rpc1.org/portal.php
where you can download “modified” firmware for your drive (assuming that it’s available) as well as get instructions as to how to flash your drive. Follow them closely. A bad flash can destroy your drive.

Setting Up DVD Decrypter
Download and install DVD Decrypter from its website at www.dvddecrypter.com Put your DVD in your drive and fire up DVD decrypter.
You should get a screen similar to Figure 2.
Don’t worry if the contents to the right look very different, it will vary per disc. For now, click on the yellow folder icon in the destination box and
specify where you want your rip to go. DVD Decrypter assigns a new folder for each disc, but you may want to change that directory and/or drive to something else.

Image Image

User avatar
Guides
Joined: Fri Oct 13, 2023 7:03 pm
Org Profile

Copying a DVD

Post by Guides » Thu Mar 21, 2024 1:20 pm

Recommended Ripping Settings for DVD Decrypter
In almost every case, the main program on the DVD (the episodes themselves) will be lumped into the same PGC.
  • Content on DVD is generally arranged as cells (video/audio objects) inside of a Program Chain (PGC: group of cells that play in a certain order) inside of a Video Title Set (VTS: sets of unassociated PGCs). This means every thing to the dvd author, and nothing to us, just understand that what we want is usually in one PGC.
To minimize the number of extras we’re copying over, we only want to select our main PGC. DVD Decrypter usually does a good job of automatically selecting this for us, as it’s usually the biggest PGC on the disc.

Usually the default settings on programs are pretty bad, but fortunately DVD Decrypter has made some good choices for us. There’s only one setting we want to change, so do so by going to the tools menu at the top, click on settings, and click on the “IFO Mode” tab. Near the middle, there is an option for file splitting with a drop down menu to the right of it. It should read “1 GB”. Change this to “AUTO”.
DVD2AVI can get confused when it’s fed info for .vob files that are chopped up more than they should be. This setting MAY produce a file
larger than 4GB, so be sure that your destination drive is NTFS and not FAT32.

Click OK, go back to the main window, and click the icon near the middle on the left depicting a DVD, a green arrow, and your hard drive.
This will open a new window and begin the decryption/copying process. You will be prompted when the process is done. Close DVD Decrypter. We’re done ripping.

Image Image Image

User avatar
Guides
Joined: Fri Oct 13, 2023 7:03 pm
Org Profile

Copying a DVD

Post by Guides » Thu Mar 21, 2024 1:24 pm

Prepping the .D2V File
The next step is to use DVD2AVI to generate a .d2v file. This file is only a few kilobytes in size and tells avisynth (we’ll get to it, don’t worry) what stream to be looking at inside each .vob.
  • Data on a DVD is stored in video object files called .vobs. DVDs can have multiple angles, subtitle tracks, and audio tracks, so we need DVD2AVI to
    tell us what’s important in the .vob files we ripped.
Download DVD2AVI from:
http://arbor.ee.ntu.edu.tw/~jackei/dvd2avi/
unzip it to a directory (Mine’s in C:/DVD2AVI), and make a shortcut if you want (DVD2AVI does not use an installer). Run the program, and then go to the file menu and select “open”.
Browse to the folder you ripped to, and inside it is a VIDEO_TS folder. Go in that, and if you split your files using the “auto” setting, there should only be one big VOB file in there. Open that, and hit OK on the dialogue that pops up afterwards. Now you can seek through your ripped footage, and if you wanted to, mark off areas and pull your clips right from here. The problem with doing this is that you can only seek by I-frames (frames that are re-drawn entirely that usually occur only once or twice a second) and your footage will most likely be interlaced. Unless you REALLY know what you’re doing, and want to put up with the headache, I suggest taking a few more steps to postprocess your footage, deinterlace your clips, and make them easier to work with.
If your .vob has ads at the end or other extras, you can crop that area out by dragging the playback head to the point where the undesireable content starts, and hitting the button to the far right shaped like a bracket.
The area before the playback head should be blue on the timeline, and white in the area after the playback head.

Image Image Image

User avatar
Guides
Joined: Fri Oct 13, 2023 7:03 pm
Org Profile

Copying a DVD

Post by Guides » Thu Mar 21, 2024 1:28 pm

Saving the .d2v
Now that you’ve marked off the area we’ll be reading from, go to the file menu and select “save project” (not “save .avi”). Specify a location and save the file as something.d2v. It’s very important that you remember what you named the file, so keep it simple.

A new window will show up to the right of the main DVD2AVI window with various stats, none of which we care about except for the time remaining which is shown at the bottom. When it says “FINISH” then the process is done, and you can close out of DVD2AVI. You will not be able to see the process in action so this is how you will be notified when it is done. It will take about 5 minutes to build a project file for your average 85 minute DVD.

Preparing Your Computer for AVISynth

We’re going to need to install a few more things before we can go any further. The first is Virtualdub by Avery Lee, and is available here:
http://www.virtualdub.org/ [Archivist note: try VirtualDub2 instead.]
Virtualdub is a totally free utility for quickly recompressing video clips, applying filters, and performing remedial cut and merge operations.
Download the latest version, unzip it, and make a shortcut in your start menu if you so desire.
You’re going to be using this program a lot.

Now we are going to download AVISynth from
http://www.avisynth.org/
AVISynth is a script-based program that uses 3rd party filters to pass video data off to applications that normally would not be able to read the
video. You can also apply various effects and filtering techniques to clean up your footage and make it more usable. Install AVISynth and be
sure to associate .avs files with notepad when prompted by the installation.

Image Image Image

User avatar
Guides
Joined: Fri Oct 13, 2023 7:03 pm
Org Profile

Copying a DVD

Post by Guides » Thu Mar 21, 2024 1:33 pm

Installing Plugins for AVISynth

There are hundreds of plugins for AVIsynth to use, and good thing, because the basic features of AVISynth are very limited. For our purposes,
we will use only two plugins, Mpeg2Dec3, and Decomb521.
Download Mpeg2Dec3 by Nic from:
http://nic.dnsalias.com/
and unzip it into the plugins directory created during your installation of avisynth (C:\Program Files\AviSynth 2.5\Plugins). Take note that the
parameters list for the plugin will also be installed to that directory, so if you would like to make any changes to the script we are about to write, you will need to refer to the documentation here.

Next, you’re going to download Decomb5.2.1 by Donald Graft from http://neuron2.net/ and unzip it to the same directory as you did for mpeg2dec3. Before we get scripting, there’s one more thing we have to take care of. Mpeg2dec3 processes the .d2v we’re going to send it, in YV12 colorspace. What that means isn’t important to us, just know that we need to install some codec that will provide us with a YV12 Video for Windows (VFW) filter.
  • A codec determines how a piece of media is compressed and decompressed.
    An .avi file is not a format, as much as it is a container for different types of valid media. Video can be compressed with all sorts of codecs like huffyuv, divx, xvid, mpeg4, or indeo. Likewise, audio can be compressed to formats such as mp3 or ulaw. These formats may even have different methods of encoding and decoding, but they all end up inside the .avi package. Keep your installed codecs to a minimum to keep your system running well.
Image Image

User avatar
Guides
Joined: Fri Oct 13, 2023 7:03 pm
Org Profile

Copying a DVD

Post by Guides » Thu Mar 21, 2024 1:40 pm

Installing Video Codecs
[Archivist note: You do not need DivX.
If you use Virtualdub2, you will not need Xvid.
Instead of huffyuv, lagarith or Ut Video is recommended, and you can get them from here.]



For right now, there are going to be three video codecs that we have to install to be able to prepare our footage. As mentioned before, the
Mpeg2dec3 plugin uses YV12 colorspace, so we’re going to need to install Nic’s build of Xvid from here:
http://nic.dnsalias.com/xvid.html
We will not actually use this in the process of acquiring footage, but it needs to be installed in order for Virtualdub to read the .vob file through the script we will soon write.

The next codec we’ll need is DivX 4.12. This is an older version of DivX, and in my opinion, vastly superior to the bloated, incompatible mess
than DivX 5.xx has become. Finding it can be tricky, but for now you can get a copy from:
http://www.schattendal.com/help/divx4.html
DivX4 is at the bottom.
Download and install this codec, answering “yes” when it asks if you want to use DivX4.12 to play back DivX 3 files. This process will remove DivX5 from your system. If you need it to view a DivX 5 file, reinstall DivX5. DivX 4 and 5 can not co-exist without some fancy tricks that aren’t worth going into.

The last codec we’ll need is huffyuv, a lossless codec that can be recompressed infinitely without any perceptible loss in quality. It works as well as uncompressed video, while taking up less space, and thus makes playback easier as well.
Download it from:
http://neuron2.net/www.math.berkeley.ed ... ffyuv.html
Unzip it to a folder, then navigate to that folder, right click on huffyuv.inf, and select install. A “Copying files” dialogue box should pop up, though the process only takes a second and is completely automated. The codecs we need are now installed.

Image Image Image

User avatar
Guides
Joined: Fri Oct 13, 2023 7:03 pm
Org Profile

Scripting with AviSynth

Post by Guides » Thu Mar 21, 2024 1:41 pm

Scripting with AviSynth

Loading Plugins

AviSynth is script-based. It does not have a graphical user’s interface, so all of our work will be done in notepad. We only need to go over a few commands for our purposes, however, every plugin has a multitude of possible settings and configurations. If you plan on deviating from this guide at all, reading the help documents that came with the plugins is a definite must.

Open up notepad. The first thing we have to do is load the plugins we want AviSynth to use.
The syntax for this is:
LoadPlugin(“absolute location”).
For our case, we would enter the following code:
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\MPEG2Dec3.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\Decomb521.dll")
See figure 18 to see how this should exactly appear in your script. This tells AviSynth to load both plugins that we downloaded. Obviously, if you’ve installed to another location, you would enter that location instead. As you download updated versions of the plugins, the names of the .dll files may change, so pay attention when writing your scripts. Also, pay attention to any stray spaces, unintentional carriage returns, or missing symbols such as
quotation marks and parentheses. You are programming on a very basic level, and there is no room for mistakes.

Go ahead and save your work by choosing “save as” from the file menu, and selecting the “save as type” of “all files”. Name your file whateveryouwant.avs.

Image Image

Locked

Return to “Guides & Tutorials”