Log in

View Full Version : Aspect Ratio Signalling (ARS) Calculation Tool


Pages : [1] 2 3

SeeMoreDigital
8th February 2006, 18:46
In response to all those people who have enquired about how to calculate the required, aspect ratio signalling (aka: PAR, SAR and DAR) values for their "anamorphic" encodes. And how to correct the aspect ratio of their existing "square pixel" encodes.... I have conceived the first version of my ARS Calculator (see link below).

https://i.imgur.com/dshbLYR.png


What's it for?
Essentially, if you have an encode that's displayed at the wrong shape (see the port-hole).... like this say: -




.... The ARS calculator will enable you to work out the required "Aspect Ratio Signalling" (ARS) value needed to correct the shape.... to this say: -




How do I use the ARS Calculator?
First: You need to determine the "Pixel Frame Size (PFS) of your MPEG-4 encode - Preferably without the black mattes.
Second: You need to determine the actual aspect ratio of the movie. Known as the, "Movie Aspect Ratio" (MAR). This can often be found on the back of the DVD cover, or on Amazon.
Third: You enter both these values into the "ARS Calculator" and then press the "Calculate" button to obtain the required "Aspect Ratio Signalling (ARS) value.

Here's an example: -



What do I do next with this ARS value?
You will need to use another application called MPEG4 Modifier (http://www.moitah.net/download/latest/MPEG4Modifier.zip)

First: Feed (drag and drop) your MPEG-4 source into MPEG4 Modifier.
Second: Enter your "ARS value" into the "Custom" boxes (as shown below).
Third: Press the "Save..." button.

Please Note
At the time of writing both applications require Micro$oft's .NET Framework 2.0 (http://msdn.microsoft.com/netframework/downloads/updates/default.aspx) in order to run.

Anyway..... I hope you will find a use for it ;)

Cheers


With Thanks
My profound thanks goes to Moitah. Who was able to turn my design concept into a working reality. Many, many thanks mate ;)

bond
11th February 2006, 11:38
hm shouldnt it for a standard dvd encode (cropped or not) never be necessary to use a custom par?

btw why do you introduce new ar names and not use simply the already known ones, like
pixel frame size -> resolution
movie aspect ratio -> display aspect ratio
aspect ratio signalling -> pixel aspect ratio

SeeMoreDigital
11th February 2006, 12:32
hm shouldnt it for a standard dvd encode (cropped or not) never be necessary to use a custom par?

btw why do you introduce new ar names and not use simply the already known ones, like
pixel frame size -> resolution
movie aspect ratio -> display aspect ratio
aspect ratio signalling -> pixel aspect ratioMany people seem to have pre-defined ideas as to what terms such as DAR and PAR represent.

In the case of MPEG-2 DVD images, the "theatrical" aspect ratio of the source movie (Movie Aspect Ratio) does not necessarily relate to the Display Aspect Ratio of the disc!

The source movie could have a "theatrical" aspect ratio of say, 1.33:1, 1.771, 1.85:1, 2.35:1, 2.40:1 etc, etc. But the DVD disc will have a display aspect ratio of either 1.33:1 (4:3) or 1.77:1 (16:9).

Whether it be PAR, SAR, DAR... at the end of the day they are all forms of "Aspect Ratio Signalling"



Cheers

bond
11th February 2006, 12:33
whats the difference between movie and disc aspect ratio???

SeeMoreDigital
11th February 2006, 12:56
whats the difference between movie and disc aspect ratio???The DVD format contains two levels of display aspect ratio signalling, which are either 4:3 or 16:9.

However, the DAR signalling levels will be different for PAL and NTSC disc's because they offer different resolutions (or pixel frame sizes).

Think of it this way, the image element (which is theory can be any aspect ratio) is laid over a fixed pixel sized background of either 720x576 or 720x480 pixels

bond
11th February 2006, 13:10
so the point of your tool is to allow the user to find a par that is better fitting the movie than the standard dvd 4:3/16:9 pal/ntsc one?

