View Full Version : questions about pixel ratio recognizing
compusic
7th March 2007, 09:36
I have just done a test for doing a widescreen dvd. I let some applications to output anamorphic videos, that's 720x576 w/pixel ratio=1.422.
if I use the mpeg2 codec for output, the playback of the videos has no problem, that means when the videos are playbacked by any software players on pc and mac, the frame ratio is correct, that's 16:9.
but if I choose to output avi files uncompressed or using certain codec (the codec used here is not critical), here comes the strange thing. all the software players playback the avi files incorrectly, the displayed frame's ratio is 4:3, squeezed horizontally. both the pc and mac have the same problem. I have checked those files, yes, they are 720x576 w/ pixel ratio=1.422.
how can this happen? software players can't recognize avi files' pixel ratio? the players I have tried include windows media player 9, realplayer 10, quick time player 7, media player classic. only media player classic has the option to override the ratio, and if overrided to 16:9, that can let the video playbacked in correct ratio, but default setting "keep aspect ratio" gives the wrong result.
CWR03
7th March 2007, 10:15
Somehow the DAR signaling is wrong. Without knowing exactly how you created these files, it's a matter of guesswork as to why it's happening.
compusic
7th March 2007, 10:27
sorry, what is "DAR signaling "?
the first video file is rendered by 3d max, using dv codec in 720x576 with pixel ratio=1.422. this file can't be playbacked by software players correctly. the frame ratio is 4:3.
then I use premiere pro 2 to creat a pal widescreen project and import that file. in premiere the file is recognized and displayed correctly, that's 16:9 ratio. then after some editting, I let premiere export movie. if mpeg2 codec is used, the playback has no problem. if output in avi format, problem occurs.
compusic
8th March 2007, 09:27
well, just got the meaning of DAR=Display aspect ratio.
but I'm afraid that's not the cause.
just did another test. quicktime player and windows media player has the " save as " function, then use them to save the avi file as other 2 files, import those 2 files into premiere to check the properties.
the avi file saved by wmp is 720X576 w/ pixel ratio=1.422, nothing changed. it seems wmp only copies the origional file, since the size is the same.
the mov files saved by qt is 720X576 w/pixel ratio=1.067!!!!!
wha, quicktime player discarded the origional file's pixel ratio!!!
that's the reason, I'm afraid.
searching the net for info, I found that someone also mentioned that many software players discard avi files' pixel ratio. but didn't tell why.
anyone can explain this? any cause due to the avi standard?
thanks in advance.
HeadBangeR77
8th March 2007, 12:22
searching the net for info, I found that someone also mentioned that many software players discard avi files' pixel ratio. but didn't tell why.
anyone can explain this? any cause due to the avi standard?
thanks in advance.
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 (btw. just use G-Spot on your encodes and you will see SAR, PAR, DAR, where DAR = SAR x PAR). 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).
Btw. You could mux your files into Matroska (mkv) container - it doesn't change the PAR, and you can set the final DAR, so that every player capable of playing mkv files (splitter needed) will respect those values and your videos will have the proper proportions. ;)
To sum things up - it's not container's fault, it's usually decoders fault.
cheers,
HDBR77
compusic
9th March 2007, 05:02
thanks for reply.
well , the dispaly problem makes me crazy.
It seems that quick time file . mov has the same problem. qt player can't recognize mov PAR. since for the same resolution files, but with different PARs, qt player displays the same size videos.
I did even more tests, and confused more.
though many people have told that computers display in square pixels, if the source video has different pixel ratio, the players will scale the video accordingly. It seems definitely true, right?
then here is my test. I set my lcd monitor to display in 800x600, a 4:3 ratio
. all videos are played at origional sizes.
first is a pal 720X576 w/PAR=1.067 mpg file, played by windows media player, check the properties I can see that the resolution is 682 x 480, not a 4:3 ratio!! ( in fact, no matter what display resolution the monitor is set, the wmp gives the same info.)
then next is a pal 720X576 w/PAR=1.422 avi file, if players discard avi files' PAR, then should use square pixel, right? check in wmp, the relosution is 640X480, wooo.... a 4:3 ratio for square pixel. but 720x576 in square pixel is not a 4:3 ratio.
next is a anamorphic mpeg2 file, 720X576 w/PAR=1.422, check in wmp, resolution is 910x480, not a 16:9 ratio. in fact, I thought this video is larger than my monitor screen can display, but to my surprise, the video didn't occupy the whole screen, there's much empty space.
and for the same avi file, qt player's window occupies more space that wmp's window. qt player only shows the video files' origional resolution, not the scaled one.
my brain is bleeding .......
compusic
9th March 2007, 05:08
use G-Spot on your encodes and you will see SAR, PAR, DAR, where DAR = SAR x PAR). HDBR77
sorry I can't understand the relationship between SAR( sample aspect ratio, right?) and PAR. In fact, I don't know the meaning and function of SAR.
would you please give an example to explain it? thanks.
--------------------------
oh, after using g-spot, I got the idea of SAR, just the frame size ratio in square pixels. or in another way, it's the ratio of numbers of pixels.
foxyshadis
9th March 2007, 09:05
Well, this is just one of the dozen reasons why QT is generally considered the worst well-known player on Windows. Surprised you're spending so much effort just to repeatedly confirm that. If you have a chance, you should use anything but Quicktime, even an old ad-laden version of Realplayer.
stegre
9th March 2007, 09:29
...oh, after using g-spot, I got the idea of SAR, just the frame size ratio in square pixels. or in another way, it's the ratio of numbers of pixels.
Yes, you've pretty much got the idea on that last thing you said. But since you mentioned it - watch out about what the abbreviation "SAR" stands for; do not refer to it as "Sample Aspect Ratio". It's very true that it is in fact sometimes used as an abbreviation for "Sample Aspect Ratio" (in the MPEG specs, for example); however that's a phrase roughly equivalent to what most other people refer to as "PAR" these days. And it's furthermore confused because it's 'upside down' (the inverse) of the other ratios in common usage. I was actually very careful in my wording of the tooltips in these fields in GSpot to help explain & avoid any confusion - I think if you read them below you'll see that this all makes sense. In what I'd call the more common usage, as used below, SAR is "Storage Aspect Ratio". It's just a ratio of stored pixels, as you said - it's irrelevant to how they are displayed. And for that matter, DAR has nothing to do with pixels. If you were holding a old 6" x 4" photograph in your hand I could legitimately say that has a "DAR of 1.5"
Another point of confusion is a whole 'nother can of worms, a subject often referred to in general as "ITU-R BT.601". It's a very technical area that gets into a discussion why all these "simple" numbers you usually see (e.g. as the ones you quoted above) are really all wrong - abeit by a very small amount. But absorbing that will really make your head hurt ;)
http://www.headbands.com/gspot/misc/ratios.png
compusic
9th March 2007, 09:44
thanks for all your replys.
now I know that as a container, both avi and mov do not support pixel ratio other than 1.0.
but there's another problem of scaling. as I have wrote:
though many people have told that computers display in square pixels, if the source video has different pixel ratio, the players will scale the video accordingly. It seems definitely true, right?
then here is my test. I set my lcd monitor to display in 800x600, a 4:3 ratio. and all videos are played at origional sizes.
first is a pal 720X576 w/PAR=1.067 mpg file, played by windows media player, check the properties I can see that the resolution is 682 x 480, not a 4:3 ratio!! ( in fact, no matter what display resolution the monitor is set, the wmp gives the same info.)
then next is a pal 720X576 w/PAR=1.422 avi file, if players discard avi files' PAR, then should use square pixel, right? check in wmp, the relosution is 640X480, wooo.... a 4:3 ratio for square pixel. but 720x576 in square pixel is not a 4:3 ratio.
next is a anamorphic mpeg2 file, 720X576 w/PAR=1.422, check in wmp, resolution is 910x480, not a 16:9 ratio. in fact, I thought this video is larger than my monitor screen can display, but to my surprise, the video didn't occupy the whole screen, there's much empty space.
stegre
9th March 2007, 09:52
thanks for all your replys.
though many people have told that computers display in square pixels, if the source video has different pixel ratio, the players will scale the video accordingly. It seems definitely true, right?
I've gotta get to bed now, so can't post any more detail, but yes, the statement above is exactly corrrect. Computer pixels are square, so they adjust the number of them instead to simulate the overall effect of other systems (like vidcams) where they aren't.
HeadBangeR77
9th March 2007, 12:02
now I know that as a container, both avi and mov do not support pixel ratio other than 1.0.
Hello. Plz reread this thread once again (I've just done this, it took me 3 minutes) - as containers they truly don't (the PAR information isn't stored in the container itself), yet PAR is the domain of video stream, which is stored inside these containers. So if your videos with anamorphic PAR are displayed incorrectly (usually at SAR), it's due to either decoder's or player's incapability to read the PAR information, which is still present there.
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.
As to your other problems with display (sorry, I'm in a bit of a hurry): every player has more or less complicated display options - WMP tries to squeeze the window inside its skin, unless you go fullscreen, while some other players display in full resolution without going into fullscreen mode.
@ stegre:
Your explanation should be made a sticky somewhere, 'cause people keep asking on the matter, and probably will as long as anamorphic PAR stays in digital video world. :)
It's really clear & simple + the screen grabs from G-Spot visualize the whole thing very well. Actually those tooltips helped me understand the problem once and for all, a couple of years ago.
compusic
12th March 2007, 02:53
thanks for reply. but the scaling problem is not solved yet.
in another forum, someone reminds me one thing.
my pc is a dell model, the monitor is dell 1907fp, a 19'' LCD said to have 1280x1024 resolution, and that's a 5:4 ratio. and I use digital connection for display.
yes, if the monitor is set to 800x600 resolution ( now the pixels are not square any more), those scalings seem correct. for example, a pal 720X576 w/PAR=1.067 mpg file, the DAP should be 4:3. the player displays the file in 682 x 480. then 640 * (4/3) / (5/4) = 682. The player is adjusting the frame for a 5:4 monitor. seems definitely correct, right?
no, waite...... as I have said, I have done the tests in different monitor resolutions. no matter what resolution my monitor is set to, the number of poxels after scaling is the same.
then should I doubt what DELL has said about their monitor's resolution? or there's other cause?
HeadBangeR77
12th March 2007, 11:38
(...)
in another forum, someone reminds me one thing.
my pc is a dell model, the monitor is dell 1907fp, a 19'' LCD said to have 1280x1024 resolution, and that's a 5:4 ratio. and I use digital connection for display.
Gee, I've been always wondering why monitors producers and game developers tend to use 1280x1024 instead of 1280x960. It's making the mess we already have even bigger.
The only thing that comes to my mind atm (I'm using Iiyama 17" CRT 4:3, and widescreen 15.4" LCD on my Toshiba notebook) is to download MPC (Media Player Classic), the latest build available here (http://forum.doom9.org/showthread.php?p=966161#post966161), and under View => Video Frame try to either tick or untick "Correct Monitor/Desktop AR Difference". See if it changes anything (I hope so at least). It seems to be the problem on the line monitor - software player imo.
good luck!
SeeMoreDigital
12th March 2007, 12:44
@ stegre:
Your explanation should be made a sticky somewhere, 'cause people keep asking on the matter, and probably will as long as anamorphic PAR stays in digital video world. :)
It's really clear & simple + the screen grabs from G-Spot visualize the whole thing very well. Actually those tooltips helped me understand the problem once and for all, a couple of years ago.You might find another one of his posts interesting too!
See: http://forum.doom9.org/showthread.php?p=562532#post562532
HeadBangeR77
12th March 2007, 16:45
You might find another one of his posts interesting too!
See: http://forum.doom9.org/showthread.php?p=562532#post562532
I found the info about MPEG-2 video streams especially interesting, since I wasn't sure as to many details. Ta! :)
PS. Combining the post in this thread with those posts from the linked thread we could get some really interesting and informative sticky material. Anyone? People come and go, and keep asking the same questions...
cheers,
HDBR77
Brother John
12th March 2007, 18:44
Gee, I've been always wondering why monitors producers and game developers tend to use 1280x1024 instead of 1280x960.
On most (all?) CRT monitors 1280x1024 indeed results in a slightly distorted image because the tube has a 4:3 ratio instead of 5:4. But TFTs with a 1280x1024 native resolution have a 5:4 panel. Seems like producers did some thinking there. ;)
HeadBangeR77
12th March 2007, 19:00
Yeah, I know, it's like 1280x800 LCD in my notebook - the height h is above 16:9 wide-screen, and so is the height in the discussed case. I'm just wondering how anamorphic encodes would behave on monitors with native, atypical (you can't deny that) AR. Guess I have to check it out myself and see, if I could reproduce the problem - never watched any anamorphic rips on my NT.
SeeMoreDigital
12th March 2007, 19:34
Yes it's all rather sad and confusing isn't it?
For some bizarre reason (I don't think even the panel manufacturers can explain and/or certainly justify) a "standard" shaped LCD panel has a DAR of 5:4 instead of 4:3. And "wide-screen" shaped LCD panel has a DAR of 16:10 instead of 16:9!
Cheers
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.