View Full Version : Guys -check My Process
mverta
21st October 2004, 07:42
I need to convert a DVD to AVI with the highest possible quality. Yes, it has to be .avi. I don't need audio.
1) DVD Decrypter, set to "IFO I" mode - I decrypt a series of vob files
2) Open vob's in DGIndex: iDCT algorithm - 32bit SSE2 MMX Field Operation - Raw Encoded Frames YUV to RGB - PC Scale
3) Open .d2v file in VirtualDub, and set Direct Stream Copy in the Video menu.
4) Save as uncompressed .avi
Now, when I bring these images in to another program, it believes the .avi is non-square pixels, at 29.97 fps with lower field dominant.
This doesn't appear true, though... since it's a 16:9 image, it's actually square pixels, and it appears to be progressive, not interlaced, though the frame rate is still 29.97 (?)
The thing that's confusing me, is that back at the DGIndex stage, if I set the Field Operation to NONE instead of Raw Encoded Frames, then it ends up being a 23.976 fps .avi.
Am I doing anything wrong? Are there other settings to use for a better image quality? Which frame rate should I be getting, and which should I use?
_Mike
manono
21st October 2004, 16:46
Hi-
2) Your Field Operation should be either None or Force film, depending on the source. I've never used Raw Frames, and don't know what it's good for. Must be something, though.
3) You can't open a .d2v in VDub(Mod). You'll have to use it to create an .avs (or VFAPI) using the DGDecode.dll to feed frames into VDub(Mod). Direct Stream Copy gives you back exactly what you put in. You must be leaving out a step or two, if you actually got something.
...it believes the .avi is non-square pixels
It is non-square, as it hasn't been resized yet. That doesn't mean it's not useable though.
it appears to be progressive, not interlaced,
Unless your source is 29.97fps progressive, if the .d2v is 29.97fps, it has interlacing.
if I set the Field Operation to NONE instead of Raw Encoded Frames, then it ends up being a 23.976 fps .avi.
If you set it to Force Film, you'll get 23.976fps. None gives you 29.97fps, if the source is an NTSC DVD.
Am I doing anything wrong?
Although your method is creative, it's all wrong. Read a guide.
mverta
21st October 2004, 20:18
Originally posted by manono
Hi-
Although your method is creative, it's all wrong. Read a guide.
I got this method from the guide in DVD2AVI, on how to use DGIndex...
And it works. Turns out that setting Raw Encoded Frames leads to a 23.976fps progressive sequence, square pixels.
The .avi's I've generated so far look great, I was just curious if there was a better way.
And you say it's all wrong. So I'm not sure where that leaves me. I appreciate your RTFM quip, but I WAS following a guide...
_Mike
manono
22nd October 2004, 02:32
Hi-
Link me to the DVD2AVI Guide, then. I'm always willing to learn. But I can't find it in the DVD2AVI Forum/FAQ (is that what you meant?), or anything about encoding through DVD2AVI in Doom9's DVD2AVI Guide.
Turns out that setting Raw Encoded Frames leads to a 23.976fps progressive sequence, square pixels.
If Raw Encoded Frames does what I think it does, then that will work only with movies encoded as Progressive (stored on the DVD at 23.976fps). Although more and more DVDs, particularly of Hollywood's latest and greatest, are encoded like that, for many DVDs, that's not yet true. If you have a hybrid, or a movie telecined before encoding and stored at 29.97fps, you'll quickly run into trouble. Even otherwise well encoded movies will frequently slip into video at chapter breaks. This will leave you with some interlacing during those parts.
And if it's still 720x480, it's not square pixels. Don't you notice that people are tall and skinny? Or are you cropping and resizing somewhere along the line? Like to 640x272 for a widescreen 2.35:1 movie?
By the way, if you want to convert a DVD to AVI with the highest possible quality, then I might suggest using Auto Gordian Knot (http://www.doom9.org/autogk.htm) at the Maximum Quality setting. Then study the methods it uses for the future.
mverta
22nd October 2004, 02:42
Here's the text from the dgmpegdec1012a QuickStart manual:
We'll assume you have a VOB that you have obtained from a DVD (possibly using Smart Ripper, or other such tool).
OK. Now What?
Fire up DGIndex. Using File/Open, open your VOB. You should see the video.
Now select File/Save Project and enter a name for the index file (D2V file) that is going to be generated. Suppose your VOB is called 'myvob.vob'; you might choose the name 'myvob' to enter here, because DGIndex will automatically append '.d2v'. Good. Hit Save. The indexing process will start and you'll see the indicator moving along the time line to indicate the progress. Be patient if your video is large. When the process finishes, you'll get a popup. Dismiss the popup and exit DGIndex.
What is This Index File and What Do I Do with It?
DGIndex created an index file called *.d2v. It is read by DGDecode, which actually decodes the MPEG and delivers the video. The index file just contains information that tells DGDecode where each frame is located and some information about each frame.
But you can't just execute DGDecode directly! It has to be done through Avisynth. We'll make a script file called myvob.avs using a text editor. Later in this document I'll show you how to configure DGIndex to make the script automatically, but for now, you need to know the old-fashioned way. So put this text into a new text file you make called 'myvob.avs':
 loadplugin("...\DGDecode.dll")
 mpeg2source("myvob.d2v")
Replace the path '...' in the first line with the path to the location where you placed DGDecode.dll.
Finally, use VirtualDub to open the 'myvob.avs' script file. That's it! You have your video and can navigate randomly on the VirtualDub timeline. Does life get much sweeter than this?
The DVD is Star Wars, so it's probably encoded Progressively, which is why Raw Encoded Frames is working.. and even though it's 720x480, it's obviously an 854x480 widescreen image compressed horizontally. Like I said, everything's working, I just wanted to make sure I was preserving the quality as best I could. I'm going to check out GKnot now...
_Mike
manono
22nd October 2004, 06:27
OK, now I got it. You are using the standard methods. But that's not how you presented it originally. At least it's not how I read this, "Open .d2v file in VirtualDub, and set Direct Stream Copy in the Video menu."
You're opening the .avs. And the filesizes you get must be huge. There are some lossless codecs you can use to cut down on the filesizes such as HuffYUV or VBLE, but maybe you already know that. And somewhere along the line you're resizing to 854x480. By the way, 854 is not a good horizontal resolution to use, as it's only Mod 2 (only divisible by 2), and you should be using at least Mod 16. But maybe you're resizing in the player afterwards. Nothing wrong with encoding anamorphically. Maybe I just didn't give you enough credit. You seem to know more than you're letting on. :) And if it's working for you, then that's what counts, isn't it?
I never did try out neuron2's (Don Graft's) .avs template. Maybe I should sometime.
mverta
22nd October 2004, 06:33
Actually you're right, I shouldn't be resizing, and in fact I'm not... I just temporarily stretched it to check that it was indeed an anamorphic image, and it was.
By the way - this is what all the fuss is about:
starwarslegacy.com (http://www.starwarslegacy.com)
Thanks!
_Mike
jggimi
22nd October 2004, 15:45
I'll reiterate what Manono suggested -- the more you enlighted us as to the details of the process and the end objective, the more assistance we can provide to meet your needs.
AutoGK will produce an MPEG-4 (DivX or XviD) in maximum quality. But for your purposes -- having looked through your website -- I believe you will want to do both non linear editing and individual frame modifications. Therefore, I wouldn't use MPEG-4 for those purposes. Instead, I would use HuffYUV, a lossless codec that will make the size of the interim .avi files much more manageable than uncompressed AVI. In addition, uncompressed AVI is always RGB, HuffYUV can be used in YUY2, a more compressed colorspace.
My .avs script would have the plugin and the mpeg2source filters, and I would use VdubMod to create the HuffYUV .avi in YUY2 format. I might also have crop and resizing filters there to match resolutions with non-DVD sources. For resizing, I personally prefer the Lanczos method: LanczosResize(xxx,yyy).
And Mike, that's a terrific website; I especially enjoyed your Editorial page.
(Personally, I was most disgusted by the change of actors made at the very end of the DVD version of ROTJ. That's not "artistic license" under anyone's definition. That's merely future product tie-in.)
mverta
22nd October 2004, 16:09
We've actually got several terrabytes online, and the whole movie is sitting there in uncompressed .avi via the aforementioned process.
At this point, are you suggesting that I re-extract the images using your suggestions, to get a better picture result? Or (assuming I'm cool with the file sizes) should I just stay with what I have?
Thanks for all the help,
_Mike
jggimi
22nd October 2004, 16:32
I don't know.
If your analog sources were captured with a standard inexpensive PCI card, such as those described in our analog capture guide (www.doom9.org/capture/start.html) the A->D hardware on those cards -- regardless of manufacturer -- capture in YUY2. If you used that type of hardware, and captured into uncompressed .avi, then the capture driver converted those images to RGB.
When I do analog capture, I retain YUY2 colorspace and capture to HuffYUV. It eliminates any colorspace conversion losses, of course, is also more compact than RGB, and, if I recall correctly, gives me a somewhere between 2:1 and 3:1 storage improvement over uncompressed video, making it easier to capture without dropped frames.
DVD, though, is MPEG-2 in YV12 colorspace. By converting those images to HuffYUV in YUY2 format, I would now have frames from multiple sources in the same colorspace.
Does that matter? Maybe. Of course, colorspace conversions are lossy, and the more lossy steps you can eliminate in your process, the better.
Whether it applies in your case will depend upon how you got your analog sources into digital form, your NLE tools, and a host of other variables. But we're no longer talking about Newbie issues at this point. And technically, I don't know enough about specific colorspaces to give you further guidance.
manono
22nd October 2004, 19:38
I also wish you'd have been more specific about your intentions from the beginning, perhaps by linking to the site in the first post. Most of the rookies posting about AVI in this forum are just looking to backup their DVDs to standard resized AVIs, and what you're doing is exponentially more ambitious. It, if nothing else, would have saved me floundering around trying to guess what you were up to.
Personally, as far as I'm concerned, Lucas can play with and refine the movies until the day he dies. I only wish he'd done what was done with the Alien box set, which was to include the original cleaned up theatrical presentations, flaws, warts and all, along with the SE or DC or whatever these modified versions are called. And his response to those that criticize him for what he's done, something to the effect of "Kiss my ass." brands him as a first class jerk in my book.
Impressive site. Impressive project. Good luck with it.
mverta
25th October 2006, 22:18
Two years later, something is still bothering me:
Say you want to create video with an image aspect ratio of 1.33:1 for NTSC. Your image size should be 720x540 with square pixels. But because NTSC uses non-square pixels, you resize to 720x486. The resulting image aspect ratio is no longer 1.33:1, it's 1.48:1, but that's okay, it's only temporary; it will return to its proper aspect ratio once displayed.
DV is 720x480, non-square pixels, not 486. If the non-square pixel vertical dimension is 480, then the square pixel version should be 533. If the "true" aspect ratio of an image is only revealed by looking at the square-pixel version, then DV's aspect ratio (720x533) is 1.35:1. Interesting to note, however, that the non-square pixel aspect ratio (720x480) is a precise 1.5:1.
Anyway, what I still wonder about is the process of recovering the true square pixel dimensions of an anamorphic image. Typically, to do this, an anamorphic image, "squished" horizontally and presented as 720x480, is resized to 854x480. 854x480 has the correct target aspect ratio of 1.78:1 (16:9). But isn't this image STILL being presented as the non-square pixel version? Shouldn't it require yet another adjustment to compensate for the .9 vertical squish? And if so, then how come the aspect ratio is correct? We've already established that the aspect ratio is only correct when dealing with square pixels.
My guess, and what I've been doing all this time, is that the resizing to 854x480 restores the square pixel, true aspect ratio. It certainly LOOKS right, but for some reason, I still can't get my brain comfortable with it; I'm doing it, without truly understanding it. Anybody have a way of clarifying this?
_Mike
int10h
2nd November 2006, 22:24
If you really want to burn your brain out with aspect ratio concepts, you can take a look here (http://lipas.uwasa.fi/~f76998/video/conversion/).
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.