Log in

View Full Version : Aspect ratio question


bananix
5th December 2005, 12:36
source video in this example is dvd of resolution 720x480 (aspect ratio 1.5) NTSC interlaced

if i make xvid of it with resolution 640x480 (aspect ratio 1.333) this means the video is shrinked in one dimension more than other so it loses quality to my understanding when i play it with aspect ratio 1.5 on pc monitor so it is normal (unless you crop the movie but i don't want to do that). would this method be best if watched from tv or something instead of pc monitor?

if i add black to top and bottom of the source to make it resolution 720x540 (aspect ratio 1.333) so then i can convert it to xvid of same resolution and aspect ratio so then no resize occurs. would this method be good for watching on some source?

if i make 720x480 xvid from it so the aspect ratio is the same and no resize occurs so i belive it would be best if i one wants to watch it from pc monitor am i correct? and would this be good for watching from tv or some other?

or is some other aspect ratio than 1.333 useful for some type of displays?

CWR03
5th December 2005, 13:18
That's a lot of questions that really just seem to be overcomplicating things.

If the proper viewing aspect of the video is 1.333:1, you would do best to leave it that way. You can expand it to 720 x 540, but since the pixels aren't square you won't be improving the end quality. The simplest method would be to use 640 x 480 since playing it on a PC will always keep that aspect ratio, and most standalone players and TVs allow adjustment to prevent stretching of a 1.333:1 source across a 16:9 TV.

Another option would be to add borders to the left and right to make the end product 16:9, but only if you plan to never view them on a 1.333:1 display. It can still be adjusted for proper playback, but it's troublesome.

SeeMoreDigital
5th December 2005, 14:24
Hi bananix,

You might benefit from reading up about a process known as "anamorphic signalling".

You will find that "anamorphic signalling", is applied to all store bought (MPEG-2) DVD's and even digital satellite, cable and terrestrial TV broadcasts ;)


Cheers

jggimi
5th December 2005, 17:51
Welcome to the forum, bananix.

As you know, AVI's typically have square pixels -- as do PCs. And, as you know, DVDs do not. In order to watch a DVD (or an AVI backup) on a square pixel monitor, resizing is required. The question is, when creating AVIs, should that resize occur during playback, or during encoding?

The majority of us resize at the encoding step. This is because by default, AVI containers are expected to have video with square pixels, in every software and hardware player that supports the format.There is a sizeable minority who encode into anamorphic capable MPEG-4 containers such as MP4 or MKV, and if memory serves, there are some who insert anamorphic flags into AVI for use with a player that has flag recognition.Resizing During Encoding

It is considered best practice by our members to avoid any upsizing -- this is because the increased frame size increases filesize with no value added.

It is also considered best practice to strip any letterboxing / pillarboxing while resizing, at the same time, for the same reason.

Resizing On Playback

If the container is not flagged (typically AVI) then a software player capable of being set to 4:3 or 16:9 (BSPlayer, ZoomPlayer, MPC, etc.) can be used. Hardware AVI players and their attached TVs/monitors may or may not be able to resize appropriately, depending upon their capabilities.

bananix
5th December 2005, 20:36
jggimi i don't see how resizing is required if i make same resolution xvid and play it on my pc monitor only when played in full screen it is resized to fit your resolution but aspect ratio of 1.5 is kept so you get black at top and bottom because computers usually have 1.333 aspect ratio (well i have 1280x1024 which is 1.25 but i guess pc monior is still 1.333 or is it? :)) unless you resize vertically so it fills whole screen which is not required. or what is meant by this...

SeeMoreDigital
5th December 2005, 20:44
Like I mentioned earlier.... you need to read up about "anamorphic signalling".

Once you've grasped the the basics of how anamorphic images function/work..... All will become clear ;)


Cheers

charleski
5th December 2005, 21:21
bananix, some sort of playback resizing will always be required if you encode the video at the same resolution as the DVD input. DVDs are only produced at one of two aspect ratios: 1.33 (4:3) and 1.778 (16:9), this is flagged in the MPEG stream. The DVD player resizes the 720x480 using this flag and the TV-type that you've set in the player.

So, as jggimi said, you need to do some sort of resizing as well, and you can do that either before you encode, or when you play it back. If you don't resize, your video will be playing back at an aspect ratio of 1.5 , which will always be wrong.

bananix
5th December 2005, 21:21
does the anamorphic mean that the 720x480 (aspect ratio 1.5) source dvd actually is normal image when played with aspect ratio 1.333?

charleski
5th December 2005, 21:22
No, anamorphic means it's supposed to be played back at 16:9 (1.778).

jggimi
5th December 2005, 21:28
Apparently we're miscommunicating. Allow me to try again. DVDs have fixed resolutions, but they do not have a fixed pixel size. Also, DVDs do not have square pixels, the way your monitor should -- see below. If you play those 720x480 pixels (NTSC) unresized on a square pixel monitor, you are watching video with an aspect ratio of 1.5:1. This is neither 4:3 (1.33:1) nor 16:9 (1.78:1). If you play back 720x576 (PAL) unresized, you are watching 1.25:1. Neither of these is the correct viewing resolution. DVDs have DARs of either 4:3 or 16:9. -- Commercial NTSC DVDs are all produced at the same fixed resolution -- 720x480.There are other resolutions in the standard, but these are not usually found on commercially produced DVDs. For NTSC, these are 704x480, 352x480, 352x240, and 352x240. There are similar, fixed resolutions for PAL. A software DVD player will resize all DVD video on playback, to fit the appropriate DAR. It will resize the video, whether the display window fills the screen or not. AVI files are expected to have square pixels -- technically, that means a Pixel Aspect Ratio (PAR) of 1:1. I do not know of any players that will automatically adjust PARs when your PC display changes aspect. With a 4:3 monitor, I recommend using a 4:3 resolution on your PC display when playing video -- the aspect error at 1.25:1 may be noticeable.

For more info, see http://www.dvddemystified.com/dvdfaq.html section 3.5

jggimi
5th December 2005, 21:32
I should have added, "and also, Doom9's AR guide -- http://www.doom9.org/aspectratios.htm."

CWR03
5th December 2005, 21:49
Maybe we should back up a bit. Start by ignoring the 740 x 480 source aspect. It is never used as a viewing aspect, so if you try to make an AVI at 1.5:1 it will always have either vertical or horizontal stretching. Perhaps you should set your display at 1280 x 960, which is a proper 1.333:1. It sounds like you're trying to correct the aspect to view properly when it's being skewed on your display.

bananix
5th December 2005, 21:54
so my stream of the source dvd of resolution 720x480 (1.5) is 4:3 only and not 16:9. so if i make it 1.333 (4:3) aspect ratio like 640x480 xvid it is normal image and not distorted and making it 1.5 aspect ratio xvid has no point because it is not normal image or is it useful for some purpose?

bananix
5th December 2005, 21:59
Maybe we should back up a bit. Start by ignoring the 740 x 480 source aspect. It is never used as a viewing aspect, so if you try to make an AVI at 1.5:1 it will always have either vertical or horizontal stretching. Perhaps you should set your display at 1280 x 960, which is a proper 1.333:1. It sounds like you're trying to correct the aspect to view properly when it's being skewed on your display.

yes i know my display distorts 1.333 cos of my resolution but i'm talking in general when most use resolution with aspect ratio of 1.333 and monitor of same aspect.

charleski
5th December 2005, 22:11
so my stream of the source dvd of resolution 720x480 (1.5) is 4:3 only and not 16:9. so if i make it 1.333 (4:3) aspect ratio like 640x480 xvid it is normal image and not distortedYes.

and making it 1.5 aspect ratio xvid has no point because it is not normal image or is it useful for some purpose?It is possible to keep the original aspect ration and resolution and do the resizing on playback, but this is best done with video in an .mkv or .mp4. You're better-off resizing before the encoding if you want an avi though.

bananix
5th December 2005, 22:20
Yes.

It is possible to keep the original aspect ration and resolution and do the resizing on playback, but this is best done with video in an .mkv or .mp4. You're better-off resizing before the encoding if you want an avi though.

well why would someone want to keep the original resolution of dvd if it's distorted and needs to be resized when played? i can only think so it can be made back to dvd format with better result...

EDIT: or perhaps it's then better quality when resized to other resolutions like 16:9 tv

CWR03
5th December 2005, 22:30
well why would someone want to keep the original resolution of dvd if it's distorted and needs to be resized when played?That's just it, most people don't want to keep the original aspect. The normal way to do it is to size the .AVI so it matches the proper viewing aspect of the video, which is why in my first post in this thread I commented that it's better to do it that way. You can usually find the aspect listed in the DVD details of a movie on IMDB.com so you could, for example, create an .AVI of Star Wars at 720 x 320 to closely match the 2.35:1 aspect of the source.

bananix
5th December 2005, 22:46
That's just it, most people don't want to keep the original aspect. The normal way to do it is to size the .AVI so it matches the proper viewing aspect of the video, which is why in my first post in this thread I commented that it's better to do it that way. You can usually find the aspect listed in the DVD details of a movie on IMDB.com so you could, for example, create an .AVI of Star Wars at 720 x 320 to closely match the 2.35:1 aspect of the source.

but there is reason why dvd uses that resolution (for better to resize to different aspects i figure) so perhaps .mkv or .mp4 can be used similarly so it makes sense or converted back to dvd better possibly if someone want's to make one from it and doesn't have the original...

charleski
5th December 2005, 22:47
well why would someone want to keep the original resolution of dvd if it's distorted and needs to be resized when played? i can only think so it can be made back to dvd format with better result...
Well I don't want to confuse you further, I know aspect ratios can be tricky, and I've been confused over them in the past.

But, as you noticed, resizing to the correct aspect ratio with square pixels before encoding means you lose some resolution. It's possible to avoid this by doing the resizing on playback, it just means that your playback program needs to be able to do this correctly. Video containers like mkv and mp4 allow the correct resizing numbers to be specified in the file, so that when it's played back this will happen automatically.
It's possible to do this with avis in some players as well, but is more complex and requires settings specific to the player. So with avis it's better to encode the video with square pixels as discussed above.
[Perhaps I should point out: when playing video back on a computer you usually always increase its size to fill the screen as computer monitors have greater resolution than that of the encoded file. So it makes sense to preserve the resolution if you can. But getting the right aspect ratio is more important, whatever solution you decide on.]

SeeMoreDigital
5th December 2005, 22:51
.... The normal way to do it is to size the .AVI so it matches the proper viewing aspect of the video, which is why in my first post in this thread I commented that it's better to do it that way.Personally, I don't think it's "much better" that way at all.

If you have a large screen display, you'll notice a distinct lack of definition when re-sizing encodes to say, 720x320 (which by the way would equate to a square pixel ratio of 2.25:1.... which is an odd-ball size).

I much prefer to encode using the original DVD resolution and add the appropriate DAR signalling!

bananix
5th December 2005, 23:29
Personally, I don't think it's "much better" that way at all.

If you have a large screen display, you'll notice a distinct lack of definition when re-sizing encodes to say, 720x320 (which by the way would equate to a square pixel ratio of 2.25:1.... which is an odd-ball size).

I much prefer to encode using the original DVD resolution and add the appropriate DAR signalling!

add DAR signaling? does that mean using .mkv or .mp4 and not divx or xvid? and is it same as displaying 1.5 xvid in 1.333 when it's proper DAR to view?

and can you tell if my speculation in post #19 (http://forum.doom9.org/showpost.php?p=747057&postcount=19) of this tread has any base?

SeeMoreDigital
5th December 2005, 23:39
add DAR signaling? does that mean using .mkv or .mp4 and not divx or xvid? and is it same as displaying 1.5 xvid in 1.333 when it's proper DAR to view?

and can you tell if my speculation in post #19 (http://forum.doom9.org/showpost.php?p=747057&postcount=19) of this tread has any base?You are getting confused....

DivX and XviD are video "codecs", ie: what you use to create MPEG-4 video streams.

.MKV and .MP4 are "containers", ie: these are what you use to place your video (and audio) streams into!


I think you need to start by loooking at the information, here (http://forum.doom9.org/showthread.php?t=73022). And here (http://forum.doom9.org/forumdisplay.php?f=74).

CWR03
6th December 2005, 00:24
If you have a large screen display, you'll notice a distinct lack of definition when re-sizing encodes to say, 720x320 (which by the way would equate to a square pixel ratio of 2.25:1.... which is an odd-ball size).That was just an example - since maintaining the 720 width and using MOD-16 makes a 2.35:1 aspect impossible, I left some of the borders in place to keep the film's proper aspect. Note I said "closely match the 2.35:1." :)

A factor in how you size your images would depend on how you plan to view them. Do you expect to only play them on a PC or a PC-based media center, or do you intend to use a standalone player? Some standalones won't recognize DAR signaling, and many won't play an .mk4 file. Start by deciding what you plan to do with the videos, then decide what will work best for yourself in the long run. Currently I'm using only PC's for playback, so all my backups correspond with the proper viewing aspect of the original material.

On a side note, you've mentioned twice about AVI backups from DVD and later converting those back to DVD. Not only will you be losing quality with the second conversion, you'd be violating the terms of Fair Use because it means you're asking for help with copyrighted material which you do not own (i. e. rental disks).

SeeMoreDigital
6th December 2005, 00:42
That was just an example - since maintaining the 720 width and using MOD-16 makes a 2.35:1 aspect impossible, I left some of the borders in place to keep the film's proper aspect. Note I said "closely match the 2.35:1." :)In that case, 720x304 would provide a better compromise :eek:

A factor in how you size your images would depend on how you plan to view them. Do you expect to only play them on a PC or a PC-based media center, or do you intend to use a standalone player? Some standalones won't recognize DAR signaling, and many won't play an .mk4 file. Start by deciding what you plan to do with the videos, then decide what will work best for yourself in the long run. Currently I'm using only PC's for playback, so all my backups correspond with the proper viewing aspect of the original material.MPEG-4 encodes generated with anamorphic signalling can be displayed perfectly well using a PC based media player and/or in a stand-alone player.

Most new MediaTek chip-set based stand-alone support anamorphic signalling detection in .AVI. And a few Sigma chip-set based players support anamorphic signalling detection in .AVI and .MP4

So it pays to carry out some research before purchasing a stand-alone player

bananix
6th December 2005, 01:16
i read in one thread that DVD's use PAR pixels and DAR flags to correct 720x480 to correct aspect resolution. So can MP4 or MKV containers have video stored indentically with PAR pixels than in DVD's and so better quality?

is this "DAR signaling" same as DAR flags indicating to use 4:3 for example?

i also read this interesting document that PAL-non anamorphic conversion properly to PC displays 1:1 PAR pixels is done wrong in many software because they use wrong values for rectangular to square pixels conversion
http://www.vistavision.de/par_pal_video.html

bananix
6th December 2005, 01:53
this guide tells that the 4:3 aspect ratio is not accurate with any standards.
http://www.uwasa.fi/~f76998/video/conversion/

this is very confusing :)

