Page 1 of 1

How to determine DAR

Posted: Sun Mar 03, 2013 12:39 pm
by mike20021969
After cropping a video in HandBrake, I just cannot work out what the DAR should be.

Without cropping and using 16x9 (1.78) I get this:

720 x 576 (SAR) = 1024 (DAR) (576 x 16/9 = 1024). Wonderful stuff.

As video has black borders on three sides, I crop them away and get this new SAR:

696 x 568.

If I apply 568 x 16/9, that gives 1010 (1009.7).

Using that figure for the DAR gives distorted video.

How do I work OUT the correct DAR figure after cropping?

Re: How to determine DAR

Posted: Sun Mar 03, 2013 4:17 pm
by Deleted User 13735
You have cropped nonproportionally, so using 16:9 will stretch (distort) in one dimension, in this case horizontally.

You need to use the PAR (pixel aspect) which in your case appears to be 1.42 (1024/720).
696 x 1.42 = 990, so your new display size is 990x568, which is not quite 16:9, but is the correct PAR, so it will not distort.

Or, you could crop additional vertical pixels and get a true 16:9 DAR.
990/16x9 = 556 rounded even. So your new cropped source dimensions would be 696x556 instead of 568.

Don't exceed the maximum horizontal square pixel dimension of 990 if your cropped source is 696.

Resolving only to nearest even pixel assumes mod 2, which may not necessarily work on all players and devices, so going to the nearest 4 would be your next best choice.

For all those who may have forgotten, fifth grade math is fun!

Re: How to determine DAR

Posted: Sun Mar 03, 2013 5:44 pm
by mike20021969
musicvid wrote: You need to use the PAR (pixel aspect) which in your case appears to be 1.42 (1024/720).
696 x 1.42 = 990, so your new display size is 990x568, which is not quite 16:9, but is the correct PAR, so it will not distort.
This explains exactly what I was going wrong with. Thanks.

I did also ask a similar question previously. I apologise for asking again.

But as I rarely use HandBrake now due to being so "manual" (loads of empty boxes that need filling) instead of more "automatic" (like VidCoder), so I forget what to do.

After viewing my previous ask, I may use it more, if it does what I hope it will do, when this gets finished:

Quote from s55 "Just a heads up that the custom anamorphic implementation is not quite finished".

That was from the beginning of the year. I wonder how this is progressing... ?

Re: How to determine DAR

Posted: Sun Mar 03, 2013 6:15 pm
by s55
Haven't done any work on it. Custom is still buggy.

Re: How to determine DAR

Posted: Sun Mar 03, 2013 6:55 pm
by mike20021969
s55 wrote:Haven't done any work on it. Custom is still buggy.
No worries. Thanks.

Re: How to determine DAR

Posted: Sun Mar 03, 2013 6:59 pm
by s55
I will sort it out eventually, when I can muster up some motivation to do so. I suspect it's not too far away, but it's probably best avoiding it for the time being. Waste of time if it screws up.