Log in

View Full Version : Wrong Media Aspect Ratio?


MysteryX
12th December 2014, 07:58
I decided to write a C# software to automatically generate the AviSynth script. For this, I need to know the aspect ratio of the media being encoded.

I found this library which allows me to read the file info
http://mediaarea.net/en/MediaInfo/Download/Windows

Now the problem is... for PAL VCDs, the PAR should be 12/11 (1.090909) and DAR should be 4/3 (1.33333).

However, when I read the file information, it returns a PAR of 1.067 and a DAR of 1.304

This causes the resized image to be distorted. If I manually enter the right PAR of 1.0909090, then the image comes out the same size as the original.

Any idea what these other numbers represent and what I need to read to get the correct information?

fvisagie
12th December 2014, 08:45
There seems to be some confusion between the Storage Aspect Ratios of 720x576 and 704x576.

Taking e.g. 720x576, the reported PAR of 1.067 does actually yield a DAR of ~1.3. With the PAR of 12/11 that you expect, 704x576 yields DAR of ~1.3.

Have a look at http://en.wikipedia.org/wiki/Pixel_aspect_ratio, particularly http://en.wikipedia.org/wiki/Pixel_aspect_ratio#Digital_video_processing and http://en.wikipedia.org/wiki/Pixel_aspect_ratio#Pixel_aspect_ratios_of_common_video_formats.

Cheers,
Francois

Ghitulescu
12th December 2014, 13:33
He talks about VCD. VCDs AFAIK are only 4:3 and never reach 720 nor 704 pixels, but only half, and similar for height which is 288. The only advantage over DVDs is that VCD supports natively 24/1.001 fps :)

TheSkiller
12th December 2014, 14:03
You just need pulldown flags for 24000/1001 fps on DVDs but other than that it's "native" too.


VCDs do not store PAR (neither do DVDs – unfortunately), they store just a basic DAR like all MPEG2 streams do. So any PAR reported by MediaInfo is calculated by it. In case of VCDs, since they are fixed to half of 704 and half of 576, the DAR flag is always exactly right (unless the VCD was scaled to 352x288 incorrectly). And the DAR for VCDs is always 4:3. PAR is standard PAL 12/11.


Any idea what these other numbers representThe 1.067 PAR is based on the "generic PAR" (aka "non-ITU") approach and is purely for 720x576. It's simply assuming 720x576 = 4:3. But since VCD is not half of 720, but half of 704, this is in any case wrong for VCD and results in the 1.30:1 picture you encounter. Actually, this PAR (1.067) shouldn't even exist, because it's just made up from the DAR flag, so one might as well just use the indicated DAR right away.

MysteryX
14th December 2014, 20:48
Both the DAR and the PAR are wrong. So is this just a bug in MediaInfo and all I can do is plug in the right number myself?