Request: 'Custom' option for 'Force Aspect Ratio'

Started by Cornelius, March 03, 2023, 10:40:17 PM

Previous topic - Next topic

Cornelius

Hi all!

Would it be possible to extend the options for 'forcing' the aspect ratio of videos (Output Format // Configure), preferably with a Custom option?
I use MKV exclusively and this has quite limited choices from the drop-down menu.
Any chance of boosting this incredibly useful function?

(Massive thanks to the developer for the continued work on this brilliant application!)

eumagga0x2a

Quote from: Cornelius on March 03, 2023, 10:40:17 PMWould it be possible to extend the options for 'forcing' the aspect ratio of videos (Output Format // Configure), preferably with a Custom option?

This is exactly what the menu entry "Aspect Ratio (DAR): Derived from display width" is for.

Cornelius

Ah!
Well, i'm showing my ignorance once again.
So you can set a particular width and force the aspect ratio that way?

I'll have a play around with that . . . Many thanks for the reply.

alexstorm

#3
Corn,

Output Format / Configure has some quick format options 4:3, 16:9; 18:9 and 64:27.
16:9 is very handy if you have top and bottom black bars in your video.  Then changing the video Apect Ratio height back to Widescreen will probably work fine.

The other values are:
18:9 = Aspect ratio = 2  which is maybe less than 1% of movies.
64:27 = 2.37037... which is inbetween 2.35 and 2.39.  This means the result will always be slightly off.  Most people won't notice.  To me, it's obviously wrong, just looking at it.

So then if you want to be more exact you can use the Derived from Display Width.  In that case you take the current video height times the correct aspect ratio to get a new Display Width value.

For example if your video with no black bars is 1280 x 480, but it should have 2.35 Aspect Ratio (you can look it up on imdb.org if you are a member, it will be at the bottom of the page.)

480 * 2.35 = 1128

That works as long as the answer is even.  But you are shrinking your original width in this example and that will blur some pixel quality.  Since the conversion is immediate, the resulting quality is not optimal.

===

There is another place to tweak the DAR setting.  To be clear you are only changing the Meta data in the file that tells the player to present the video in a different aspect ratio.  You have not actually rescaned / reencoded the video to a new height.  It is still the wrong height.  The other approach would be to use a resize filter and reencode.  That loses a generation from your original video, but you would end up with a video that is the correct format.

To set the DAR another way, a little more precisely you can also go here:
Video Output / Configure / Output 1 tab / Custom / Pixel Aspect Ratio

This is set as 1:1 to start.

The trick here is to change exactly to a ratio you need to multiple the original, incorrect aspect ratio into the new, correct aspect ratio.  You cannot just set the pixel ratio to the one you want.  It doesn't work that way.

That's confusing. To make it more difficult, you can only enter whole, even numbers in the custom fields.

For example: if your video is squashed with pixel measurments of 1280 x 480.  The original film is Aspect Ratio 2.35. 
1280 / 2.35 = 544.6809
So, a new height of 544 or 545 would be pretty close.
Here are the two problems.
1) You cannot use an odd height. Encoders just won't work.
2) You cannot use a fraction, any number with decimal points

So how do you find the new custom ratio to change the wrong squashed video to look pretty close to the correct 2.35?
To get that:  480 / 544.6809 = 0.8812
So you can try setting the custom pixel ratio to 882 : 1000
480 * 1000 / 882 = 544.2177
That would be pretty close.  It would be 2 pixels off on a 4K screen.

It turns out that you could reduce it to:
141:160 - but that has an odd number, so it's not allowed.
282:320 - This works.

What you are doing is taking 480 and making it into 544.6809 by doing this:
480 * 320 / 282

I'm sure you are now saying all this math is too much and it's not worth it.

I have two answers for you:

A) I have a calculator online that does this for you. https://www.producerelease.com/blu-ray/parcalc.htm#wrapprcalc
Be aware if you use this Output custom ratio adjustment, you have to use the actual video height and not include any top and bottom black bars, if there are any.

B) Since the DAR edited metadata aspect ratio change only plays back through a 3rd party video player like VLC, you might want to instead, remove any top and bottom black bars with a crop filter and then resize the video to the correct format.  Then the new video will play back correctly inside any browser or mobile player.  To put it another way, if you make the effort to change the meta data in the file aspect ratio setting, the video will still play back squashed on a lot of hardware and probably still sqaushed, if you cast the video to a TV.

Anyway, the page link listed above goes into all the options.
Hope that helps.

Cornelius

Well, thanks and appreciated, but I hope you didn't type all that out just for me!

I just needed a way to correct the diplayed AR of videos, and most of the technical stuff washes over me unfortunately (I tend to learn what I need to when I need it and then forget it almost immediately).
Looks like the option I needed was always there but I didn't realise it, but problem solved anyway.