SeeMoreDigital
11th February 2006, 14:01
so the point of your tool is to allow the user to find a par that is better fitting the movie than the standard dvd 4:3/16:9 pal/ntsc one?As you know, a DVD source contains black mattes as well as the "all important" image.

When cropping the black mattes away, it's not always possible to obtain the "theatrical" aspect ratio, within the confines of a "mod16" encode.

For example, an anamorphic (16:9) widescreen NTSC DVD with a 2.35:1 movie on it.... like this one: -

http://i1.tinypic.com/nlqvr8.jpg

... "should" mathematically contain an image of 720x363 (give or take a few vertical) pixels... like this: -

http://i1.tinypic.com/nlqwr9.jpg

However, the nearest "mod16" pixel calculation is 720x368.... so it's five vertical pixels out.

Admittedly five vertical pixels is not very much at all.... but in reality, the movie aspect ratio quoted on the back of the DVD cover can often be quite a bit out. And in the case of some DVD's.... miles out. Plus the boundary between the matte and the image could be really messy (noisy)!

Here's what I do first
Before generating an "cropped and resized" encode, I often find it useful to establish the actual aspect ratio of the "image" element on the disc. Using the following method: -


Play the DVD source in VLC (software media) player
Navigate to a nice light section of the movie, and select "Snapshot" via the "Video" tab.
Paste/open the captured image into a reasonable quality imaging software application.
Use the "auto cropping" tool in your imaging software application.
Save the cropped image and make a note of it's "pixel frame size" (PFS)
Grab a calculator and divide the pixel image frame "width" by the pixel image frame "height".

The resulting calculation will be "the" Movie Aspect Ratio (MAR). Which you can enter into the ARS Calculator ;)


Cheers

bond
11th February 2006, 14:20
thats obvious but doesnt answer my question :confused:

SeeMoreDigital
11th February 2006, 14:47
thats obvious but doesnt answer my question :confused:I think it does....

As I said, when you crop away the black mattes, it's not always possible for the encoded image to fall within the confines of a "mod16" resolution...

I've have also seen (so I'm sure you must have seen them too) many cropped and resized "square pixel" samples provided by forum users, that have been generated at resolutions that bear no relation to the actual aspect ratio of the movie.

By aplying the correct level of aspect ratio signalling you can correct this.


Cheers

bond
11th February 2006, 15:22
so the point of your tool is to allow the user to find a par that is better fitting the movie than the standard dvd 4:3/16:9 pal/ntsc one?yes or no? ;)

SeeMoreDigital
11th February 2006, 15:37
so the point of your tool is to allow the user to find a par that is better fitting the movie than the standard dvd 4:3/16:9 pal/ntsc one?
yes or no? ;)I find your question is too general... Can you be more specific!

mod
11th February 2006, 15:46
Ok, I think it's time for someone else to post! :D
If I've understood, the idea is simple: crop the black, see what's the AR of the sample, calculate it as a ratio between 2 integers. Stop. This because the 16/9 or 4/3 AR isn't really observed in every DVD. Is this right?

bond
11th February 2006, 15:59
well from my point of view the thing is very easy:
if you have a 4:3 pal dvd tick 4:3 pal in pixel aspect ratio of mpeg4modifier, if you have a 16:9 ntsc dvd tick 16:9 ntsc in mpeg4modifier aso (doesnt matter if the pic is cropped or not)

SeeMoreDigital
11th February 2006, 16:17
...doesnt matter if the pic is cropped or not)Depending on whether you select from MPEG4 Modifiers "Pixel AR" options or "Display AR" options.... Actually, yes it does!

Backflip
11th February 2006, 16:23
Hey, I've got an anmorphic encode of Flight Of The Phoenix. Just for confirmation which out of these would be correct (i.e. - give the AR closest to 0% error):

1:1 option in GKnot chosen - cropped down to 720x432 (if I switch to square or PAL anamorphic (16:9) option is says 2.370 is the AR) Have tried:

1. Giving PAR of 2.35:1. On playback I get 1016x432 (using MPlayer)
2. Giving PAL (16:9). On playback I get 1048x432.
3. Calculating 720 x 432 by MAR (2.35:1) using ARS (141:100). On playback I get 1016x432.

