Log in

View Full Version : AR again


Pages : [1] 2 3

Dogway
15th January 2011, 07:04
hello, this is a frame of a bit strange source. The DAR of the DVD was 16:9 so assuming that NTSC 16:9 is 64:54 for Digital Content (which this seems to be) final output results to 872x480. Well that goes for the technical side, if instead I just crop and resize to 16:9 852x480, geometrics looks kinda better. What do you think I should do?


crop(2,4,-2,-8)
spline64resize(852,480)
http://img337.imageshack.us/img337/2552/01x.th.png (http://img337.imageshack.us/img337/2552/01x.png)
http://img249.imageshack.us/img249/9088/852n.th.png (http://img249.imageshack.us/img249/9088/852n.png)
http://img593.imageshack.us/img593/9761/001yrh.th.png (http://img593.imageshack.us/img593/9761/001yrh.png)

Here I try to preserve the geometry of the uncropped 64:54 translated to a new resolution adjusted by height:
crop(2,4,-2,-8)
spline64resize(872,480)
http://img84.imageshack.us/img84/4759/02x.th.png (http://img84.imageshack.us/img84/4759/02x.png)
http://img408.imageshack.us/img408/8854/872n.th.png (http://img408.imageshack.us/img408/8854/872n.png)
http://img209.imageshack.us/img209/6789/002ko.th.png (http://img209.imageshack.us/img209/6789/002ko.png)

cacepi
15th January 2011, 07:10
The dar of the dvd was 16:9 so assuming that ntsc 16:9 is 64:54 for digital content (which this seems to be) final output results to 872x480.

720 * 64 / 54 = 853.333333333333333

Not 872.

Dogway
15th January 2011, 07:35
716x468 * 64/54 = 848x468 = 872x480
Maybe Im a bit slow today...

cacepi
15th January 2011, 07:58
716x468 * 64/54 = 848x468 = 872x480
Let's try this again.

16 / 9 = 1.777777777777778
853.333333333333333 / 480 = 1.777777777777778
872 / 480 = 1.816666666666667

PARs are not universal; you cannot use one for all situations. When you resize the video, you change the PAR. If you wish to keep your video 716x468, you'll have to derive a custom PAR to achieve a 16:9 aspect ratio (which would be 832x468). 64/54 will not work.

Dogway
15th January 2011, 09:02
if source with NAB is 16/9, source with cropped NAB shouldn't be 16/9. (Although they share the same PAR)
PARs are standarized so they should be universal. Whether this one conforms it is beyond my knowledge.

yetanotherid
15th January 2011, 17:16
I don't care what anyone says, by far the majority of DVDs don't use the ITU resizing method.
The first lot of images look correct to me, and the wheel on the car looks round to me in picture number 3 of the first resizing method.

What format are you converting to? I'm just wondering why you don't use anamorphic encoding rather than have to think about it.
For converting to AVI I always downsize to 720 or thereabouts but using MeGUI (for example) you can encode to anamorphic output so you only need to crop and encode.... after changing the resizing method of course, as it seems there's no way to tell it not to default to the ITU resizing method, even though very few DVDs use it.

My logic would be.... resizing to the "full dimensions" and encoding with square pixels doesn't give you more resolution than if you encode using the same shaped pixels as the original DVD, but it does require more of them.

One other thought.... what container format are you using? I use MKVs mostly as they're fairly easy to work with so I don't stress about the resizing method at all. I always use the non-ITU method and if I happen to find one encode in a hundred which should have used the ITU resizing method, then I just open the MKV with MKVToolNix, change the display dimensions accordingly and re-save it as a new MKV.

Dogway
15th January 2011, 20:49
Yeah my question is more about object geometry than final resolution, Im still to decide on square pixel or anamorphic, I like encoding to mp4 and normally use a lil app to change PAR if necessary once encoded. My thoughts are about whether what resolution (in case of square pixel) or what PAR (in case of 720x480) should I use after crop the black borders.
I normally like square pixel because you benefit to a certain degree from the advantages of advanced resizers in avisynth and noise and left out artifacts look according. Since afterall I will resize an anamorphic 716x468 to a mod16 720x480 anyways.

RAW screenshots:
http://img141.imageshack.us/img141/899/golen.th.png (http://img141.imageshack.us/img141/899/golen.png)
http://img248.imageshack.us/img248/2097/clockd.th.png (http://img248.imageshack.us/img248/2097/clockd.png)

sample video 35Mb (I forgot to not use MU sorry):
http://www.megaupload.com/?d=UUEG0RAP

yetanotherid
16th January 2011, 15:20
My thoughts are about whether what resolution (in case of square pixel) or what PAR (in case of 720x480) should I use after crop the black borders.

It's either the ITU resizing method and squished looking encodes most of the time, or you take the width after cropping and multiply it by <wrong>1.777777777777778</wrong> (sorry, dumb moment) 1.422222222 to give you your square pixel width for PAL, 1.185185 for NTSC. When it comes to resizing.... how you resize depends on how many pixels you cropped, which isn't something I can know.

