Log in

View Full Version : MPEG2Source loads my .d2v incorrectly


ZionDK
29th December 2007, 20:29
I've run a VOB through DGIndex to get a .d2v that I can load via MPEG2Source to encode the video (to x264), and later mux in video and my encoded audio in a mkv container, but it seems like MPEG2Source reads my input incorrectly.

Here's the original:
http://thumbnails3.imagebam.com/162/3a60be1615974.gif (http://www.imagebam.com/image/3a60be1615974)

And here when loading the video through MPEG2Source:
http://thumbnails3.imagebam.com/162/88cf9a1615973.gif (http://www.imagebam.com/image/88cf9a1615973)

The dimension has changed from 720x540 to 720x480. I guess I'm doing something wrong, but I can't figure out what it is.

Can you help me?

foxyshadis
29th December 2007, 20:51
Not wrong, DGDecode just doesn't correct the AR. It assumes you will handle all resizing, or convert it to anamorphic on your own. 720x480 is how it's actually stored on disc.

If you want to use anamorphic, resizing on playback instead of processing, you have to either encode or mux it with an aspect ratio. Most things need a pixel AR, though mkv uses display AR (4:3).

ZionDK
29th December 2007, 21:12
(...) you have to either encode or mux it with an aspect ratio.
How do I do that? With "LanczosResize(720,540)"? Is upscaling to right AR loosing much quality?

Not only do I have to encode it, I also need to crop and resize, and for that I use
#Crop
AutoCrop(mode=1,hMultOf=8,wMultOf=8,leftadd=2,rightadd=2,topadd=2,bottomadd=2,samples=5,threshold=50)

#Resize to certain width (height is automatically calculated)
ResizeMaintainAspectWidth(576,"LanczosResize")

function ResizeMaintainAspectWidth(clip c,int newwidth,string resizefn) {
nh=floor(eval(string(c.height)+". * "+string(newwidth)+". / "+string(c.width)+"."))
return eval(resizefn+"(c,"+string(newwidth)+","+string(nh)+")")
}

It all comes out wrong, but now I know why.

Or is there an alternate way to load the VOB (without sound (or does that even matter?)) that keeps original AR?