Should I not just be using the DAR GKnot gives? So 720 x 432 by 2.37:1 (155:109) or something?

SeeMoreDigital
11th February 2006, 16:34
Should I not just be using the DAR GKnot gives? So 720 x 432 by 2.37:1 (155:109) or something?Yes... 720/432 would equate to 2.37:1, so when you add aspect ratio signalling of 155:109, your encode will be reported as being 1023x432 pixels upon playback :)

bond
11th February 2006, 16:40
Depending on whether you select from MPEG4 Modifiers "Pixel AR" options or "Display AR" options.... Actually, yes it does!when talking about pixel aspect ratio (as i did) it doesnt matter whether the picture is cropped or not

so as you propose to use the par option of mpeg4modifier with your tool's output i wondered about what it does?
maybe you can clearify things by writing how exactly your tool calculates the "ARS"

SeeMoreDigital
11th February 2006, 21:20
Given that "a picture speaks a thousand words"

Here are what the "corrected" captured images look like using VLC player: -

00 - The 720x576 DVD source
http://img152.imageshack.us/img152/33/00dvdsourceascapturedinvlcplay.th.jpg (http://img152.imageshack.us/my.php?image=00dvdsourceascapturedinvlcplay.jpg)

01 - The 720x432 encode with ARS @ 155.109
http://img125.imageshack.us/img125/7501/01withars155109invlcplayer3zb.th.jpg (http://img125.imageshack.us/my.php?image=01withars155109invlcplayer3zb.jpg)

02 - The 720x432 encode with PAR @ 16.9 PAL
http://img152.imageshack.us/img152/816/02withpar169palinvlcplayer4uf.th.jpg (http://img152.imageshack.us/my.php?image=02withpar169palinvlcplayer4uf.jpg)

03 - The 720x432 encode with DAR @ 2.35.1
http://img153.imageshack.us/img153/4449/03withdar2351invlcplayer4ps.th.jpg (http://img153.imageshack.us/my.php?image=03withdar2351invlcplayer4ps.jpg)


But just to confirm that no cheating is going on, here are what the "corrected" images look like using Media Player Classic when captured using "Print Screen": -

00 -The 720x576 DVD source
http://img149.imageshack.us/img149/303/00dvdsourceascapturedinmpc2sk.th.jpg (http://img149.imageshack.us/my.php?image=00dvdsourceascapturedinmpc2sk.jpg)

01 - The 720x432 encode with ARS @ 155.109
http://img149.imageshack.us/img149/5319/01withars155109inmpc7lu.th.jpg (http://img149.imageshack.us/my.php?image=01withars155109inmpc7lu.jpg)

02 - The 720x432 encode with PAR @ 16.9 PAL
http://img142.imageshack.us/img142/1889/02withpar169palinmpc6sl.th.jpg (http://img142.imageshack.us/my.php?image=02withpar169palinmpc6sl.jpg)

03 - The 720x432 encode with DAR @ 2.35.1
http://img154.imageshack.us/img154/2933/03withdar2351inmpc0yu.th.jpg (http://img154.imageshack.us/my.php?image=03withdar2351inmpc0yu.jpg)


Now, copy, rename and paste the first set of four images into one folder and the second set of four images into another folder. Then quickly flick thru the images in "Windows Picture and Fax Viewer". And then tell me which of the encoded images more closely matches the aspect ratio of the source?!


Cheers

EDIT: Images uploaded to ImageShack (which was down yesterday)

Backflip
12th February 2006, 06:00
The 720x432 encode with ARS @ 155.109 looks closest for me.

Interesting one though, I did a rip myself of Sith a while ago and only got (1:1) - 704x416 (0.0% AR error, w/ AR indicated as 1.692) or (PAL anamorphic (16:9) w/ AR indicated as 2.407) - 704x288. This was with all black and messy edges cropped out I think.

ricardo.santos
12th February 2006, 13:27
Hi everyone!

Interesting thread, like SeeMoreDigital said: Many people seem to have pre-defined ideas as to what terms such as DAR and PAR represent.

@SeeMoreDigital