Is deciding on the appropriate dimensions after resizing which is the cause for concern? Personally I think life's too short to be thinking about that sort of thing, so I tend to over-crop if necessary until I've cropped to mod-16 dimensions (generally it's only a matter of losing a few extra pixels if necessary to get there) so then there's no need to resize, no risk of making a mistake and distorting the aspect ratio, and you can encode using the same number of pixels and the same pixel aspect ratio as the original DVD.
If I don't want to over-crop for some reason I tell MeGUI to resize to mod-16 dimensions and let it to the math. If you set the allowed aspect ratio error to zero in MeGUI's options it'll send the exact pixel aspect ratio required in order to produce a non distorted image to the encoder. Or I just encode non mod16.

When it comes to resizing to square pixel dimensions you either have to accept some aspect ratio distortion in order to achieve mod16 dimensions or you usually need to over-crop a bit. I was born too late for my brain to create any aspect ratio neural pathways while it was developing so I use HDConvertToX for those encodes. Once again making sure not to enable the ITU resize method I pick the required width, let HDConvertToX pick the height, and then I adjust the cropping as HDConvertToX recalculates the amount of aspect ratio distortion. I wish all encoders would do it.... but if nothing else you can use HDConvertToX to work out the required cropping for the minimum aspect ratio distortion and then use the resulting cropping in another program. Or if you do the math yourself you can at least use HDConvertToX to confirm you got it right.

I normally like square pixel because you benefit to a certain degree from the advantages of advanced resizers in avisynth and noise and left out artifacts look according. Since afterall I will resize an anamorphic 716x468 to a mod16 720x480 anyways.

I won't argue about that one as I'm not sure whether there's really any benefit there or not, but as I generally over-crop there's usually no resizing involved when I encode DVDs anamorphically. I'd be inclined to think the minute you change the aspect ratio of the pixels the benefit of anamorphic encoding is probably lost so it might be advantageous to change to square pixels, but to be honest I compared encodes using both methods a long time ago and if there's a noticeable quality difference my perception neural wiring didn't develop all that well either. Then again I tend to extend the "over-crop" philosophy to using filters too as I rarely use any. Instead I just encode the original DVD anamorphic pixel for anamorphic pixel.

yetanotherid
16th January 2011, 15:35
I just looked at your video (you don't de-interlace?). About 42 seconds in there's a scene with a clock pretty much square on to the camera in the background. Whatever math you used to resize the video it seems to be right, as the face of the clock is about at close to a perfect circle as you'll get.

I assume you under-crop your encodes rather than over-crop like I do? Personally I find under-cropping somewhat annoying. I like to crop till the edges of the video are nice and sharp.... but each to their own I guess. :)

Brother John
16th January 2011, 17:25
The DAR of the DVD was 16:9 so assuming that NTSC 16:9 is 64:54 for Digital Content (which this seems to be) final output results to 872x480. Well that goes for the technical side, if instead I just crop and resize to 16:9 852x480, geometrics looks kinda better. What do you think I should do?
If you’re really after the »correct« AR and absolutely don’t want to take any chances, then always crop to 704 width. Because at that width the ITU and non-ITU PAR both result in the same square pixel width. Problem solved. :) Of course you loose a bit of the picture on the left/right side in most circumstances.

On the topic of mod16: Do you have hardware restrictions that make this so important? For x264 encodes mod16 is irrelevant. And even with good old Xvid the efficiency loss from non-mod16 is far from dramatic. So it’s generally not worth sticking to mod16.

