dvd-hq.info Forum Index dvd-hq.info
DVD & video forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

questions about pixel ratio recognizing

 
Post new topic   Reply to topic    dvd-hq.info Forum Index -> Compression
View previous topic :: View next topic  
Author Message
compusic



Joined: 22 Sep 2006
Posts: 35

PostPosted: Thu 8 Mar 2007, 1:23    Post subject: questions about pixel ratio recognizing Reply with quote

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.

-----
and more info below.

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.
Back to top
View user's profile Send private message
compusic



Joined: 22 Sep 2006
Posts: 35

PostPosted: Thu 8 Mar 2007, 8:31    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
RMN
Site Admin


Joined: 04 Feb 2003
Posts: 587
Location: Lisboa, Portugal

PostPosted: Sat 10 Mar 2007, 0:25    Post subject: Reply with quote

I doubt 3DS MAX will even pass its internal aspect ratio value to the codec; most people using MAX (and other 3D rendering applications) don't create AVI files directly (if there is a problem during rendering and the program crashes or locks up, there's a good chance the entire AVI file will be unreadable). The "standard" procedure for 3D rendering is to save TGA (or RPF) sequences, and then load those sequences directly into editing or compositing software (which will usually let you set the aspect ratio manually).

In other words, AVI files created from 3DS MAX will not contain any aspect ratio information, which means the player will assume they use square pixels (so 720x576 doesn't even render as 4:3, it renders as 5:4).

This should be changed, of course, and it's probably trivial to do. I think there's a "wishlist" address somewhere in the 3DS MAX section of autodesk.com. You could send them a message asking them to include the render aspect ratio value in the AVI file header, but I doubt Autodesk considers it a very high-priority issue (because very few people export AVIs directly from MAX).

P.S. - If you don't have it, get GSpot. It's a small utiity that will show you a lot of information about video files and installed codecs.

RMN
~~~
Back to top
View user's profile Send private message Send e-mail Visit poster's website
compusic



Joined: 22 Sep 2006
Posts: 35

PostPosted: Sat 10 Mar 2007, 1:08    Post subject: Reply with quote

thanks for reply.


in other forum, got the answer to the recognizing problem. that's due to as a container, both avi and mov do not support PAR info.

but there's a scaling problem.

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 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!!

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.
Back to top
View user's profile Send private message
RMN
Site Admin


Joined: 04 Feb 2003
Posts: 587
Location: Lisboa, Portugal

PostPosted: Sat 10 Mar 2007, 1:48    Post subject: Reply with quote

compusic wrote:
in other forum, got the answer to the recognizing problem. that's due to as a container, both avi and mov do not support PAR info.


They don't need to. Pixel aspect ratio can be derived from the pixel resolution and the image aspect ratio. The four values are always linked; you can always determine the 4th value from the other 3. The problem is that a lot of software doesn't bother to write the correct (image) aspect ratio to the file headers.

compusic wrote:
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?


Most players, yes.

compusic wrote:
I set my lcd monitor to 800x600, a 4:3 ratio.


No. That would only be true if your LCD had a physical aspect ratio of 4:3. LCDs have a physical aspect ratio of 5:4. In other words, if an 800x600 desktop is stretched to fit an LCD, it will not be using square pixels.

The only way to make an 800x600 image appear on an LCD as a square-pixel image is to set the LCD to "center" mode (where the image is displayed using the area in the center of the screen, not stretched to fill the screen). This is only available on some LCD panels, and only if you use DVI. And there's a good chance the graphics driver will still assume that the image is being stretched.

As a general rule, leave your LCD set to its native resolution (ex., 1280x1024), and use a DVI connection.

compusic wrote:
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!!


Actually, that is perfectly correct, and it is a 4:3 aspect ratio.

Monitor aspect ratio: 5:4 (LCD)
Desktop resolution: 800x600
Desktop PAR: 0.9375

682 x 0.9375 = 640 (actually it's 639, but close enough)

640:480 is equivalent to 4:3

In other words, your player is correctly taking into account the source pixel aspect ratio and your monitor's aspect ratio, and displaying the image with the correct (physical) proportions.

compusic wrote:
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.


640x480 is only a 4:3 ratio if your desktop aspect ratio is the same as your monitor's aspect ratio. In this case you're trying to display a (logically) 4:3 desktop on a 5:4 screen. The result is that 640x480 becomes a 5:4 aspect ratio, which is correct in this case (same aspect ratio as 720x576 on a square-pixel monitor).

Use the LCD at its native resolution and it'll be much simpler to understand. Smile

RMN
~~~
Back to top
View user's profile Send private message Send e-mail Visit poster's website
compusic



Joined: 22 Sep 2006
Posts: 35

PostPosted: Mon 12 Mar 2007, 7:33    Post subject: Reply with quote

Quote:


Actually, that is perfectly correct, and it is a 4:3 aspect ratio.

Monitor aspect ratio: 5:4 (LCD)
Desktop resolution: 800x600
Desktop PAR: 0.9375

682 x 0.9375 = 640 (actually it's 639, but close enough)

640:480 is equivalent to 4:3

In other words, your player is correctly taking into account the source pixel aspect ratio and your monitor's aspect ratio, and displaying the image with the correct (physical) proportions.



yes, soon after the test, I realize that there's a factor of the monitor's native resolution.

my pc is a dell model, monitor is dell 1907fp, a LCD with native resolution 1280x1024, and use digital connection.

yes, for the 800x600 resolution, the pixels' numbers after scaling are correct.

but, waite... I set the monitor to native resolution--- 1280x1024. then check for the resolution of the same playbacked videos, wooo.... it's still showed the same numbers. that's:

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!!

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.



should I doubt dell's monitor?
Back to top
View user's profile Send private message
RMN
Site Admin


Joined: 04 Feb 2003
Posts: 587
Location: Lisboa, Portugal

PostPosted: Tue 13 Mar 2007, 5:08    Post subject: Reply with quote

Why would WMP scale down the image to a width of 640 or 682 pixels? If the source file is 720 pixels wide, it should be displayed with that width (at least).

At 800x600, I could understand if some parts of the interface filled the rest of the screen, and the video would have to be scaled down. But at 1280x1024, there's no reason to scale the video down automatically; it should play with its native resolution (even if the aspect ratio wasn't corrected), or scaled to (nearly) full screen.

If WMP is scaling the video down when there's plenty of free space, something isn't right.

I notice that 640 x 1.067 is 682. So it would seem that you have a 640x480 file with a 1.067 pixel aspect ratio. Not a 720x576 file (which would have been scaled to 768x576, since there is enough space on the 1280x1024 monitor).

Have you loaded the file(s) into GSpot?

RMN
~~~
Back to top
View user's profile Send private message Send e-mail Visit poster's website
compusic



Joined: 22 Sep 2006
Posts: 35

PostPosted: Wed 14 Mar 2007, 1:15    Post subject: Reply with quote

yes, I do check those files in G-Spot.

and the numbers of pixels are 720x576 for both files.

strange!? can't figure out the reason. ;(
Back to top
View user's profile Send private message
RMN
Site Admin


Joined: 04 Feb 2003
Posts: 587
Location: Lisboa, Portugal

PostPosted: Wed 14 Mar 2007, 17:20    Post subject: Reply with quote

Have you tried other players (ex., MPC)? Looks like something wrong in WMP's configuration. For some reason it's resizing the videos down to 640x480 (although there is plenty of free space in your desktop), and then applying the aspect ratio correction.

Make sure you have "fit player to video on start" enabled, in WMP's options.

RMN
~~~
Back to top
View user's profile Send private message Send e-mail Visit poster's website
compusic



Joined: 22 Sep 2006
Posts: 35

PostPosted: Fri 16 Mar 2007, 5:39    Post subject: Reply with quote

thanks for your patience.

I have found the cause.

the video decoder used is ffdshow MPEG-4 Video Decoder. and the "resize & aspect" option is checked. after uncheck, the numbers of pixels are correct.

In fact, I don't know how to let a player use certain decoder and/or filter, and why certain decoder becomes the default decoder.

any web page explains this?

thanks.
Back to top
View user's profile Send private message
RMN
Site Admin


Joined: 04 Feb 2003
Posts: 587
Location: Lisboa, Portugal

PostPosted: Wed 21 Mar 2007, 6:23    Post subject: Reply with quote

Different filters and splitters can cause a lot of different behaviours, so there's no simple way to explain it (things can be different depending on which order they were installed in, etc.). You can use GSpot to disable some decoders and filters, and try to resolve conflicts.

RMN
~~~
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    dvd-hq.info Forum Index -> Compression All times are GMT
Page 1 of 1

 
Jump to:  
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



Powered by phpBB © 2001, 2002 phpBB Group