charleski
6th December 2005, 02:01
i read in one thread that DVD's use PAR pixels and DAR flags to correct 720x480 to correct aspect resolution. So can MP4 or MKV containers have video stored indentically with PAR pixels than in DVD's and so better quality?

is this "DAR signaling" same as DAR flags indicating to use 4:3 for example?Yes.

The player only needs to know one number. Depending on the player and system used, that can either be the aspect ratio of the desired result (called the DAR) or the transformation factor that needs to be applied to the resizing process to produce the desired aspect ratio (called the SAR, rather confusingly). Since DVDs only come in 2 aspect ratios, they signal the DAR. Mp4s and mkvs allow a range of aspect ratios and use SAR, but it's effectively the same.

i also read this interesting document that PAL-non anamorphic conversion properly to PC displays 1:1 PAR pixels is done wrong in many software because they use wrong values for rectangular to square pixels conversion
http://www.vistavision.de/par_pal_video.htmlThey're talking about the problems with correct aspect ratio display on conventional TVs. These are mostly due to the legacy issues involved in supporting analog CRT sets (note they're talking about overscan, which is a non-issue for any properly digital display). There was a battle back before the DVD format was released to dump all this antiquated stuff, but the digital proponents lost.

The fact is that all that matters is what you see on the screen, get out a tape measure and measure the width and height :).