Dogway
17th January 2011, 01:03
I just looked at your video (you don't de-interlace?).
It's an unprocessed extract of the vobs. Obviously it should be right while playing it in MPHC as it reads the tagged PAR (64:54). But its not. Read on:


1. RAW Source
http://i212.photobucket.com/albums/cc35/Dogway/Misc/th_01a.png (http://i212.photobucket.com/albums/cc35/Dogway/Misc/01a.png)

2. Look the DVD is tagged as NTSC 16:9, 64:54 PAR that's a fact*, and this is what you get:
screencap
http://i212.photobucket.com/albums/cc35/Dogway/Misc/th_01.png (http://i212.photobucket.com/albums/cc35/Dogway/Misc/01.png)

3. let's imitate what hardware does:
resize(852,480)
http://i212.photobucket.com/albums/cc35/Dogway/Misc/th_02.png (http://i212.photobucket.com/albums/cc35/Dogway/Misc/02.png)
fine!

4. To crop while preserving the geometry you first crop obviously, and multiply width(or divide height) by the PAR factor (64:54). Result: 848,46 x 468
crop(2,4,-2,-8)
resize(848,468)
http://i212.photobucket.com/albums/cc35/Dogway/Misc/th_03.png (http://i212.photobucket.com/albums/cc35/Dogway/Misc/03.png)


5. which happens to have the same aspect ratio than 870,21 x 480, which in turn will be converted to mod4 872x480.
This is the DVD as it was supposed to be seen upon DVD tagged PAR, just cropped and resized:
crop(2,4,-2,-8)
resize(872,480)
http://i212.photobucket.com/albums/cc35/Dogway/Misc/th_04.png (http://i212.photobucket.com/albums/cc35/Dogway/Misc/04.png)


##########################


6. But you know what? everything from before IS WRONG because: if by nosense I decide to crop, and resize to DAR 16:9, thus messing up the DVD proposed geometry, voila, it looks correct!
Since when doing strange procedures leads to correct results? Can someone put some logic here?
crop(2,4,-2,-8)
resize(852,480)
http://i212.photobucket.com/albums/cc35/Dogway/Misc/th_05.png (http://i212.photobucket.com/albums/cc35/Dogway/Misc/05.png)


7. *At last to mess things further, I tested with a DVD software player. It looks just like above, so my question is, whats happening in the background? Mediainfo just tells me DAR 16:9, but this is the result of a 1.162 PAR tagged source :/

http://i212.photobucket.com/albums/cc35/Dogway/Misc/th_06.png (http://i212.photobucket.com/albums/cc35/Dogway/Misc/06.png)

mpucoder
17th January 2011, 06:16
Neither DVDs or MPEG-2 use PAR, the "tag" is DAR.

Dogway
17th January 2011, 06:59
Thanks for the info, but the third image is 16:9 and is totally different from the "correct" 2 last images.

Keiyakusha
17th January 2011, 07:41
Thanks for the info, but the third image is 16:9 and is totally different from the "correct" 2 last images.

I don't really understand what is so surprising here. You are smarter than your hardware. You can tell that there is borders you need to eliminate, and hardware can not.

Dogway
17th January 2011, 09:27
@Keiyakusha: You mean that it is originaly wrong? I thought the same until the soft of the last image understood right of the hood it had to delete borders :/
I know I will use method 6, but Im trying to figure out why I am doing it so. Because there must be some standard or thinking I and MPHC are missing and others like powerDVD or the creators of the DVD are not.

Ghitulescu
17th January 2011, 09:29
Besides, the black borders are usually covered by the overscan.

yetanotherid
18th January 2011, 08:05
Besides, the black borders are usually covered by the overscan.

There appears not to be very much overscanning taking place on Dogway's monitor.

Dogway,
I haven't read through your post really thoroughly, and I've never compared the way MPC-HC resizes video with the way other players do it, but I'm fairly sure it doesn't use the ITU resizing method... while once again you are.

Do you know for a fact 16:9 means a 64:54 pixel aspect ratio or could it be 1.7777777? Edit: Dumb moment again. I referred to the DAR when I meant to ask if the pixel aspect ratio should be 1.185185 (or 1.42222222 for PAL)

Forgetting cropping and resizing for a second, an ITU resized video will appear to be squished vertically compared to a non ITU resize of the same video, or it looks stretched horizontally... it's just different ways of looking at the difference.

So you've taken a 16:9 video and assumed the media player is resizing it using the same shaped pixels you think it should be using, and if I read your post correctly you think it looks correct. But when you resize the image yourself using your idea of what the pixel shape should be it looks different/wrong? Is that correct so far?
So then it appears you cropped some pixels top and bottom, resized using a 16:9 DAR as though no cropping had taken place, and that DAR appears correct?

My guess is that by removing the black borders before cropping and resizing to 16:9, by a lucky co-incidence it just happens to be the right amount of cropping to compensate for the fact you've been assuming a 64:54 pixel aspect ratio when 1.185185 is actually the correct one, or at least the one the media player is using. Or to put it another way...

An ITU resized video will be wider than a non-ITU resized video. If it didn't use the ITU resize method then it'll look stretched a little. By removing some top and bottom pixels before resizing, then resizing as if they were still there, you've also stretched the video vertically a little and as it turns out, by just the right amount to compensate for the extra ITU horizontal stretch and return the aspect ratio to what it should be, or at least to the same DAR as the player was using.

yetanotherid
18th January 2011, 08:29
If my eyes aren't deceiving me...

01. non-ITU resize
02. ITU resize
03. ITU resize and cropped
04. Same as 03 but sized up.
05. Something close to non-ITU resize
06. non-ITU resize.

It's not really easy to guess which resize method is the correct one from those screen caps. It could be either. Any scenes with a nice round object in them. One which can be checked for roundness?

Dogway
18th January 2011, 08:37
I posted the RAW screenshot of the metro goldwin mayer for this same reason, as I couldn't find a good frontal round object. Im going to compare with another one similar in google images.
If non-ITU resize seems the correct, what kind of resize does powerDVD in last image?
And could you tell me exactly what do you mean with non-ITU resize?

This thread (http://forum.doom9.org/showpost.php?p=637718&postcount=13) discusses something similar, and Im sure that what Brother John said in post#10 (http://forum.doom9.org/showpost.php?p=1471839&postcount=10) is right, but I dont want to crop if I can fix things resizing or adding a custom PAR.

yetanotherid
18th January 2011, 09:01
And could you tell me exactly what do you mean with non-ITU resize?

So it does look different to the rest? I thought it was just me, or the player window was distorting my sense of perspective. I think it's non-itu(ish).

Now maybe you'll understand why I find thinking bout PAR way too hard, and why I encode anamorphically. As I said, after cropping I just let MeGUI do the math on the PAR and if later on I decide it's wrong it's easy enough to simply change it.
Square pixel encoding is often a different story though, because generally you resize to mod16 and possibly crop any extra pixels required to get you there without distorting the aspect ratio. And of course it'll be different cropping depending on the chosen resize method.
By resizing to mod16 dimensions after cropping though, and then encoding anamorphically, or by overcropping to mod16 dimensions (same cropping for both resize methods) and then encoding anamorphically you've not made any ITU/non-ITU specific resize decisions. Later on you can change the pixels to whatever shape takes your fancy and it won't make any difference (unless of course you required an exact 16:9 display aspect ratio for some reason, but generally most people don't fuss about it too much).

Dogway
18th January 2011, 09:11
I just want to know the REAL anamorphic ratio this film was encoded to, then the why of it (so I dont come here asking for the same). If by any matter I get to know that, later I can do my maths to crop, uncrop, resize or adding fancy PARs, always preserving the correct geometry which is what worries me most. Because Im not doing a 1:1 encode of the film, Im trying to get the most of it (restore, etc). in fact I hardly use MeGUI, only for muxing, encoding audio...
The 2 last images are what look correct to me. The rest is what my logic (and media player also) thought.

yetanotherid
18th January 2011, 09:19
what kind of resize does powerDVD in last image?
And could you tell me exactly what do you mean with non-ITU resize?

Non-ITU DVDs don't use the official "ITU" PAR. They simply use either 1.7777778 or 1.3333333. In my opinion, by far the majority of DVDs use the non-ITU method.

This thread (http://forum.doom9.org/showpost.php?p=637718&postcount=13) discusses something similar, and Im sure that what Brother John said in post#10 (http://forum.doom9.org/showpost.php?p=1471839&postcount=10) is right, but I dont want to crop if I can fix things resizing or adding a custom PAR.

"If you’re really after the »correct« AR and absolutely don’t want to take any chances, then always crop to 704 width."

Maybe I'm having a dumb day but it sounds wrong to me. I have no idea how you can crop to the same width while using two different resize methods and still end up with the same aspect ratio. 704 is generally used because 704x400 is as close to 16:9 as mod16 dimensions can get and 704 x 528 is exactly 4:3. Whichever resize method you use though, surely unless you crop in order to be able to resize to those dimensions without distorting the image then you're going to be distorting the image, and surely if you start from pixel shape "A" you're going to be cropping or distorting differently than if you started with pixel shape "B". Unless I'm seriously missing something.

You may find the the ITU resize gives you 704 x 400 while the non-ITU resize might get you closer to 704x416 (as an example) but I can't see how 704 is the non aspect ratio distorting, one size fits all width which fixes everything.

yetanotherid
18th January 2011, 09:31
I just want to know the REAL anamorphic ratio this film was encoded to, then the why of it (so I dont come here asking for the same).

You'd be better off trying to find the pot of gold at the end of the rainbow. ;) Have a look and take a guess. Sometimes, and very sometimes, the resize method will actually be mentioned in the little, bitty print on the back DVD cover, but don't hold your breath. It's one or the other though.... well at least in theory.... I sometimes wonder....

The only reason I'm fairly confident the non-ITU method is generally the resize method used it because I've got into the habit of comparing any AVI encodes I make from Bluray with the AVI encodes I originally made from the DVD, assuming of course I have DVD encodes. I haven't compared thousands, but so far I've found one (maybe two) which made me think "wrong resize method there". All my other non-ITU DVD encodes have an identical aspect ratio to the Bluray version.

The 2 last images are what look correct to me. The rest is what my logic (and media player also) thought.

Yeah you can only go by what looks right, just don't drive yourself mad trying to decide which it is as I have a couple of times. And you're not going to want to hear this, but I swear sometimes the resizing changes on the same disc. I don't even know if that's possible, maybe it's just a symptom of going mad.
I doubt the media player gave the resize method a thought. I'm pretty sure it uses the non-ITU resize method 100% of the time. I don't think there's any way for it to tell which method was used.

Dogway
18th January 2011, 09:31
01. non-ITU resize
02. ITU resize
03. ITU resize and cropped

Non-ITU DVDs don't use the official "ITU" PAR. They simply use either 1.7777778 or 1.3333333. In my opinion, by far the majority of DVDs use the non-ITU method.

So shouldn't the third example of post #11 (http://forum.doom9.org/showpost.php?p=1471956&postcount=11) be non-ITU resize?:
resize(852,480) that's 16:9.

yetanotherid
18th January 2011, 09:35
Sorry, I'm not sure I understand your last question.

yetanotherid
18th January 2011, 10:32
Well the first and last images look the same shape to me, and the ones in the middle all look the same too, only not the same as 01 and 06.

"So shouldn't the third point of post #11 be non-ITU resize? resize(852,480) that's 16:9."

Sorry, I think I posted some stupid a little while ago. This is why I try not to think about this stuff. Today is the most I've thought about it for consecutive minutes in a long time.
1.77777 and 1.33333 aren't the non-ITU pixel aspect ratios, they're the non-ITU display aspect ratio..... So I think the NTSC 16:9 display aspect ratio is actually 1.823169 rather than 16:9 and for PAL it's 1.823361... At least that's what MeGUI thinks.

So maybe my above resizing theory was mathematically flawed, but it probably still applies in principle, just not in a way I'll be able to get my head around at the moment (I'm very tired). I still think you're applying a different resizing method than the one your player is using, and the images themselves still look either horizontally squished or horizontally stretched to me (depending on your perspective) which generally means non-ITU and ITU resizing respectively.

I'd have to Google the actual pixel aspect ratios but I think I'm out of aspect ratio energy now. I'm sure someone else will be able to tell you what the non-ITU NTSC pixel aspect ratios are, but I'm in PAL land and I'm pretty sure I can only type pixel aspect ratio just this one last time today. Any more and my brain will melt.....

Dogway
18th January 2011, 10:37
Thanks nonetheless for the thinking, let me post some operations I was doing:

64/54= 1.185
1.185*720=853.33
853/480=1.777=16/9
(16/9)/(720/480)=1.185=64/54

maths are OK but it looks incorrect, the next one DOES look correct:
(16/9)/(716/468)=1.162
1.162*720=836.64

836x480 CORRECT*
1.74 ORIGINAL DAR

*Maybe it's not correct, now I see it vertical stretched o_O

I think this is a clear example of varying DAR
I have checked carefully and Im gonna stay with my original 64:54 872x480 resolution (example 5). Seems the most reasonable

2Bdecided
18th January 2011, 19:38
Sorry, I think I posted some stupid a little while ago. This is why I try not to think about this stuff. Today is the most I've thought about it for consecutive minutes in a long time.
1.77777 and 1.33333 aren't the non-ITU pixel aspect ratios, they're the non-ITU display aspect ratio.....They're DARs not PARs, but they're the intended DAR for ITU and non-ITU PAR - the only time they're not the intended DAR is when you have ITU PAR, but 720 pixels filled with video.

Without a real circle to look at, who knows what this really is?

Cheers,
David.

P.S. as always...
http://forum.doom9.org/showthread.php?p=1451277#post1451277
;)

Ghitulescu
18th January 2011, 21:58
I have to explain once more what DAR is.

Display Aspect Ratio.

The eye see the same, vertically and horizontally. In PC terms, a PAR of 1:1, in layman terms, a stick would have exactly the same length irrespective of being horizontal or vertical, and it's perceived as such.
40x30 pixels would look completely different on a EGA/CGA screen (see wikipedia for sucklings) than on a normal PC monitor.
Most people getting problems with AR are actually thinking that a pixel is, was and will always be quadratic.
Wake up, it's not. Stop saying 852x480 or 872x480, it's nothing. "Digital" PAL is 720x576 and it's perfectly 4:3 despite 720:576 is actually 5:4. So is 704x576, yet 704:576 = 1.222 or ~64/54.
NTSC and PAL work with non-quadratic pixels, like most inkjet printers. And their sizes are not really fixed, one can simply change the deflection values in the TV (EEPROM = service menu or physical potentiometers for really old sets).
The whole thing becomes more problematic as MPEG norms defines different parameters as the DVD norms, which again are different from analog NTSC/PAL standards.
Imagine that some (usually B-category) movies are telecined to tape (because the tape can be used for TV, too), then the tape is converted to DVD, maybe some video-processors are in the chain. Nobody knows the exact SAR/PAR of the image, even if using devices form the same company. But in the end DAR should be 4:3. And within some limits it is.

But strangely enough, most perfectionist questions come from people that normally don't give a damn on that their 16:9 TV sets distortely show 4:3 footage in fullscreen modus (1.78 vs 1.33), yet they argue about 64/54 versus 11/9, in other words 1.185 vs. 1.122, whereas some pixels are intentionally left blank and covered by the overscan.

That is my experience, anyway.

mike20021969
18th January 2011, 22:52
The eye see the same, vertically and horizontally.Unless I've misunderstood what you've said, that is incorrect.
Human's view the world in "widescreen". The peripheral vision of the eye is greater horizontally, than vertically.

Brother John
18th January 2011, 23:00
what kind of resize does powerDVD in last image?
Afaik all software DVD players use non-ITU PAR.

I just want to know the REAL anamorphic ratio this film was encoded to, then the why of it
Find a sufficiently large object in the movie that you are absolutely sure is perfectly round. Then measure it with different PARs applied and pick the one that’s closest to a perfect circle. That’s the only at least halfway definite solution. See Ghitulescu’s post why there might be a lot more possible values between ITU and non-ITU.

In practice you will not notice the difference. See your #27. You’re not even certain yourself in a direct comparison. The topic might be interesting to understand the details about aspect ratios. But for actually encoding video it’s close to a non-issue. The brain is too good at adapting to distortion, especially such a small one.


Maybe I'm having a dumb day but it sounds wrong to me. [...] but I can't see how 704 is the non aspect ratio distorting, one size fits all width which fixes everything.
After actually doing the calculation: you’re not alone. ... I’m sure there was a discussion about this somewhere ... Well, I guess I mixed something up. Sorry. Forget what I said.

So I think the NTSC 16:9 display aspect ratio is actually 1.823169 rather than 16:9 and for PAL it's 1.823361... At least that's what MeGUI thinks.
Yep, those are the numbers calculated with exact ITU PAR
PAL = 720 * (512/351) / 576
NTSC = 720 * (5760/4739) / 480
For the full PAR tables see here: http://forum.doom9.org/showthread.php?p=1058927#post1058927

By resizing to mod16 dimensions after cropping though, and then encoding anamorphically
I wouldn’t recommend that. One of the major reasons why we do anamorphic encodes is to avoid resizing. In almost all cases resizing to reach mod16 will hurt quality more than the efficiency loss from a non-mod16 resolution.

The peripheral vision of the eye is greater horizontally, than vertically.
You might be right. But then who uses his peripheral vision to watch movies? ;)

Dogway
19th January 2011, 01:16
For the full PAR tables see here: http://forum.doom9.org/showthread.php?p=1058927#post1058927
Im going to burn that post in my mind as hard as possible:)


