How to determine DAR

HandBrake for Windows support
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
mike20021969
Regular User
Posts: 88
Joined: Sat Apr 11, 2009 2:28 pm

How to determine DAR

Post by mike20021969 » Sun Mar 03, 2013 12:39 pm

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?

musicvid
Veteran User
Posts: 3289
Joined: Sat Jun 27, 2009 1:19 am

Re: How to determine DAR

Post by musicvid » Sun Mar 03, 2013 4:17 pm

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!

mike20021969
Regular User
Posts: 88
Joined: Sat Apr 11, 2009 2:28 pm

Re: How to determine DAR

Post by mike20021969 » Sun Mar 03, 2013 5:44 pm

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... ?

User avatar
s55
HandBrake Team
Posts: 9544
Joined: Sun Dec 24, 2006 1:05 pm

Re: How to determine DAR

Post by s55 » Sun Mar 03, 2013 6:15 pm

Haven't done any work on it. Custom is still buggy.

mike20021969
Regular User
Posts: 88
Joined: Sat Apr 11, 2009 2:28 pm

Re: How to determine DAR

Post by mike20021969 » Sun Mar 03, 2013 6:55 pm

s55 wrote:Haven't done any work on it. Custom is still buggy.
No worries. Thanks.

User avatar
s55
HandBrake Team
Posts: 9544
Joined: Sun Dec 24, 2006 1:05 pm

Re: How to determine DAR

Post by s55 » Sun Mar 03, 2013 6:59 pm

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.

Post Reply