View Full Version : Aspect Ratio Signalling (ARS) Calculation Tool
SeeMoreDigital
8th February 2006, 17: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).
http://img233.imageshack.us/img233/9139/arscalculator9va.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: -
http://img214.imageshack.us/img214/6261/00640x304at112mg.jpg
.... The ARS calculator will enable you to work out the required "Aspect Ratio Signalling" (ARS) value needed to correct the shape.... to this say: -
http://img214.imageshack.us/img214/9744/01640x304with2933ars4js.jpg
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: -
http://img458.imageshack.us/img458/1087/arscalculator0yb.png
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.
Here's an example: -
http://img147.imageshack.us/img147/3870/mpeg4modifier3sx.png
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, 10: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, 11: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, 11:33
whats the difference between movie and disc aspect ratio???
SeeMoreDigital
11th February 2006, 11: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, 12: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, 13: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, 13:20
thats obvious but doesnt answer my question :confused:
SeeMoreDigital
11th February 2006, 13: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, 14: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, 14: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, 14: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, 14: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, 15: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, 15: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, 15: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, 15: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, 20: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, 05: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, 12: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, 13: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, 14: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, 19:22
Could someone plz approve ARS Calculator? I'd like to try this out :)
__________________
thx!
yaz
13th February 2006, 10: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, 20: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
18th February 2006, 23: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, 00: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, 01: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, 10: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, 12: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, 13: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, 13: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, 13: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, 21: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, 22: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, 10: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, 11: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, 11: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, 12: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, 12: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, 13: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, 14: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, 15: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, 22: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, 01: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, 01: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, 02: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, 10: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, 13: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, 15: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
kotrtim
22nd February 2006, 14:06
I use vdub because vdub can tell me the frame number,
Can MPC capture the exact frame?
SeeMoreDigital
22nd February 2006, 14:50
Sadly no... But you can navigate to close to where you want to and then use the step forward button... this is what I do!
But for my purposes I'm just trying to establish the actual aspect ratio of the movie.
Cheers
kotrtim
23rd February 2006, 03:05
http://img161.imageshack.us/img161/6871/ori4kw.jpg
http://img163.imageshack.us/img163/5685/7203688md.jpg
http://img391.imageshack.us/img391/1714/7202945kp.jpg
the image should self explain
SeeMoreDigital
23rd February 2006, 08:58
Hi Kotrtim,
May I as how you captured the 720x480 (top) still from your source?
It's quite unusual as it posseses a two pixel wide grey border running along the entire left side and a one pixel high grey border running along the top... Plus the top and bottom mattes are nowhere near equal in size!
Please PM me if you need to?
Cheers
jv_guano
28th February 2006, 11:32
Please Note
At the time of writing both applications require Micro$oft's .NET Framework (version 2) in order to run.
I downloaded your ARS calculator, (and also the mpeg4 modifier) but yours doesn't work..it says that I shoulda have one of those versions of net framevork 2.0.50727
so i went here (http://msdn.microsoft.com/netframework/downloads/updates/default.aspx#.NET%20Compact%20Framework%202.0%20Downloads) and downloaded the vers 2.0 ..but still don't work.. :( i also reboot PC after installing framework, and still don't work...
instead MPEG4 modifier works...
any hints?
(hope not to be too much OT...:confused: )
Doom9
28th February 2006, 11:44
your link goes to the compact framework downloads.. they are useful for PDAs but not regular PCs. You need this redistributable: http://www.microsoft.com/downloads/details.aspx?FamilyID=0856eacb-4362-4b0d-8edd-aab15c5e04f5&DisplayLang=en
jv_guano
28th February 2006, 12:30
your link goes to the compact framework downloads.. they are useful for PDAs but not regular PCs. You need this redistributable: http://www.microsoft.com/downloads/details.aspx?FamilyID=0856eacb-4362-4b0d-8edd-aab15c5e04f5&DisplayLang=en
thanx a lot, it works!
lots of questions are coming soon! :D
-------
so, How do I use the ARS Calculator?
First: You need to determine the "Pixel Frame Size (PFS) of your MPEG-4 encode.
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.
1)the pixel frame size is the size of a snapshot of the movie? with or without the black mattes?
I really have to say that I have some doubts..also beacause I read somewhere that pixel of movies for tv and pixel of PC images are not the same (the first, rectangular, the second, square)
(what i mean is what you can see in this post (http://forum.doom9.org/showthread.php?p=784256#post784256). the res of the image is not the res of the video...)
Infact, if I snapshot the movie I'm analyzing, I've an image (without black mattes) of 1365*576, instead, loading it in DVDPAtcher, it says 720*576 .. :confused:
and that's all by now... :)
SeeMoreDigital
28th February 2006, 16:57
1)the pixel frame size is the size of a snapshot of the movie? with or without the black mattes?It's easier to correct the aspect ratio of an MPEG-4 source if it has no mattes. But it depends on how you've encoded it.
After reading some of the e-mails and PM's I've received it's become quite clear, some of you have generated some very peculiar shaped encodes....
Indeed, when generating "cropped and resized" encodes, some of you have elected to keep tiny bits of the black mattes in..... very strange!
I really have to say that I have some doubts..also beacause I read somewhere that pixel of movies for tv and pixel of PC images are not the same (the first, rectangular, the second, square)I think you may be confusing the pixel frame size of say, a typical DVD source "before image correction is applied" and the pixel frame size of that same DVD source "after image correction is applied".
In-fact, if I snapshot the movie I'm analyzing, I've an image (without black mattes) of 1365*576, instead, loading it in DVDPAtcher, it says 720*576 .. :confused:Do you by any chance have a 16:9 shaped PC monitor set to a resolution of 1365x768 (or there-abouts)?
Cheers
jv_guano
1st March 2006, 20:10
Do you by any chance have a 16:9 shaped PC monitor set to a resolution of 1365x768 (or there-abouts)?
Cheers
No, I have a 17" LCD monitor, 1280*1024 res...
by the way, I really appreciated your help, many thanks!
But I've just found a page in my own language (italian, here (http://www.benis.it/dvd/aspect/aspect.htm) if someone's interested) and really hope to solve all of my doubts!
Many thanks again!;)
SeeMoreDigital
1st March 2006, 20:18
No, I have a 17" LCD monitor, 1280*1024 res...Now I'm confussed...
I don't know how you were able to snapshot an image of 1365x576 pixels, when your monitor is set to a resolution of 1280x1024 :eek:
Cheers
jv_guano
1st March 2006, 20:19
i send ya a screenshots, wait a bit! :)
http://img431.imageshack.us/img431/5636/vlcsnap760759yt.th.png (http://img431.imageshack.us/my.php?image=vlcsnap760759yt.png)
SeeMoreDigital
1st March 2006, 21:19
Out of interest....
Can you explain, what player you used, exactly how you captured that image and what the source file is?
Cheers
jv_guano
1st March 2006, 21:25
really, maybe I'm wasting your time!
I thought this video would come out too wide on my tv. But, yersterday night, after reauthoring it and burnin' it, I must say (and I really cannot explain to myself "why?" ) this video looks nice and proportionated! ;)
however, I use Vlc , and used the function snapshots in vlc. the source file is a remuxed vob file (I added subtitles)
instead, now I'm going to (try) cutting some video in 4:3 format, to displat and fit well on my 16:9 TV...Those vids have black mattes on top&bottom, so, let's give a try! ;)
(still dvd, and I'm not really so convinced on what sw to use.. :confused: I see mpeg4modifier can only handle *avi files... )
SeeMoreDigital
1st March 2006, 22:08
The aspect ratio of your encode does not look right to me....
I'm just guessing but I'm sure it should look more like this: -
http://img374.imageshack.us/img374/3884/1024x5766cd.th.jpg (http://img374.imageshack.us/my.php?image=1024x5766cd.jpg)
Cheers
jv_guano
2nd March 2006, 10:42
I know that is really not right, but, as I say, burning it on a dvd, it'll display correct on my TV .. :confused:
(don't know why, but those aspect ratios are really hurting myself, and sometimes I stop myself to try to understand... :) )
We have entered the 4th page.. so after all this posting I have a question.
My backup method is this, I just want to know if in your opinion the result is a correct aspect ratio of the picture when it's displayed on a 4:3 tv:
1 - make d2v file with DgIndex
2 - open it with Aspect
3 - crop the black I don't want (all cropped selections multiple of 2): Aspect returns the real AR of the image, and the nearest ratios with x16 dimensions.
4 - set in my script with all the other stuff the same cropping of Aspect and the dimensions I want choosen between the suggested ones.
5 - encode with square pixel.
Sorry for all this "pointing" but I've been using this method for a lot of time and I've always seen correct pictures imho, so I'm really not able to get the point..
If I'm wrong in something, just teach me. :)
SeeMoreDigital
2nd March 2006, 11:14
5 - encode with square pixel.
Sorry for all this "pointing" but I've been using this method for a lot of time and I've always seen correct pictures imho, so I'm really not able to get the point..
If I'm wrong in something, just teach me. :)If you're generating encodes with square pixels and not adding aspect ratio signalling to distort the shape (ratio) of those pixels, then no you will "not able to get the point..."
Cheers
SeeMoreDigital
2nd March 2006, 11:17
I know that is really not right, but, as I say, burning it on a dvd, it'll display correct on my TV .. :confused: What make and model of stand-alone player are you using to connect to your 16:9 TV?
berrinam
2nd March 2006, 11:33
The figure I read for errors in AR is around 4%, meaning that most people won't notice an aspect error of less than 4% during playback.
Obviously, it is more obvious if you are going to look at screenshots, but what is the point of doing those tests if you can't notice it in playback? Furthermore, seeing whether the AR looks 'right' should be done as an absolute thing, because most people will only watch one copy of a film at a time. IMO, finding the 'right' solution even if you can only tell it by examining screenshots is the super-purist option and doesn't make sense to me from a practical viewpoint.
It actually turns out that a 4% error is quite large, so there is a lot of tolerance in these calculations.
For example:
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.
Let's find the difference between the two extremes: 1016x432 and 1084x432:
1048 1016 1048
---- / ---- = ---- = 1.031
432 432 1016
So, even in this seemingly large range, there is only a variation of 3%. I'm not convinced that anyone could tell a difference during playback, so why does it matter?
Should I not just be using the DAR GKnot gives? So 720 x 432 by 2.37:1 (155:109) or something?Why not just test it out with what GKnot suggests, and if it looks wrong to you, look for a better solution, but if you don't notice anything, leave it alone.
If you're generating encodes with square pixels and not adding aspect ratio signalling to distort the shape (ratio) of those pixels, then no you will "not able to get the point..."
Thanks for the reply :)
Ok, so the only difference between my method and the "correct" one is that:
- the pixel aspect ratio mustn't be square (according to tv)
or
- i have to add ars (to correct shaping)
In both cases, I have to introduce the correct AR settings in the XviD control panel, and here comes in the "point"?
PS: Then why I see correct images? [ Waitec HTX standalone ]. How can I check with PC if the final TV image will be correct? Is for the really little error committed? Because if I resize to x16 multiples, there's a range of ARs that will fall in the same final dimensions.
SeeMoreDigital
2nd March 2006, 12:27
Hi Mod,
These are all questions that have been asked and answered before in other forum threads.
If you are not sure of the basics of anamorphic signalling and what it does and what it's used for, I would respecfully ask you search the forum.
Cheers
Roger, and thanks for reply :)
Audionut
7th March 2006, 08:26
The are some movies, that when you crop away the black matte, in order to keep a mod 16 resolution, the resulting aspect ratio will be incorrect.
This tool will help alot.
Thanks very much SMD.
Sh*t hot.
jv_guano
7th March 2006, 12:25
What make and model of stand-alone player are you using to connect to your 16:9 TV?
I use both a Ndvx 2501 by Nortek (http://www.nortekonline.com/ENG/Product/product.asp?name=NDVX+2501&c=DVD&f=DVD%20PLAYER&po=False) and a DVD 612 by Philips (http://www.p4c.philips.com/cgi-bin/dcbint/cpindex.pl?sct=DVD_PLAYERS_SU&cat=DVD_PLAYERS_RECORDERS_CA&grp=HOME_AUDIO_VIDEO_GR&session=20060307072309_151.38.74.176&ctn=DVD612/021&slg=AEN&scy=IT) connected to a Panasonic TX-w28d3f 16:9 tv
but really, the important thing is that I see my movie correctly! You've been just too much kind so far! :)
SeeMoreDigital
7th March 2006, 13:24
Sadly I don't seem to be able to find out what type of chip-set is fitted into your Nortek NDVX 2501 MPEG-4 capable player.... :(
jv_guano
7th March 2006, 13:25
Sadly I don't seem to be able to find out what type of chip-set is fitted into your Nortek NDVX 2501 MPEG-4 capable player.... :(
can I do it in some way, like watching on my manual?
SeeMoreDigital
7th March 2006, 13:43
What happens when you play these MPEG-4_AR_Signalling_Test_Files (http://www.one.seemoredigital.net/MPEG-4_Player_Test_Files/MPEG-4_AR_Signalling_Test_Files.7z)?
Cheers
@SeeMoreDigital: can you report please the algorithm used to calculate the PAR in your tool? I use:
|MAR-AR|*100 // num
--------------
MAR*|eAR| // den
where: MAR:movie aspect ratio (calculated after cropping)
AR:aspect ratio with current mod(16/8/4/2) setting
eAR:%error between AR and MAR
When I round it to integers I get different values (the % difference is really little btw).
To find the final integers I multiplicate num and den for their 1/decimal part (ie: 0.2012 -> 2012), find the MCD and divide num and den for that.
SeeMoreDigital
15th May 2006, 10:13
@SeeMoreDigital: can you report please the algorithm used to calculate the PAR in your tool?Hi Mod,
It's the same code as used with MPEG4 Modifier. So I guess you'll have to ask Moitah ;)
Cheers
I took a look at the source, works perfectly now.
Useful as always, thanks :)
delacroixp
14th April 2007, 12:28
It's easier to correct the aspect ratio of an MPEG-4 source if it has no mattes. But it depends on how you've encoded it.
After reading some of the e-mails and PM's I've received it's become quite clear, some of you have generated some very peculiar shaped encodes....
Indeed, when generating "cropped and resized" encodes, some of you have elected to keep tiny bits of the black mattes in..... very strange!
The practice of encoding anamorphic movies has a certain beguiling sense of economic profitabillity... 415k pixels encoded IN and 590k pixels played-back OUT (PAL 16:9)... It would certainly seam like a 30% bonus...
I recently encoded The Deer Hunter (http://en.wikipedia.org/wiki/The_Deer_Hunter) (720 x 576 - PAL / 16:9). http://souls-online.net/delacroixp/AutoMKV/vlcsnap_TheDeerHunter_Thumb.jpg (http://souls-online.net/delacroixp/AutoMKV/vlcsnap_TheDeerHunter.jpg)
I ran it through Dr DivX which reported blackspace => L = 9 R = 8, T = 70 B = 71. To comply with mod 16, I...
under-cropped L = 8 [-1] & R = 8 [0] and
over-cropped T = 72 [+2] & B = 72 [+1] ...
Which left 704 x 432... a rather pretty number... which, when fed into the ARS calculator... set on custom 2.29:1 since (997/435 = 2.29)(original non-matte frame, before crop)... gave a result of 215:153... which seams to equate to a width of 989.28... a far cry from my original calc of 1004x432...
:):D:eek:
Pascal
SealTooGreat
27th May 2007, 11:57
Is there any tool for PAR->DAR calculation?
I need it cause "Nero Digital AVC export" in Adobe Premiere Pro 2.0, have only DAR option box, and I want to encode anamorphically, (input file is PAR=64:45).
Someone will say "Why don't you use Nero Recode?" -> simple GUI doesn't have ability for PAR/DAR signaling.(and funny DirectShow Nero AVC encoder has , viewing from GraphEdit http://www.invision.smileyville.net/smilies/conf (2).gif)
there is no DAR in avc, therefore i think the tool is automatically recalculating your DAR to a proper PAR!?
SealTooGreat
28th May 2007, 13:00
^Yes, you are right^
but my input in premiere pro is 704x432(PAR=64:45) and I don't know what DAR's values to set in Nero AVC exporter?
Does someone know any tool for PAR->DAR?
SeeMoreDigital
28th May 2007, 14:18
DAR, PAR, SAR... At the end of the day they're all different terminologies that end up providing an Aspect Ratio Signalling (ARS) value.
EDIT: These days, it's possible to enter any ARS value you like into a decent MPEG-4 (Part-2/Part-10) encoding application. And have the resulting encodes displayed at any pixel shape you desire upon playback.
SealTooGreat
28th May 2007, 17:27
These days, you can enter just about any ARS value you like into most decent MPEG-4 Part-2 and Part-10 encoding applications. To alter the shape of the displayed pixels (and image) upon playback.
Do you know any tool only for PAR->DAR calculation - similar to ARS Calculator but with inverse function ?
SeeMoreDigital
28th May 2007, 19:05
Do you know any tool only for PAR->DAR calculation - similar to ARS Calculator but with inverse function ?What is it you are trying to do?
Can you provide more information about your source image. Such as a still frame?
Cheers
SealTooGreat
28th May 2007, 20:23
I need it cause "Nero Digital AVC export" in Adobe Premiere Pro 2.0, have only DAR option box, and I want to encode anamorphically, (input file is PAR=64:45).
but my input in premiere pro is 704x432(PAR=64:45) and I don't know what DAR's values to set in Nero AVC exporter?
I've already said. And I'm using AVS script for importing.
ARS Calculator gives DAR->PAR, I need opposite calculation (PAR->DAR).
SeeMoreDigital
28th May 2007, 20:40
I've already said. And I'm using AVS script for importing.
ARS Calculator gives DAR->PAR, I need opposite calculation (PAR->DAR).And as I've said: -
"DAR, PAR, SAR... At the end of the day they're all different terminologies that end up providing an Aspect Ratio Signalling (ARS) value"
SealTooGreat
28th May 2007, 20:52
Sorry SMD, this doesn't help me at all. I've said simple question, why I couldn't get simple answer.
edit:
Source: PAL DVD 720x576 (PAR=64:45) anamorphic
Crop: 704x432 (via AVS script and this is still PAR=64:45, regardless of cropping )
Resize: NONE
wishes: want to encode anamorphically.
problem: encoder accept only DAR numbers(x:y). How to determinate?... if possible can someone suggest PAR->DAR calculator app?
I would easily do that if I didn't crop 16px from width => DAR=1024:432=64:27
http://img530.imageshack.us/img530/1097/5thgg1.th.jpg (http://img530.imageshack.us/my.php?image=5thgg1.jpg)
SeeMoreDigital
29th May 2007, 09:48
I could not give you a simple answer because you did not provided enough information...
Looking at the image you provided, it seems as though the movies aspect ratio (MAR) is around 2.35:1.
So after feeding all the required information into the ARS calculator. Like this: -
http://img510.imageshack.us/img510/3007/arscalcgu4.png
You need to add an ARS (PAR, DAR, SAR) value of 199:138 to your 704x432 MPEG-4 video stream.
Cheers
SealTooGreat
29th May 2007, 13:36
I've encoded small sample, putting values 199:138 in DAR boxes of Nero AVC exporter (in premiere pro 2.0).
Snapshot by MPC
http://img201.imageshack.us/img201/677/5thdarik4.th.jpg (http://img201.imageshack.us/my.php?image=5thdarik4.jpg)
MPC's Properties:
http://img92.imageshack.us/img92/2750/propertiesqx8.th.jpg (http://img92.imageshack.us/my.php?image=propertiesqx8.jpg)
And this is how DAR boxes, in Nero AVC exporter, look:
http://img295.imageshack.us/img295/2388/neroavcparargi7.th.jpg (http://img295.imageshack.us/my.php?image=neroavcparargi7.jpg)
Testing several encodes I've concluded that Aspect ratio option is in fact DAR.
SDM, in ARS Calculation Tool, ARS=PAR and MAR=DAR (You can call it whatever you like.). So I've used PAR(ARS) values for DAR(MAR) as you suggested and output AR is wrong.
This is PAL DVD with cropped picture, so PAR is already 64:45(or ASR if you prefer ). So workflow, in this tool, should be like this: type resolution: 704x432, put 64:45 in ASR box and than calculate MAR(or DAR) - but this tool can't do that.
One request, if you are the author of this tool, could you add ability to calculate MAR(DAR) upon ARS(PAR) and resolution input. MPEG4modifier has this inverse function, but is limitted on ASP and AVI.
delacroixp
29th May 2007, 15:20
I'm trying to compare snapshots from HD and 720_anamorphic material...
If I use MKV signalling set to 1280x576... VLC plays correctly and makes a 1280x576 snapshot...
However, if I signal 1280x720 DAResolution it reverts to 1024x576 and I don't get get an HD-upscaled frame-snapshot...
I could simply upscale with Photoshop but it's less than ideal...
Ideally, I would be able to export an upscaled VOB or MKV frame, based on a frame number...
Any ideas...
:):D:eek:
Pascal
SeeMoreDigital
29th May 2007, 18:39
Hmmm.....
Provided you've cropped away all black mattes and are left with an image having a Pixel Frame Size (PFS) of 704x432. I can assure you that when you add 199:138 ARS to your MPEG-4 stream, the video image will be displayed at an MAR of 2.35:1
Indeed, here's what MP4Box reports: -
http://img241.imageshack.us/img241/5183/infose4.png
As you can see the "Indicated Track Size" is 1015x432 pixels. And 1015 divided by 432 equals 2.35:1
EDIT: And here's are some MPEG-4 samples using your original 704x432 image as the source: -
pdanpdan
29th May 2007, 18:45
I use this simple xls calculator. This value is used in mkv as aspect ratio, with square pixels encoded mp4
SealTooGreat
30th May 2007, 05:05
SMD, you are giving me PAR=199:138, but I need DAR values. I already have PAR which is defined by PAL source and it's 64:45, regardless of cropping.
Nero AVC exporter only accept integer DAR's values between 1-255, not decimal number, so I can not achieve accurate output playback resizing. So I encoded using res. 704x432 with Aspect ratio=44:27 ( I couldn't set Aspect ratio=704:432 cause of mentioned limitation, but dividing both values by 16 I've gotten same DAR(=44:27) proportion ). And than , using mp4box's cmd
MP4Box.exe -par 1=64:45 "5th_test.mp4"
.. resulting frame look:
http://img293.imageshack.us/img293/5329/5thcorrectparlg4.th.jpg (http://img293.imageshack.us/my.php?image=5thcorrectparlg4.jpg)
Main difference between your and mine steps is that your define new PAR (199:138) values when one already is known (PAR=64:45 is defined by PAL source). And there's a step when you are guessing:
Looking at the image you provided, it seems as though the movies aspect ratio (MAR) is around 2.35:1.
Loosing accurate DAR(MAR) is more visible if I do (on purpose ) strong overcrop on source image...so seeming/guessing DAR/MAR in (ARS) Calculation Tool is wrong step in process because:
strong overcrop on source(720x576) image, result(564x432) looks:
http://img166.imageshack.us/img166/4268/5th564x432overcropqy9.th.jpg (http://img166.imageshack.us/my.php?image=5th564x432overcropqy9.jpg)
ARS calculator gives ARS=9:5 using guessed MAR=2.35:1 and res.564x432:
http://img209.imageshack.us/img209/6083/arscalcjt7.th.jpg (http://img209.imageshack.us/my.php?image=arscalcjt7.jpg)
Applying ARS=9:5 on overcropped res.546x432 gives:
http://img181.imageshack.us/img181/9307/5th564x432overcroppar95mc5.th.jpg (http://img181.imageshack.us/my.php?image=5th564x432overcroppar95mc5.jpg)
Applying known PAR=64:45 on overcropped res.546x432 gives:
http://img167.imageshack.us/img167/1143/5th564x432overcroppar64tu6.th.jpg (http://img167.imageshack.us/my.php?image=5th564x432overcroppar64tu6.jpg)
And here's accurate DAR=1.857:1 using input res.564x432 and input PAR=64:45
http://img209.imageshack.us/img209/6991/arscalcrightdarpx2.th.jpg (http://img209.imageshack.us/my.php?image=arscalcrightdarpx2.jpg)
And that's what I have needed in the first place - to calculate accurate DAR. And tool which can do that - ARS Calculation Tool
isn't capable for PAR->DAR calculation(or ASR->MAR if you prefer using those names).
With PAR->DAR calculator , knowing input PAR and input resolution, I can achieve more accurate DAR (or MAR by your dictionary) - but only tool I can find is MPEG4modifier (limitted on ASP and AVI) which doesn't allow you calculating unless you load the file. I've re-encoded smal 264/mp4 sample to xvid/avi in order to use MPEG4modifier and to calculate more accurate DAR by known values(res=704x432 and PAR=64:45).
http://img81.imageshack.us/img81/4249/mpegmodifierii7.th.jpg (http://img81.imageshack.us/my.php?image=mpegmodifierii7.jpg)
So MAR=2.35:1 is wrong at very beginning, right value is MAR=2.318:1, and why the heck do you call it MAR when it already has the name - DAR? And ASR=SAR=PAR... Can we talk, using usual names for those signalings???!!!
It's a pity that those decimate DAR numbers(2.318:1) can't be used by Nero AVC exporter in premiere pro 2.0
shon3i
1st June 2007, 22:47
Just divide 1024 with 432 wich is 2.37 wich is correct DAR for you cropped resolution.
SealTooGreat
2nd June 2007, 00:35
Just divide 1024 with 432 wich is 2.37 wich is correct DAR for you cropped resolution.
This would be correct if my cropped input is 720x432, but this is not the case cause I'm having 704x432. It's a PAL source so PAR is already 64:45.
MPEG4modifier (with res.704x432 input and PAR=64:45 set) gives DAR=2.318:1 which is in fact the most accurate value. Only problem is that Nero AVC exporter doesn't support decimate numbers. Anyway, I've found workaround using mp4box after finished encode.
pdanpdan
2nd June 2007, 14:12
The most accurate would be 2,317695473 :)
The formula is simple:
InitialAspectRation(16/9 or 4/3)*Orig_Y/Orig_X*Cropped(final)_X/Cropped(final)_Y
It's allways working if the original source is well done.
smok3
10th August 2007, 07:35
why not just
DAR * height = PAR * width
so
DAR = PAR * width / height
= 2.3176954732510291
?
my python procedure;
>>> par=64.0/45.0
>>> par
1.4222222222222223
>>> x=704.0
>>> y=432.0
>>> par*x
1001.2444444444445
>>> _/y
2.3176954732510291
pdanpdan
10th August 2007, 09:11
I think this would not work if you also crop width
SealTooGreat
10th August 2007, 09:36
I think this would not work if you also crop width
This is not true! PAR is constant no matter how much you crop DVD source, but you must not resize it, 'cause it will lose its original pixel dimension.
btw the source, you are referring, is already width cropped (704x432)
pdanpdan
10th August 2007, 09:41
Sorry, it was my mistake. Of course the formula is ok. (InitialAspectRation(16/9 or 4/3)*Orig_Y/Orig_X = PAR :))
smok3
10th August 2007, 09:46
imho it is simply:
new DAR = PAR * croped_width / croped_height
edit: fixed in according to next post.
SealTooGreat
10th August 2007, 09:56
imho it is simply:
new DAR = PAR * new_width / new_height
Yes it's simple if you know source PAR which is calculated from DVD's InitialAspectRation (DAR, 16:9 or 4:3) (as pdanpdan have pointed). Once you know source's PAR, you can crop(not rezise) video and calculate new DAR.
just a bit correction for accuracy:
new DAR = source's PAR * cropped_width / cropped_height
new (referring to new_width / new_height) can mean new width/height gotten from resizing - in this case formula won't give appropriate results.
smok3
10th August 2007, 10:51
right, i have fixed my previous post.
delacroixp
11th August 2007, 13:36
It certainly emphasises the difficulty of getting it right...
Most people wont even notice the image distortion but then... "most people are fools"... at least some of the time...
:):D:eek:
Pascal
foxyshadis
12th August 2007, 10:22
Up to a 5% AR change is small enough that even discerning viewers can be hard pressed to tell which is correct; real life is so full of its own distortions, after all, that we adjust easily. And then yes, there are people like my mother, who didn't mind watching DVDs unstretched because she'd fiddled with the TV settings. (It took me a minute to figure out why everyone was so tall and thin when I came over. =x )
All that matters is whether it takes away from your enjoyment while watching, unless you're really serious about building a great archive for the future generations.
SeeMoreDigital
12th August 2007, 10:49
Indeed... one of the things that really peeves me is that LCD TV manufacturers are shoving 17", 19", 21", 23" and 26" wide-screen panels at 16:10, down our necks!
No-way can anything look the correct shape on those things.... Yet people are buying them :eek:
delacroixp
12th August 2007, 17:30
Indeed... one of the things that really peeves me is that LCD TV manufacturers are shoving 17", 19", 21", 23" and 26" wide-screen panels at 16:10, down our necks!
No-way can anything look the correct shape on those things.... Yet people are buying them :eek:
I hear you... me tooo...
I guess we need dynamically resizable screens... kinda vector screens...
I hardly think 4:3 is dead and while portrait mode could work for some movies, I just love those truly wide-angle 5:1 vista landscape panarama's that just wrap-around you like a warm friendly blanket...
LCD's sort of struggle with flexibillity... a curve would be nice though I suppose projectors can handle that kind of thing pretty well...
IMAX (http://www.imax3dmyrtlebeach.com/imax_technology_screens.asp) screens, which are 25m high... are in fact, pretty square...
:):D:eek:
Pascal
DanielSun
2nd March 2008, 13:48
I have a maybe stupid question, why there are so many MARs (DARs),? I mean what movie have 2.35:1 and what movie have 2.40:1, how do I know exactly the right MAR(DAR) of a video source?
facialz
2nd March 2008, 15:14
2.35, 2.39 and 2.40 are one and the same.
SeeMoreDigital
2nd March 2008, 15:21
2.35, 2.39 and 2.40 are one and the same.No they're not...
A movie can be filmed, cropped and presented to any aspect ratio the director wishes :eek:
smok3
2nd March 2008, 19:09
Thats why it is easier to make calcs based on PAR (pixel aspect ratio).
SeeMoreDigital
2nd March 2008, 19:33
Thats why it is easier to make calcs based on PAR (pixel aspect ratio).Indeed...
Anyway, here's how I determine the original "Movie Aspect Ratio" (MAR) from a DVD source: -
http://forum.doom9.org/showthread.php?p=1034465#post1034465
chaynik
11th September 2009, 03:12
My apologies for reviving an old thread, but I really don't see the point of all of these custom values. Why is it assumed that ITU PAR/SAR values are incorrect?
True, most DVDs do have 720 as their horizontal resolution (although 704 is legal as well), but that is to account for overscan. I quote from "DVD Demystified" ISBN 0-07-135026-8 page 292
The 720- and 704-pixel rasters produce identical pixel aspect ratios because the 720-pixel version includes more of the horizontal overscan area (with a scanning line period of 53.33 microseconds), whereas the 704-pixel version is a tight scan (with a line period if 52.15 microseconds).
I also highly recommend reading Chris Pirazzi's Programmer's Guide to Video Systems (http://lurkertech.com/lg/video-systems) for some detailed info on these topics.
Both of these (and other video engineering sources) are unanimous on these concepts.
The correct way to encode a DVD "rip" to an MPEG-4 variant would be to crop 720 down to 704 and then apply the ITU PAR values.
Keiyakusha
11th September 2009, 15:45
chaynik
There is a lot of new DVD's (the ones I've seen is mostly anime) that uses full width 720px and needed to be resized 720->853.3 to looks right. The only absolutely correct way is trust your eyes first (round objects and other stuff) and if you fail to determine how it should look - then do by specs. Also not sure about what custom values you talking but DVDripping is not the only case when this tool can be handy.
Blindly following the specs is a bad idea since if video uses full width - it doesn't break any compliance but on modern hardware it can be displayed without this overscan stuff.
medp7060
26th October 2009, 09:17
the more I read, the more consuded I became. So many terms used differently: pixel frame size, movie aspect ratio, display aspect ratio, aspect ratio signalling, pixel aspect ratio ...
Boulder
27th November 2009, 23:02
Could someone please point me to the right direction regarding the --sar to set in x264:
I've got a 4:3 720x576 DVD source which has 12 pixels of black borders on the left and right and 2 pixels of black borders on the left and right side (so the active film pixels is 696x572). After cropping these off and resizing to the closest mod-16 resolution (with the help of MeGUI), I get the final resolution of the encode to be 704x528. How should I set the SAR to be in x264 so that the final encode will be displayed at the correct AR on my Popcorn Hour? Please teach me with some maths if possible (to understand better) :)
Keiyakusha
28th November 2009, 00:07
Boulder
If you do cropping + resizing - you shouldn't set SAR at all.
Boulder
28th November 2009, 09:11
Boulder
If you do cropping + resizing - you shouldn't set SAR at all.So I should assume that MeGUI always suggests SAR 1:1 if I deal with 4:3 sources?
What about the cases where I want to keep the encoded video anamorphic and let the PCH stretch the video to correct aspect ratio upon playback?
Sharc
29th November 2009, 18:25
Could someone please point me to the right direction regarding the --sar to set in x264:
I've got a 4:3 720x576 DVD source which has 12 pixels of black borders on the left and right and 2 pixels of black borders on the left and right side (so the active film pixels is 696x572). After cropping these off and resizing to the closest mod-16 resolution (with the help of MeGUI), I get the final resolution of the encode to be 704x528. How should I set the SAR to be in x264 so that the final encode will be displayed at the correct AR on my Popcorn Hour? Please teach me with some maths if possible (to understand better) :)
New sar = Original sar x (resized_height x cropped_width) : (cropped_height x resized_width).
You might get very high numbers, but no worry, x264 scales these automatically.
The original sar (=par in DVD terminology) you have to take from tables (ITU) or use your standard 'defaults' for PAL and NTSC DVD sources respectively.
For Blue-Ray the original --sar is normally 1:1 (actually I haven't seen any other).
In your case, assuming the 4:3 DVD has an original par following the ITU standard, the calculation yields:
New sar = 128:117 x (704x696) : (572x528) = 62717952:35335872=1.77491
smok3
29th November 2009, 22:27
yes, but if you crop 12px left and right and then get 704 that would be upsizing....
http://someotherstuff.co.cc/resize/index.php?ssmw=720&sar=1.094&sar2=&ssmh=576&CT=2&CL=12&CR=12&CB=2&mplayCrop=&trw=&dar=1.094&dar2=&modw=&modh=&padw=&padh=&css=&doit=true a no, no
edit: at the crop line, you can see those lil (-8px) and (-4px) values, which represent how far from modN value cropping one is
i would just crop to nearest mod16 values
http://someotherstuff.co.cc/resize/index.php?ssmw=720&sar=1.094&sar2=&ssmh=576&CT=8&CL=16&CR=16&CB=8&mplayCrop=&trw=688&dar=1.094&dar2=&modw=&modh=&padw=&padh=&css=&doit=true <- your answer
no scaling at all
and use your original sar, or use the one spit by the calc, which should be really close.
edit2: how close;
>>> 128.00/117.00
1.0940170940170941
>>> 547.00/500.00
1.0940000000000001
Boulder
30th November 2009, 03:45
yes, but if you crop 12px left and right and then get 704 that would be upsizing....
http://someotherstuff.co.cc/resize/index.php?ssmw=720&sar=1.094&sar2=&ssmh=576&CT=2&CL=12&CR=12&CB=2&mplayCrop=&trw=&dar=1.094&dar2=&modw=&modh=&padw=&padh=&css=&doit=true a no, no
edit: at the crop line, you can see those lil (-8px) and (-4px) values, which represent how far from modN value cropping one is
i would just crop to nearest mod16 values
http://someotherstuff.co.cc/resize/index.php?ssmw=720&sar=1.094&sar2=&ssmh=576&CT=8&CL=16&CR=16&CB=8&mplayCrop=&trw=688&dar=1.094&dar2=&modw=&modh=&padw=&padh=&css=&doit=true <- your answer
no scaling at all
and use your original sar, or use the one spit by the calc, which should be really close.
edit2: how close;
>>> 128.00/117.00
1.0940170940170941
>>> 547.00/500.00
1.0940000000000001Thanks, that tool looks really useful :) I usually try to just crop and not (down)size at all, but sometimes the amount to crop seems a bit much. I guess I should test and see how much penalty (regarding compression) is caused by not cropping at all if the amount is just a few pixels on each side.
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.