You might be right. But then who uses his peripheral vision to watch movies? ;)

I think its said that 16:9 fills vision proportionally better (more psychovisually pleasant) than 4:3

I can try several PARs to check which one fits better (I think in the uploaded VOB there's a globe Earth Map, thats where I tested) but I got confused because the inusual black borders size, no full 720, nor 704...

yetanotherid
19th January 2011, 06:38
*Maybe it's not correct, now I see it vertical stretched o_O

It'd be interesting to know if it's possible/likely for different video on the same DVD to use different pixel aspect ratios. But yeah, it can drive you mad. What frustrates me... is the brain does seem to compensate quite well when it comes to a little aspect ratio distortion, so if you look at one resize method for a minute the other then looks wrong, look at the other for a minute and the first looks wrong instead.....
A few times in the past I've encoded both ways, walked away and then later on returned to open each version for a quick look, let my "gut" tell me what's right before my brain gets in the way, deleted one of them and tried not to think about it ever again.

yetanotherid
19th January 2011, 06:50
Most people getting problems with AR are actually thinking that a pixel is, was and will always be quadratic.
Wake up, it's not. Stop saying 852x480 or 872x480, it's nothing. "Digital" PAL is 720x576 and it's perfectly 4:3 despite 720:576 is actually 5:4. So is 704x576, yet 704:576 = 1.222 or ~64/54.

And here was me thinking we were already discussing the varying shape of DVD pixels??

But strangely enough, most perfectionist questions come from people that normally don't give a damn on that their 16:9 TV sets distortely show 4:3 footage in fullscreen modus (1.78 vs 1.33), yet they argue about 64/54 versus 11/9, in other words 1.185 vs. 1.122, whereas some pixels are intentionally left blank and covered by the overscan.

Seriously?? You think perfectionist questions come mainly from people who run 4:3 content stretched to 16:9 on their TVs and either don't care or don't notice, or on second thought is that a fairly silly generalisation? I mean, even if by some enthusiastic stretch of the imagination it could be considered true, how would you even know which way posters asking questions here happen to run 4:3 content fullscreen on their 16:9 monitors???

Dogway
19th January 2011, 06:53
I compared them side to side in avsp for hundred of frames (ITU, non-ITU, and the exotic example of the 2 last images). I specially tested 2 different round objects (spheres, so no perspective distortion introduced), and a few mostly trustful frames I found on google. That joined with common sense told me that here I can apply non-ITU 64:54 PAR on them, just like the row of examples from 3 to 5. It doesn't look awful in any frame like the ITU and exotic PAR did in a few frames. I have been several days checking, let's say I could be right, even if Im not.

What made my brain mess up was actually powerDVD displaying the "exotic" PAR 1.162, making me think Im missing something important.

Ghitulescu
19th January 2011, 08:59
Unless I've misunderstood what you've said, that is incorrect.
Human's view the world in "widescreen". The peripheral vision of the eye is greater horizontally, than vertically.

Yes! You're talking about the visual field.

If you or anyone else rotates the head so a skyscraper is horizontal, a ball will still be round. Should the metrics be different, like it is in the analog TV, it won't be round but egg-like. The objects won't change their shape ... 1 meter remains 1 meter.

The whole issue started with the first mechanical TV and continued through decades, as the "electronic" TV changed nothing to it, except that the mechanical line sweep is done electrically. The vertical axis is digital (625/525 discrete elements) while the horizontal axis is analog (and expressed in bandwidth). That's why every studio gear mentions its bandwidth, and only recently (since the PCs kicked in) started to mention lines of resolution.

The whole issue is a problem for people coming from the recent PC world, but not for those coming from the video world. As long as the output of the PC is back to tape (analog) the PAR/DAR issue (unless intentionally or accidentally screwed up) is completely transparent.

Ghitulescu
19th January 2011, 09:30
And here was me thinking we were already discussing the varying shape of DVD pixels??
I'm not dragging anyone into a PAR debate.
But when people say Hey, the Non-ITU looks ok but the ITU not, s/he also must say how. How did s/he see it, righly or wrongly? If it's on a modern PC (VGA and up), then the PAR is 1:1 and any image of say 640x480 would look perfect. To send this image of 640x480 to tape (eg VHS, but also Video8, Hi8, S-VHS, betamax etc.) the videocard must convert it into a SMPTE-compliant analog image, ie the 640 pixels would be transformed (dithered) into a maximal bandwith of 15.734 kHz (around 711 samples), the 480 pixels would be placed somewhere onto the visible 483 scanlines, additional lines will be added up to 525, the whole being taped and correctly displayed on any NTSC TV set.
Seriously?? You think perfectionist questions come mainly from people who run 4:3 content stretched to 16:9 on their TVs and either don't care or don't notice, or on second thought is that a fairly silly generalisation? I mean, even if by some enthusiastic stretch of the imagination it could be considered true, how would you even know which way posters asking questions here happen to run 4:3 content fullscreen on their 16:9 monitors???
That was my experience (one can also check the other posts of some users), like the common knowledge of policemen that eat doughnuts. Not every policeman eats them, but .... :p

Coming back, the DVD was created for analog TV, and apart from MiniDV, it was the best that happened to it, for the consumer market. It was not designed for PC, for PC it was its co-pendant, the DVD-ROM designed. Yet people still try to adapt it and become frustrated because they don't understand why is this. To make things more complicated, some use the same file to feed the TV via a mediatank/multimediaplayer, whose ability to understand PAR/DAR/ITU issues can only be guessed. There's no problem playing a DVD on a DVDplayer analogically connected to a SD TV. The wheels are still round (within the TV tolerances).

yetanotherid
19th January 2011, 10:57
Dogway,
Well I guess we got there in the end. Sorry if I confused the issue for a bit not explaining myself properly. Looking back I referred to a non-ITU pixel aspect ratio as 1.777777 a few times which no doubt made no sense to you as it doesn't make sense. I should have said 1.185185 so I edited a couple of earlier posts so anyone reading the thread in the future won't think I'm a complete idiot. ;-)

Anyway..... ITU = 875x480, Non-ITU = 853x480. I think we're on the same page now?
Of course neither give you a mod16 width. Where my brain loses interest is when it comes to working out the extra cropping. For example the ITU method really wants to be 880x480 (mod16), which means you're resizing to 880x482. Well that one wasn't too hard, I don't think. If you lost a row of pixels top and bottom and resized to 880x480 I think that'd give you the least aspect ratio distortion. For the non-ITU resize it'd be 848x480. But you can't just crop 5 pixels off to take you from 853 to 848 because you're cropping the original anamorphic pixels, so I think it works out cropping 4 pixels from the sides would be about right. Well, I guess it's not too hard when you're not resizing down to 720 etc.

Maybe I'm lazy but that's why I use HDConvertToX. I don't always use it to convert but for the square pixel stuff it's easy to work out the desired width, let HDConvertToX pick the height and then I just fiddle with the cropping till the aspect ratio distortion is down to almost zero. The only choice to make is whether to tick the ITU resize box or not. Then I use the resulting cropping for the conversion, even if it's using another program....

yetanotherid
19th January 2011, 11:27
But when people say Hey, the Non-ITU looks ok but the ITU not, s/he also must say how. How did s/he see it, righly or wrongly?

Do you have a link to the relevant law there?
Surely when I look at an encode and think to myself "hey, that person's head looks like someone's grabbed it and squished it down a little" I don't have to explain how I know they really weren't doing an impression of Stewie from Family Guy and ITU resizing was the wrong choice? As you said, it might be the right one or the wrong one, but unless there's a round object in the video to check, how else do you explain why you're seeing it?

Do you require the resizing to mod16 dimensions also be factored into the explanation? I'd be willing to bet I've seen a lot of AVIs which were resized "ITU" then resized to a 720, 704 width etc, so effectively the video was "ITU stretched", then "squished to 704", giving you an ITU resize that's more like a non-ITU resize, but really isn't. Maybe that's why incorrect ITU resizing isn't always as obvious as I think it should be. Just a theory for which I have no further explanation, so I hope there's no law..... ;)

Dogway
19th January 2011, 12:46
Of course neither give you a mod16 width. Where my brain loses interest is when it comes to working out the extra cropping.

I don't get too obsessed with mod16 resolutions. Its mainly for aesthetics and "just in case", besides it doesn't give you much room for geometry preservation. Instead I use mod4 852x480, 876x480, etc the small distortion percentage is minimal and forgiveable. But if by any mean you DO care for that minimal deviation, you can always compensate it by a custom PAR. But you must be aware that at playback the image will adjust (resize) to the defined PAR, rendering your 1:1 square pixel intention (when resizing to 852x480 for example) meaningless, so really wouldnt had been a bad idea to encode anamorphic in first place (720x480)

Ghitulescu
19th January 2011, 13:14
Do you have a link to the relevant law there?

What law? You may want to say maybe norm or standard or agreement or recommendation.

But I am convinced that you have no idea what DAR is. As I said before, I stop here, open your own thread on DAR if you want to continue it. :rolleyes:

yetanotherid
19th January 2011, 14:00
What law? You may want to say maybe norm or standard or agreement or recommendation.

Do you even follow your own posts? You made a statement:
"But when people say Hey, the Non-ITU looks ok but the ITU not, s/he also must say how."
So I asked why is that, how do you prove an opinion, or was it just a silly statement?

But I am convinced that you have no idea what DAR is. As I said before, I stop here, open your own thread on DAR if you want to continue it. :rolleyes:

After two days of discussing resizing non-square pixels in this thread and you then popping in to enlighten us all with your knowledge of the DVD pixel not being square, I really can't decide whether your claim I've not grasped a simple concept such as DAR shows your own grasp on reality is far more tenuous, or whether you're simply being a child.
Just in case you hadn't noticed, THIS thread is entitled "aspect ratio", but feel free to start your own thread on "The History of the TV Pixel, A Fascinating Journey to Analogue Tape"... if you think you'll find someone who cares.

Ghitulescu
19th January 2011, 14:45
Do you even follow your own posts? You made a statement:
"But when people say Hey, the Non-ITU looks ok but the ITU not, s/he also must say how."
So I asked why is that, how do you prove an opinion, or was it just a silly statement?
How would I know how a stranger (that is probably 10000 km away from me) sees the image? His image? I deducted he sees it on a modern PC, which by default has a PAR of 1, and when he means 853x480 pixels he implicitly assumes that the DAR is 16:9. As 853.33333333 / 480 is 16/9, assuming the width of a pixels is equal to its height. If he sees a PAL image of 720x576 (directly copied from a DVD) he won't see the DAR of 4:3 or 16:9, he will see the SAR (of 5:4). He didn't say milimeters, he said pixels. Should s/he be aware of PAR, s/he would have said 853 Hpixels x 480 Vpixels.
Because DAR has absolutely nothing to do with the pixels.
After two days of discussing resizing non-square pixels in this thread and you then popping in to enlighten us all with your knowledge of the DVD pixel not being square, I really can't decide whether your claim I've not grasped a simple concept such as DAR shows your own grasp on reality is far more tenuous, or whether you're simply being a child.
Just in case you hadn't noticed, THIS thread is entitled "aspect ratio", but feel free to start your own thread on "The History of the TV Pixel, A Fascinating Journey to Analogue Tape"... if you think you'll find someone who cares.
People that do not care will always be confused about PAR, DAR, SAR and stuff and they will always get into conversion problems. Leave the computer for what it was designed to do, processing data, and use the things appropriately. No video standard I know was designed with personal computers in mind, implicitly or explicitly. As this thread shows, the HW players have no problems at all doing things a SW fails -> http://forum.doom9.org/showthread.php?t=159158&highlight=avatar. If I would have enough time I would find for each and one aspect of A/V processing such a thread.

Should nevertheless the user be determined to convert a DVD into a space-oriented format to be watched on a computer, I strongly suggest her/him to do some visual tests with various settings (PAR and cropping) before the real encoding step.

2Bdecided
19th January 2011, 16:01
Yep, those are the numbers calculated with exact ITU PAR
PAL = 720 * (512/351) / 576
NTSC = 720 * (5760/4739) / 480
For the full PAR tables see here: http://forum.doom9.org/showthread.php?p=1058927#post1058927There's nothing exact about the "exact" numbers there. They're more wrong than the common approximations.

The absolutely correct ITU PAL PAR is 1150/1053=1.09211775878
The very common and good enough approximation is 12/11=1.0909090909
The supposedly "exact" number above is 128/117=1.09401709402

I'll be the first to admit that this discrepancy doesn't matter - it's one pixel - but it irks me to see someone say "this more complex method is more exact" when the dead simple and far more common method is actually more exact!


Reality isn't that complex. I'll provide the link yet again
http://forum.doom9.org/showthread.php?p=1451277#post1451277
...and another...
http://forum.doom9.org/showthread.php?p=1100187#post1100187

Cheers,
David.

2Bdecided
19th January 2011, 16:05
Because DAR has absolutely nothing to do with the pixels.Well it does on the square pixel PC displays most of us are using to type messages onto this forum. You can do the measurement it in pixels or cm and the result will still be the same - because when you divide one number by another, the units cancel ;)