Here's what I do first
Before generating an "cropped and resized" encode, I often find it useful to establish the actual aspect ratio of the "image" element on the disc. Using the following method: -

Play the DVD source in VLC (software media) player
Navigate to a nice light section of the movie, and select "Snapshot" via the "Video" tab.
Paste/open the captured image into a reasonable quality imaging software application.
Use the "auto cropping" tool in your imaging software application.
Save the cropped image and make a note of it's "pixel frame size" (PFS)
Grab a calculator and divide the pixel image frame "width" by the pixel image frame "height".
The resulting calculation will be "the" Movie Aspect Ratio (MAR). Which you can enter into the ARS Calculator


I think theres an easier and less complicated way of finding out the movie aspect ratio. I use a tool called ASPECT (http://aspect.fre3.com/) for that,just manually crop the picture and it will tell you the correct aspect ratio of the movie on the dvd and the which resolutions you should use on your conversion to divx/xvid.

http://img101.imageshack.us/img101/7058/aspect1kq.jpg

Just thought of sharing this as i find this tool extremely usefull when finding out the aspect of the movie and which resolution to use on my divx conversion.

Ricardo

Ps: Another neat function is that it can make an avisynth script based on the cropping made manually, example:

1- rip your "main movie"from your dvd to your Pc and use Dgindex to creat a d2v script
2- open aspect, click on the Aspect ratio dropdown menu and select "advanced"
2- click on open and select "d2v project" and delect the d2v script, manually crop and click on ok.
3-back on main menu select autosize and it wiil find the best resolution, click on "save" and it wiil produce an avisynth script based on the cropping you made that can be "fed" on to virtualdub to convert to divx/xvid without going in to the filters section, just select the codec and you´re away.



calculate frame size according given aspect ratio
evaluate aspect errors
check frame size for compliance with codec (i.e. ensures that frame height/width is multiple of 4, 16, etc.)
calculate aspect ratio according given frame size
calculate avi video bitrate/size and bits/pixel value
automatically calculate frame size
evaluate interleave overhead for legacy and opendml avis
adjust aspect ratio for cropped movies
access unencrypted vob, mpeg2, d2v, png and bmp files
retrieve video resolution, aspect ratio, fps and duration from supported video files
show frame preview
generate avisynth scripts out of d2v files .

Enjoy, its freeware

SeeMoreDigital
12th February 2006, 14:40
Thanks for that ricardo.....

I like that it's able to physically introduce a visible (red) matte over the existing black matte, while providing a "Target AR" at the same time... That's very useful :)

It's a shame you have to navigate thru' so many options (ie: the "Aspect Ratio" down-arrow, the "Advanced..." option and then click on the "Open" button) to bring up the "Video Window": -

http://img155.imageshack.us/img155/6717/snap22pk.jpg


It would have been much easier to have a tool which immediately opens a "video window" and allows you to drag and drop different types of video formats


Cheers

ricardo.santos
12th February 2006, 15:31
Thanks for that ricardo.....

I like that it's able to physically introduce a visible (red) matte over the existing black matte, while providing a "Target AR" at the same time... That's very useful :)


very usefull indeed, altough the videi conversion program i use (avi.Net) gets the Targer AR spot on every time i always check one vob with this tool just to make sure the resolution choosen is ok.


It's a shame you have to navigate thru' so many options (ie: the "Aspect Ratio" down-arrow, the "Advanced..." option and then click on the "Open" button) to bring up the "Video Window": , It would have been much easier to have a tool which immediately opens a "video window" and allows you to drag and drop different types of video formats

yes i agree but i got so used to it it doesnt really bother me anymore and because its for free we cant really complain about it, but you´re right it could do with a "makeover".

kurt
12th February 2006, 20:22
Could someone plz approve ARS Calculator? I'd like to try this out :)

__________________

thx!

yaz
13th February 2006, 11:15
It would have been much easier to have a tool which immediately opens a "video window" and allows you to drag and drop different types of video formats...gordian knot does it. (and much more) it's worth to give it a try. i use it for crop/resize and haven't found any problem. all the ar distortion i've experienced came from the mod32/mod16/... rounding.

the bests
y