bananix
6th December 2005, 04:16
this guide tells that the 4:3 aspect ratio is not accurate with any standards.
http://www.uwasa.fi/~f76998/video/conversion/

this is very confusing :)

if the guide says that the active image area for the image is 711x486 pixels (1.463 aspect ratio) also that it's the actual area that forms the 4:3 (or anamorphic 16:9) frame. then perhaps in gordian knot i should set Input Pixel Aspect Ratio to 1.463 and perhasp the Input Resolution to 720x540 (3:4) if i use Avisynth command AddBorders(left, top, right, bottom, $000000) to add black around so the source has that 720x540 resolution. then i can make it 720x540 xvid. this way it is the true normal image and doesn't get resized. but probably that is not the proper interpretation and doesn't even apply to dvd's :)

SeeMoreDigital
6th December 2005, 13:32
Ban

Here are two examples (http://81.98.148.105/Uploaded_Files/Doom9_Forum_files/MPEG-4_in_AVI_with_DAR_Signalling.7z) to show how MPEG-4 video stream "anamorphic signalling" can work in AVI.

Please be aware, in order to view these samples correctly via a PC, you may need to install an MPEG-4 direct-show decoder filter capable of detecting "anamorphic signalling".

Please also be aware, in order to view these samples correctly via a stand-alone player, you will need a player capable of detecting "anamorphic signalling".


Cheers

tower42
29th September 2006, 09:01
What do standalone players that can't detect anamorphic signalling do with such files?

Do they refuse to play them, or play them as if the pixels were square?

sterlina
30th September 2006, 07:15
What do standalone players that can't detect anamorphic signalling do with such files?

Do they refuse to play them, or play them as if the pixels were square?
the second is the good one:

This is because by default, AVI containers are expected to have video with square pixels, in every software and hardware player that supports the format.

tower42
18th October 2006, 01:58
The fact that "AVI containers are expected to have video with square pixels in every software and hardware player that supports the format" doesn't necessarily mean that if they don't, they will be interpreted as if they do. It all depends what precisely is meant by "expected".

But I suspect your conclusion is correct, all the same.