(I know PC displays don't have to be square pixel, but most are. The days of non-square-pixel LCD "H"DTVs are over too, so I don't know who is buying non-square-pixel displays that work with PCs these days)


No video standard I know was designed with personal computers in mind, implicitly or explicitly.FLV? ;)

Cheers,
David.

Ghitulescu
19th January 2011, 16:12
FLV? ;)
And this corresponds to which SMPTE or ITU-R or EBU? :rolleyes:

Groucho2004
19th January 2011, 16:49
And this corresponds to which SMPTE or ITU-R or EBU? :rolleyes:

How is this related to your statement?

Ghitulescu
19th January 2011, 17:10
In case you read only the last line, please notice that my answer was a comment to a comment to a statement of mine.

I'll repeat the statement for your comfort - no video standard was ever created with the PC in mind. One would not find any reference to the PC platform, nor limitations thereof, in any of SMPTE/IEE/JIT/AES/EBU/ITU-R and so on, concerning video and/or audio. Of, course, there are common features a PC shares with RISC CPUs and GPUs used in standalones or studio gear.

But this seems to go off topic. ;)

The topic was: what to use?

The answer is: it depends. Someone provided a list of DAR/PAR values, for some usual cases involving a DVD and its possible origin. Also whether cropping/resizing is needed or not. This list is somewhere in this forum, in thread concerning DAR and PAR.