ps. i'm w/bond here. he's right (as usual). cropping doesn't affect anything if par is used for resizing. of course, badly tailored dvd-s are of different kinds. (i have some of them )

SeeMoreDigital
18th February 2006, 21:08
ps. i'm w/bond here. he's right (as usual). cropping doesn't affect anything if par is used for resizing. of course, badly tailored dvd-s are of different kinds. (i have some of them )But as I've proved in the images on the previous page... it does!

The objective is to find the correct "aspect ratio signalling" (PAR) value...


Cheers

Wilbert
19th February 2006, 00:57
But as I've proved in the images on the previous page... it does!
No, it does not. Using the usual definition of PAR or SAR, they don't change after cropping.

Perhaps i should reiterate the question of Bond which you refused to answer:
maybe you can clearify things by writing how exactly your tool calculates the "ARS"
I hope you will answer this, because i'm interested too. But if this quantity changes after cropping, it is certainly not equivalent with the standard definition of PAR (or SAR).

SeeMoreDigital
19th February 2006, 01:25
Actually Bond did make another response, confirming my obsevations but removed it before I could respond....

But before answering the question in more detail I must enquire as to whether you accept that software media players display MPEG-2 DVD's in accordance to the ITU specs, or not.

I would respectfully ask you to play a DVD in you favourite software DVD player and make a full screen grab of what your display sees.... because what your display sees, is what you see. You could even play a DVD in VLC player and capture what it see's!

Then please post these images here and we will work out their aspect ratios.

It would also be helpful if you elevated the brightness level in your media player before making a full screen grab, so we can work out where the DVD matte meets the black of your 4:3 monitor....

Like this say: -

http://img137.imageshack.us/img137/4458/screengrab010fs.th.jpg (http://img137.imageshack.us/my.php?image=screengrab010fs.jpg)


Cheers

Wilbert
19th February 2006, 02:30
But before answering the question in more detail I must enquire as to whether you accept that software media players display MPEG-2 DVD's in accordance to the ITU specs, or not.
You already showed me that software dvd players are not in accordance with the ITU specs. Ie, 720x576 is resized to 768x576 (or a scaling of it), etc ... I don't see what this has to do with PAR though.

Ok, i will give you an example. Imagine a screenshot from a dvd (720x576 with DAR 16x9), and the actual picture (without black borders) is 720x432.

SeeMoreDigital
19th February 2006, 11:19
You already showed me that software dvd players are not in accordance with the ITU specs. Ie, 720x576 is resized to 768x576 (or a scaling of it), etc ... I don't see what this has to do with PAR though.Thanks.

Ok, i will give you an example. Imagine a screenshot from a dvd (720x576 with DAR 16x9), and the actual picture (without black borders) is 720x432.Only if the "movies aspect ratio" was 2.37:1.... which it just happened to be in the StarWars2 DVD source!

Wilbert
19th February 2006, 13:28
Only if the "movies aspect ratio" was 2.37:1.... which it just happened to be in the StarWars2 DVD source!
Not sure want you want from me here. The real aspect ratio is not stored in the header of the mpeg-2 stream. So, you shouldn't need that to calculate the PAR, your ARS, etc ... (and yes 1024/432=2.37 ...)

SeeMoreDigital
19th February 2006, 14:05
Well... I must admit I was not sure what you were intending to say with your comment: -

"Ok, i will give you an example. Imagine a screenshot from a dvd (720x576 with DAR 16x9), and the actual picture (without black borders) is 720x432"

Are you referring to an "all image" 720x576 DVD source or an "image with matte" 720x576 DVD source.

Are you referring to taking a screen-shot from a 4:3 monitor or a 16:9 monitor?

Wilbert
19th February 2006, 14:21
Are you referring to an "all image" 720x576 DVD source or an "image with matte" 720x576 DVD source.
The latter. The image without matte is 720x432. At least I assume that matte is the same as black borders?

Are you referring to taking a screen-shot from a 4:3 monitor or a 16:9 monitor?
4:3 (screen area: 1024x768)

chilledoutuk
19th February 2006, 14:37
What i think is causing the confusion here is the inherant inacuracy of the PAR values used used in the ITU standard.

