Log in

View Full Version : Frame size discrepancy with AviSynth + Mpeg2Dec


Marticus
14th November 2002, 12:31
I have recently noticed that AviSynth is getting the resolution slightly wrong when using mpeg2dec. The VOB files I have are 768x576, but whenever I play/load them through an avs it comes out as 720x576. Is this because the files are normally being stretched horizontally to play or something, or is avisynth/mpeg2dec at fault?

Didée
14th November 2002, 13:04
Marticus,

CONGRATULATIONS!!!

You've got your place in the Guinness Book of Records!

... because you're the first person at all who has VOBs with 768*576.

Marticus
14th November 2002, 13:22
Well what's with this:
http://midnightrealm.org/~marticus/768one.png
and this:
http://midnightrealm.org/~marticus/768two.png

A problem with both players?

Wilbert
14th November 2002, 15:39
Welcome to the forum!

When playing vobs, they are stretched to 768x576 (at least for 4:3 PAL). Note that 768 = 4/3*576.

Marticus
14th November 2002, 16:17
So am I right in assuming that i should stretch the files (after deinterlace) to get the aspect ratio right?

Wilbert
14th November 2002, 16:37
Yes (assuming you are going for DivX/Xvid).

crop black bars: ending up with 720xW ==>

4:3 movies: stretch it to 4/3*576xW and scale it to 640xsomething

16:9 movies: stretch it to 16/9*576xW and scale it to 640xsomething

example: let's take the movie fast and the furious. Afther cropping the black bars you will end up with 720x436. It's anamorphic widescreen (thus 16:9).

Note that 16/9*576 = 1024, so stretch it to 1024x436. After scaling you will get 640 x (640/1024*436) = 640 x 272. Thus after cropping the black bars you have to resize it to 640x272.

Note that the aspect ratio of the movie is 640/272:1 = 2.35:1 (which is true).

I hope this is a bit clear, but it is all covered in the guides. Take also a look at this page (http://www.doom9.org/aspectratios.htm).

RadicalEd
14th November 2002, 22:02
Wilbert isn't that method a bit flawed? You're upsizing and then downsizing then, and resampling more than you need to is never a good idea. Why do you bother upsizing to 768x576 and then downsizing to 640x480? You should just resize from 720x576 to 640x480 :/

actually with PAL you'd even only have to resize to 704x528
damn NTSC only giving us 480 lines to work with :P

scmccarthy
14th November 2002, 23:16
@Radical ED

No, you are supposed to skip all the intermediate calculations.

You want to crop to 720:448 and then resize to 640:272.

Just one crop and one resize; the rest is the calculations that got you there.

RadicalEd
14th November 2002, 23:41
ohhhhhh he's just doing that to show how resizing to 4:3 works
damn, my reading comprehension must have somehow dropped a huge amount since last week ; ;

Marticus
15th November 2002, 06:07
Thanks for clearing that up, i dont know why they arbitrarily crop it slightly and then stretch it. I was writing a dvd to avi guide for my friend and wanted to clear that up, good to see it's not an avisynth glitch, just stupidity of the movie industry :)