Brother John
19th January 2011, 19:07
There's nothing exact about the "exact" numbers there. They're more wrong than the common approximations.

The absolutely correct ITU PAL PAR is 1150/1053=1.09211775878
The very common and good enough approximation is 12/11=1.0909090909
The supposedly "exact" number above is 128/117=1.09401709402
Interesting ... so those two half lines make another difference. I’ve never heard about that. Then let me do a:
post#31.replace("exact", "somewhat approximately exactish");

Do you maybe have any links or other resources with more details about that issue? Google didn’t turn up anything besides your posts here on Doom9 and I’d really like to wrap my head around this completely.

Ghitulescu
19th January 2011, 20:26
Interesting ... so those two half lines make another difference. I’ve never heard about that. Then let me do a:
post#31.replace("exact", "somewhat approximately exactish");

In this post of yours that you refer to few posts above you did commit a series of errors. - http://forum.doom9.org/showthread.php?p=1058927#post1058927

First of all, that SAR is another name for PAR. This seems to be a common mistake. Even your calculations contradict you.

No, the pixels in the sample (new term) or storage (old term) frame have nothing to do with the pixels in the displaying device (PAR/DAR). Now that HDTV is a reality, the PAR of any FullHD display is 1:1, and the A/V chain would translate those 720x480/x576 pixels into 1920x1080 ones.

DAR governs what is displayed, SAR governs what is stored/recorded. PAR refers to display.

The second one are the values. They are approximations, the good ones are deducted from timings (remember, the analog standards have no pixels, the only "digital" thing being the number of scanlines, and the teletext of course :p) and bandwidth.

The third one is difficult to be spotted because people generally interpret the images. They know that the top/bottom bars (matting) or the pillarbox sidebars are not part of the image. And because of this, they got tricked into thinking that a spaghetti western has a DAR of 2.35:1. False! The DAR cannot be anything else than 16:9 or 4:3. For 2.35:1 to be achieved, black bars are added (and for 16:9 the image would be anamorph encoded, and the bars would be thinner). One sees this if the image has subtitles - on a proper DAR these cannot be outside of the image :p:p:p:p:p:p:p:p:p:p like it's usually the case.