You see if you take an PAL 16:9 dvd with a standard resolution of 720x576 resizing using the PAR specified by ITU would give you a resolution of 1047.27x576
But if you use the ITU DAR of 16:9 then you get 1024x576.

The Real question is what did the makers of the dvd intend to be used for the resizing of there video stream PAR or DAR.
I know that in mpeg2 streams DAR is normally signalled but what i do not know is what method your average dvd player use to resize video do they take the aspect flag and simply resize to that aspect or do they take that flag and resize using the associated ITU PAR.

Seemoredigital has noticed a discrepancy in the ITU standard as have I. in there effort to simplfy the PAR standards they have created resizing methods that apear to contradict each other.

SeeMoreDigital
19th February 2006, 22:17
The latter. The image without matte is 720x432. At least I assume that matte is the same as black borders?The height of the black mattes will vary because they are there to determine the movies aspect ratio.

As we know, the movie aspect ratio, as stated on the back of the DVD cover, is not always an exact representation of the movie aspect ratio, as displayed in your media player.

In such instances it is possible to determine the movie aspect ratio by playing the DVD and taking a screen-shot.... The resolution of the screen (in pixels) is not that important. What is important is the ratio of image after the black mattes have been cropped away.

Anyway.... some of you might find this PAL 720x576 16:9 Anamorhic Pixel Postioner (http://81.98.148.105/Uploaded_Files/Doom9_Forum_files/PAL_720x576_16.9_Pixel_Postioner.7z) a useful indicator as to where the exact movie aspect ratio positions are ;)


Cheers

Wilbert
19th February 2006, 23:48
Please stop playing games, and just answer my questions. If you don't want to answer them that's fine too, but then say so.
The height of the black mattes will vary because they are there to determine the movies aspect ratio.

As we know, the movie aspect ratio, as stated on the back of the DVD cover, is not always an exact representation of the movie aspect ratio, as displayed in your media player.
Yes i know that. I'm pretty sure you know that i know that too. I also know how to use DGIndex or VDub to determine the amount of black borders. Like i said the image without black borders is 720x432.

Now, tell me (1) how cropping affects the PAR of a stream, and (2) how your ARS is defined.

SeeMoreDigital
20th February 2006, 11:23
Please stop playing games, and just answer my questions. If you don't want to answer them that's fine too, but then say so.I am trying to answer your question as best I can

Yes i know that. I'm pretty sure you know that i know that too. I also know how to use DGIndex or VDub to determine the amount of black borders. Like i said the image without black borders is 720x432.Agreed... the "StarWars2" DVD images without black borders are 720x432... But that's just one example... which just happens to fit very nicely into a "mod16" cropping value.

But when aspect ratio signalling is added to correct the cropped 720x432 image to 1024x432, people are assuming they should be adding either "PAL 16:9 PAR" (16:11) or "2.35:1 DAR" (141:100), when in actual fact a custom PAR value of 155:109 is more accurate.


Now, tell me (1) how cropping affects the PAR of a stream, and (2) how your ARS is defined.In the case of the above 720x432 example...

If you add "PAL 16:9 PAR" (or 16:11) to the stream, during playback your media player will display it at 1047x432 pixels

If you add "2.35:1 DAR" (or 141:100) to the stream, during playback your media player will display it at 1015x432 pixels

However, if you a custom PAR value of 155:109 to the stream, during playback your media player will display it at 1023x432 pixels.... which is much closer to the 720->1024x432 target source.

But the above mentioned is just one example.....

If you still feel I have not answered your question in a way that's helpful to you... why not send me some short 720x480/576 MPEG-2 sources with weird movie aspect ratios and I will, re-encode them to cropped/resized MPEG-4 - with the correct custom PAR value.


Cheers

squid_80
20th February 2006, 12:31
But when aspect ratio signalling is added to correct the cropped 720x432 image to 1024x432, people are assuming they should be adding either "PAL 16:9 PAR" (16:11) or "2.35:1 DAR" (141:100), when in actual fact a custom PAR value of 155:109 is more accurate.
Why go with 155:109? Using your method, PAL 16:9 PAR is 64:45.

SeeMoreDigital
20th February 2006, 12:48
Why go with 155:109? Using your method, PAL 16:9 PAR is 64:45.
EDITEDED FOR ACCURACY

It depends on the resolution of the source....

PAL 16:9 PAR is 64:45, if the resolution is 720x576. However, it can also be 16:11 if the resolution is 704x576

In this particular instance and because the width of the source has 720 pixels, a "custom" PAR value of 64:45 will correct the image - which is neither "16:9 PAR" or "16:9 DAR"


Cheers

squid_80
20th February 2006, 13:08
In this particular instance, adding 64:45 would accurately correct the image.

So why not use it instead of 155:109?

What I was trying to get at is that the standard PAR values:
4:3 PAL (12:11)
16:9 PAL (16:11)
4:3 NTSC (10:11)
16:9 NTSC (40:33)
would all give correct display sizes (according to you) if the source image were 704 pixels wide instead of 720. So just come up with new standard PAR values to suit a 720 pixel wide source:
4:3 PAL (16:15)
16:9 PAL (64:45)
4:3 NTSC (8:9)
16:9 NTSC (32:27)

and use those all the time. No need to calculate them, just pick the one that matches the source.

SeeMoreDigital
20th February 2006, 13:44
So why not use it instead of 155:109?

What I was trying to get at is that the standard PAR values:
4:3 PAL (12:11)
16:9 PAL (16:11)
4:3 NTSC (10:11)
16:9 NTSC (40:33)
would all give correct display sizes (according to you) if the source image were 704 pixels wide instead of 720. So just come up with new standard PAR values to suit a 720 pixel wide source:
4:3 PAL (16:15)
16:9 PAL (64:45)
4:3 NTSC (8:9)
16:9 NTSC (32:27)

and use those all the time. No need to calculate them, just pick the one that matches the source.That maybe okay if you've generated your encodes at 720 pixels wide.... but what if you encoded at say, at 688x304 and then discovered that aspect ratio did not quite look right. What custom value would you use... And, more importantly, how would you go about calculating it?


Cheers

chilledoutuk
20th February 2006, 14:46
That maybe okay if you've generated your encodes at 720 pixels wide.... but what if you encoded at say, at 688x304 and then discovered that aspect ratio did not quite look right. What custom value would you use... And, more importantly, how would you go about calculating it?

Its a really half assed encoding to resize a video and use aspect ratio signalling to correct misstakes.

Therefore if you want to resize then resize to square pixel aspects if you want to keep the orginal res pixel for pixel then just crop and set the correct PAR.

If you make a mistake rencode.

kotrtim
20th February 2006, 15:08
a nice tool, of course I will use it with the aid gknot

loaded a video (NTSC 16:9) with gknot, the ITU display aspect ratio is 1.823:1 (I would like to know the fraction if anyone knows?)

cropped black bars and i got 720x358, now the new frame aspect ratio is 22/9 as reported by gknot
resized the video to 720x368 to comply mod16

This is what I keyed in
PFS = 720 x 368
MAR = 22 : 9
calculate....
ARS = 5:4

The value is slightly different if I calculate it with my casio calculator
ARS = 506:405

5/4 = 1.25
506/405 = 1.24938....

yeah, I know the difference is small, does your ars calc tool round off values somewhere in the middle of the calculation?

Its a really half assed encoding to resize a video and use aspect ratio signalling to correct misstakes.

Initially, I though about that too, but as you can see, for this case, I cropped the video to 720x358... 358 is not divisible by 16, but I don't really want to resize the video, I would resize it to mod16 which is nearest to 358, i.e. 368

SeeMoreDigital
20th February 2006, 16:22
Its a really half assed encoding to resize a video and use aspect ratio signalling to correct misstakes.Never-the-less... people do generate encodes with all sorts of wierd and wonderful resolutions.

Personally (like you) I prefer to generate at full DVD resolutions and often crop the black mattes away!


Hi kotrtim,

If GK reports the MAR as being 1.823:1, try encoding with either of the following values: -

http://img50.imageshack.us/img50/603/kotrimars9rk.png


EDIT: But just to be sure, I would not mind seeing an "uncorrected" still image from your source.


Cheers

Wilbert
20th February 2006, 23:18
So just come up with new standard PAR values to suit a 720 pixel wide source:
4:3 PAL (16:15)
16:9 PAL (64:45)
4:3 NTSC (8:9)
16:9 NTSC (32:27)

and use those all the time. No need to calculate them, just pick the one that matches the source.
Sounds fine too me. Corresponding math:

PAL = 720x576
DAR = 16x9 (4x3 case is similar)
without mattes: 720x(576-h)
MAR = m
PAR = 1024/720 = 64/45 (is this the same as your ARS, SMD ?)

Thus, the vertical size is not used when determing the PAR. Hence the PAR doesn't change when your crop (change "h").

SMD, in what way does the PAR changes?

That maybe okay if you've generated your encodes at 720 pixels wide.... but what if you encoded at say, at 688x304 and then discovered that aspect ratio did not quite look right. What custom value would you use... And, more importantly, how would you go about calculating it?
You still can have a custom box, right?

PAL 16:9 PAR is not 64:45, it's 16:11. PAL 16:9 DAR is 64:45.
No, it's not. You know that DAR has a predefined meaning, being either 4x3, 16x9, 1x1 or 2.21x1. If you want to change that fine, but call it DAR_SMD or somethink like that.

I thought that all those numbers in your calculator (4:3, 16:9, 1.85:1, etc ...) are all MARs. But i assume that the first two, are actually DARs or not? I don't have .net2 installed, so i can't play with it. Suppose i have a dvd source with DAR 4x3, and I choose either MAR=1.85 or MAR=2.35 or MAR=anything_else, they should result in the same ARS, no?

kotrtim
21st February 2006, 02:26
EDIT: But just to be sure, I would not mind seeing an "uncorrected" still image from your source.

It's exorcism of emily rose, if I can upload the pictures anywhere... I don't have a server.

SeeMoreDigital, you haven't answered my question about the slight round off in your calculator, the difference of 5:4 (ARS calc) and 506:405 (accurate casio calc)... Is it possible to make your calculator even more accurate without rounding values...

kurt
21st February 2006, 02:34
It's exorcism of emily rose, if I can upload the pictures anywhere... I don't have a server.

You could use a free hosting service like http://www.imageshack.us/

kotrtim
21st February 2006, 03:40
Thus, the vertical size is not used when determing the PAR. Hence the PAR doesn't change when your crop (change "h").
The PAR doesn't change when you crop but when you slightly resize it to mod16
you need to recalculate instead using PAR 32:27 for NTSC

the top one uses a recalculated PAR 506:405
the bottom one uses the predefined PAR 32:27 for NTSC 16:9 (720x480)

http://img148.imageshack.us/img148/3457/compare9kq.jpg

ORIGINAL 720x480 (without aspect correction)
http://img81.imageshack.us/img81/3925/ori6cu.jpg

Cropped, resized, PAR 506:405 (its the same as the one vertically rotated above)
http://img81.imageshack.us/img81/2457/7262974iw.jpg

SeeMoreDigital
21st February 2006, 11:28
Hi kotrtim,

Thanks for your post... After checking at the resolution of your "ORIGINAL 720x480 (without aspect correction)" it appears to be 722x470 pixels and not 720x480...

If you provide me with an uncorrected 720x480 still capture, I will report back?

kotrtim
21st February 2006, 14:26
I didn't really capture it, I just use vdub to open the avs and print screen, paste in to Windows Paint, maybe I did not cut it properly....
I think its fine?

SeeMoreDigital
21st February 2006, 16:03
I didn't really capture it, I just use vdub to open the avs and print screen, paste in to Windows Paint, maybe I did not cut it properly....
I think its fine?Sorry it's not.... I will need an un-touched snap-shot taken from the 720x480 source ;)

Media Player Classic and many other media players offer a "save image" or "snap-shot" facility!

Once I have this image I will be able to use it as an example to explain the PAR (ARS) calculation process.


Cheers