Posted: Wed 25 Jul 2007, 2:24 Post subject: one more question about avi file's pixel aspect ratio
as I have learned before that avi file does not support par other than 1:1, since avi was first coined for video on computer. if a avi file with other par is played back on pc, nearly all the players will suppose a 1:1 par, and won't make adjusting for the display, quick time's mov file has the same problem. I don't remember clearly at that time what codec those avi and mov files used, maybe in uncompressed format and some other codecs.
but now I just encounter a problem. when I play back avi file with dv codec ( par is 1.067), I find that the displayed frame aspect is correct, that means the players make adjusting for the par! the players I use are media player classic and windows media player 9. and I use quick time player 7 to play back mov file with dv codec, the fame ratio is correct too!
then I play back some other umcompressed avi with different par, the frame ratio is not correct!
how can it be? the problem makes me crazy! nearly 99 out of 100 times, I'm not sure whether the avi file can be displayed correctly on the computer.
Joined: 04 Feb 2003 Posts: 587 Location: Lisboa, Portugal
Posted: Wed 25 Jul 2007, 17:32 Post subject: Re: one more question about avi file's pixel aspect ratio
compusic wrote:
as I have learned before that avi file does not support par other than 1:1,
Of course it does. What gave you that idea? Pixel aspect ratio is simply a consequence of the image aspect ratio and file resolutiuon (in pixels). Pixel aspect ratio is rarely stored explicitly, because the image aspect ratio is more useful (and one can be calculated easily from the other).
Quote:
if a avi file with other par is played back on pc, nearly all the players will suppose a 1:1 par,
No, they won't. All modern players (WMP, MPC, etc.) will read and use the aspect ratio stored on the file (and many will also let you override it, and select the aspect ratio manually).
Some specific codecs might not support reading (or writing) aspect ratio information to AVI / MOV files, but that is a problem specific to those codecs, not to the AVI or MOV file formats.
Quote:
but now I just encounter a problem. when I play back avi file with dv codec ( par is 1.067), I find that the displayed frame aspect is correct, that means the players make adjusting for the par!
And that is a "problem"?
Quote:
then I play back some other umcompressed avi with different par, the frame ratio is not correct!
Well, then you should probably contact whoever makes that "some other uncompressed codec", because it's either not saving the correct aspect ratio data when creating the file, or it's not reading it correctly when playing back.
Posted: Fri 27 Jul 2007, 8:16 Post subject: Re: one more question about avi file's pixel aspect ratio
[quote="RMN"]
compusic wrote:
as I have learned before that avi file does not support par other than 1:1,
Of course it does. What gave you that idea?
[quote]
I just got those info from other forums, like these below:
one guy's reply
--------------------------------------
AVI is just a container (and rather old, I would say), and it isn't capable of storing either Pixel Aspect Ratio (PAR) or Display Aspect Ratio (DAR) as a container . Instead of that the PAR is indicated in the video stream itself, so the info is always there, as it is the case with all MPEG-2 video streams. While all players capable of decoding MPEG-2 respect PAR flags, since it's in the standard, MPEG-4 decoders & players often don't (as a rule, unless you have a proper decoder like ffdshow).
Example: I make a simple classical encode with XviD, stored in AVI 2.0. It's anamorphic, SAR is the original DVD resolution. I use XviD's decoder. ALLPlayer (a Polish invention, not bad, yet not perfect) discards the PAR flags and displays the encode wrongly, while Media Player Classic does it correctly.
Ever seen an SVCD? Without proper MPEG-2 decoding, just after fresh WinXP installation, they are displayed totally wrong - in this case it's decoder's fault.
-----------------------------------------
and another guy's reply
--------------------------------------------
I was wrong about AVI not supporting display aspect ratios. The original AVI spec had no provision for it but the ODL extensions (used by most programs these days) do have a frame aspect ratio (same as display aspect ratio) setting. Unfortunately its usage is sporadic so you can't rely on it.
The safest bet is assume DV (4:3 or 16:9) will display properly and that most other AVI files are square pixel (DAR = SAR).
----------------------------------------------
Joined: 04 Feb 2003 Posts: 587 Location: Lisboa, Portugal
Posted: Mon 30 Jul 2007, 16:00 Post subject:
I had never heard of "ALLPlayer", and I'm sure I'm not the only one. So who cares if some unknown player can't read the aspect ratio information correctly?
The fact that MPC and WMP (two very common players) can display the image correctly proves that the AR information is available in the file, no...?
Also, the second reply makes very little sense. He says "the safest bet is assume DV (4:3 or 16:9) will display properly". In fact, 4:3 DV and 16:9 DV have exactly the same resolution. The only way to distinguish them is by looking at the aspect ratio data. So, if a program can play both formats correctly, that's evidence that it can read the aspect ratio data, and therefore it doesn't need to assume that "other AVI files are square pixel"; it can simply read their aspect ratio information (if the codec supports it, of course; some codecs don't include AR data in the file).
Also, I suspect that by "ODL extensions" he means "OpenDML extensions". These have been in use since 1996 (yes, more than 10 years!) and include a standard way to encode the aspect ratio. There's a structure called "vrpr" (Video Properties Header) in the file, which contains (amongst other values), these three properties:
dwFrameAspectRatio
dwFrameWidthInPixels
dwFrameHeightInLines
From these values, it's easy to calculate the pixel aspect ratio (although that's not really necessary for playback; you only need the image aspect ratio, which is included explicitly).
As to SVCD, it is not based on the AVI format, so how is it relevant?
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum