Unlocking Aspect Ratio

HandBrake for Mac 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
honter
Posts: 2
Joined: Thu Feb 10, 2022 9:18 am

Unlocking Aspect Ratio

Post by honter »

I'm working in 1.4.2 and cannot for the life of me find a way to unlock the aspect ratio to keep it from scaling. I want to stretch the video horizontally as I have in earlier versions but cannot find any checkboxes like "maintain aspect ratio" or "keep aspect ration" to click off. The DVD I believe is anamorphic. Storage size says 720x480 and Display Size says 640x480. Aspect Ratio says 4:3. in Dimensions Window. I also no longer see controls like "Loose." I've tried setting all to "Off" or "Custom" but if I change the height, the width automatically scales with it. I can't seem to unlock the aspect ratio. I put log file below but it is irrelevant. My issue is just the interface and finding the right settings and controls. Thanks.

Steps to reproduce the problem N/A:

HandBrake version 1.4.2:

Mac OS Mojave 10.14.6:

HandBrake Activity Log ***required*** (see How-to get an activity log)

Code: Select all

[23:03:16] 1 job(s) to process
[23:03:16] Starting Task: Encoding Pass
[23:03:16] job configuration:
[23:03:16]  * source
[23:03:16]    + /Volumes/Video/Home Videos/LACHSA/Preview Night 2012-12-08/Preview Night 2012-12-08 (Pt 1).mkv
[23:03:16]    + title 1, chapter(s) 1 to 9
[23:03:16]    + container: matroska,webm
[23:03:16]    + data rate: 7369 kbps
[23:03:16]  * destination
[23:03:16]    + /Volumes/Video/Home Videos/LACHSA/Preview Night 2012-12-08/Preview Night 2012-12-08 (Pt 1).mp4
[23:03:16]    + container: MPEG-4 (libavformat)
[23:03:16]      + chapter markers
[23:03:16]  * video track
[23:03:16]    + decoder: mpeg2video 8-bit (yuv420p)
[23:03:16]    + filters
[23:03:16]      + Comb Detect (mode=3:spatial-metric=2:motion-thresh=1:spatial-thresh=1:filter-mode=2:block-thresh=40:block-width=16:block-height=16)
[23:03:16]      + Decomb (mode=39)
[23:03:16]      + Framerate Shaper (mode=2:rate=27000000/450000)
[23:03:16]        + frame rate: 29.970 fps -> peak rate limited to 60.000 fps
[23:03:16]      + Crop and Scale (width=720:height=456:crop-top=6:crop-bottom=18:crop-left=0:crop-right=0)
[23:03:16]        + source: 720 * 480, crop (6/18/0/0): 720 * 456, scale: 720 * 456
[23:03:16]    + Output geometry
[23:03:16]      + storage dimensions: 720 x 456
[23:03:16]      + pixel aspect ratio: 1 : 1
[23:03:16]      + display dimensions: 720 x 456
[23:03:16]    + encoder: H.265 (libx265)
[23:03:16]      + preset:  slow
[23:03:16]      + options: strong-intra-smoothing=0:rect=0:aq-mode=1
[23:03:16]      + profile: main
[23:03:16]      + level:   auto
[23:03:16]      + quality: 24.00 (RF)
[23:03:16]      + color profile: 6-1-6
[23:03:16]  * audio track 1
[23:03:16]    + decoder: English (AC3) (2.0 ch) (192 kbps) (track 1, id 0x1)
[23:03:16]      + bitrate: 192 kbps, samplerate: 48000 Hz
[23:03:16]    + mixdown: Stereo
[23:03:16]    + encoder: AAC (Apple AudioToolbox)
[23:03:16]      + bitrate: 320 kbps, samplerate: 48000 Hz
[23:03:16]  * audio track 2
[23:03:16]    + decoder: English (AC3) (2.0 ch) (192 kbps) (track 1, id 0x1)
[23:03:16]      + bitrate: 192 kbps, samplerate: 48000 Hz
[23:03:16]    + AC3 Passthru
[23:03:16] sync: expecting 107477 video frames
x265 [info]: HEVC encoder version 3.5+1-f0c1022b6
x265 [info]: build info [Mac OS X][clang 13.0.0][64 bit] 8bit+10bit+12bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
x265 [info]: Main profile, Level-3 (Main tier)
x265 [info]: Thread pool created using 8 threads
x265 [info]: Slices                              : 1
x265 [info]: frame threads / pool features       : 3 / wpp(8 rows)
x265 [warning]: Source height < 720p; disabling lookahead-slices
x265 [info]: Coding QT: max CU size, min CU size : 64 / 8
x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra
x265 [info]: ME / range / subpel / merge         : star / 57 / 3 / 3
x265 [info]: Keyframe min / max / scenecut / bias  : 30 / 300 / 40 / 5.00 
x265 [info]: Lookahead / bframes / badapt        : 25 / 4 / 2
x265 [info]: b-pyramid / weightp / weightb       : 1 / 1 / 0
x265 [info]: References / ref-limit  cu / depth  : 4 / on / on
x265 [info]: AQ: mode / str / qg-size / cu-tree  : 1 / 1.0 / 32 / 1
x265 [info]: Rate Control / qCompress            : CRF-24.0 / 0.60
x265 [info]: tools: limit-modes rd=4 psy-rd=2.00 rdoq=2 psy-rdoq=1.00
x265 [info]: tools: rskip mode=1 signhide tmvp deblock sao
[23:03:16] sync: first pts video is 0
[23:03:16] sync: "Chapter 1" (1) at frame 1 time 0
[23:03:16] sync: first pts audio 0x1 is 0
[23:03:16] sync: first pts audio 0x1 is 0
[23:06:41] sync: "Chapter 2" (2) at frame 10846 time 32567535
[23:10:56] sync: "Chapter 3" (3) at frame 21796 time 65450385
[23:15:06] sync: "Chapter 4" (4) at frame 35566 time 106801695
[23:17:15] sync: "Chapter 5" (5) at frame 45856 time 137702565
[23:20:22] sync: "Chapter 6" (6) at frame 58306 time 175089915
[23:23:32] sync: "Chapter 7" (7) at frame 67726 time 203378175
[23:27:34] sync: "Chapter 8" (8) at frame 81751 time 245495250
[23:32:19] sync: "Chapter 9" (9) at frame 99361 time 298378080
[23:34:33] reader: done. 1 scr changes
[23:34:33] work: average encoding speed for job is 57.178562 fps
[23:34:34] comb detect: heavy 157 | light 489 | uncombed 106832 | total 107478
[23:34:34] decomb: deinterlaced 157 | blended 489 | unfiltered 106832 | total 107478
[23:34:34] vfr: 107478 frames output, 0 dropped and 0 duped for CFR/PFR
[23:34:34] vfr: lost time: 0 (0 frames)
[23:34:34] vfr: gained time: 0 (0 frames) (0 not accounted for)
[23:34:34] ac3-decoder done: 112068 frames, 0 decoder errors
[23:34:34] ac3-decoder done: 112068 frames, 0 decoder errors
[23:34:34] mpeg2video-decoder done: 107478 frames, 0 decoder errors
[23:34:34] sync: got 107478 frames, 107477 expected
[23:34:34] sync: framerate min 29.970 fps, max 29.970 fps, avg 29.970 fps
x265 [info]: frame I:    397, Avg QP:22.05  kb/s: 1935.93 
x265 [info]: frame P:  24732, Avg QP:25.16  kb/s: 844.35  
x265 [info]: frame B:  82349, Avg QP:30.43  kb/s: 156.37  
x265 [info]: Weighted P-Frames: Y:8.8% UV:6.7%
x265 [info]: consecutive B-frames: 0.7% 0.9% 10.1% 46.8% 41.6% 

User avatar
Ritsuka
HandBrake Team
Posts: 1650
Joined: Fri Jan 12, 2007 11:29 am

Re: Unlocking Aspect Ratio

Post by Ritsuka »

What are you trying to do? The height is not 480 because crop is enable and set to 6 top and 18 bottom.
honter
Posts: 2
Joined: Thu Feb 10, 2022 9:18 am

Re: Unlocking Aspect Ratio

Post by honter »

The activity log is irrelevant because it's about what I'm trying to do vs. what I did. I'm attaching a screen shot. With Anamorphic turned off and Cropping on None, if I try to change the height, the width changes as well -- and vice versa. I cannot seem to unlock the aspect ratio from scaling.

For example, right now the scaled size says 720x480. If I lower the height to 478, then the width changes to 718. This used to be easy with a check box to unlock the scaling but I can't seem to find it in the most recent versions of Handbrake. Thanks.

I can't seem to create an image preview here but here's a link to a screenshot.
https://drive.google.com/file/d/1y3-HT2 ... sp=sharing
User avatar
Ritsuka
HandBrake Team
Posts: 1650
Joined: Fri Jan 12, 2007 11:29 am

Re: Unlocking Aspect Ratio

Post by Ritsuka »

I still don't understand why you would want to distort the video, but anyway here's how you could do it:
Disable "Optimal Size", disable "Automatic" display size. Set the height, set the display size.
Snowdog
Posts: 6
Joined: Tue Jan 05, 2021 9:53 am

Re: Unlocking Aspect Ratio

Post by Snowdog »

I have exactly the same issue. I have a 16:9 clip that's essentially been rendered 4:3 & is therefore squashed. (I assume the DVD I took it from had been mastered in an anamorphic widescreen format.)

I'd like to re-render it in 16:9 by changing the output dimensions.

I've unchecked the boxes suggested in the previous post but whatever dimension I put into the height or width box, the other dimension changes accordingly. I just cannot for the life of me figure out how to "unlock" the seemingly fixed aspect ratio of 4:3 & make it 16:9.
Deleted User 11865

Re: Unlocking Aspect Ratio

Post by Deleted User 11865 »

I was actually having that issue myself the other day, it took me at least a good 15 minutes to figure out how to get the exact size I wanted. I already forgot what I did :roll:

IIRC, back in the day, the whole point of "custom" anamorphic was to give the user full control over everything in that mode (which is really useful when the input is indeed "broken" and needs to be fixed); code that adjusts width when changing heigh and vice-versa really defeats that purpose, IMO. It also makes the behavior more complex and could probably lead to unexpected inconsistencies?

I really think it would be useful to either make "distorting" (but really, meaning un-distorting here) the video much easier, or to document how to achieve the desired results with anamorphic Custom much more thoroughly (https://handbrake.fr/docs/en/latest/adv ... video.html as it currently stands is very little help, sadly).

For example, here's something that makes no sense to me:

(0) let's say I have a 1920x1080 video, cropping set to none

(1) I configure a preset with:
--> Resolution Limit: Custom: 1024 x 1024
--> Anamorphic: Custom
--> Pixel Aspect: 1 : 1
--> Scaled Size: 1024 x 1024
--> Optimal Size: unchecked
--> Allow Upscaling: unchecked
--> Display Size: 1024 x 1024

(2) I save the preset: everything stays as-is (seems logical)

(3) I change the pixel aspect to 4 : 1
--> the Display Size remains 1024 x 1024 but the Scaled/Storage Size changes to 256 x 1024

(4) I then immediately save a new preset
--> Scaled/Storage Size then jumps back to 1024 x 1024 with a Display Size of 4096 x 1024

…that feels inconsistent and/or confusing to me :-)
Snowdog
Posts: 6
Joined: Tue Jan 05, 2021 9:53 am

Re: Unlocking Aspect Ratio

Post by Snowdog »

Well, after I posted I did read, in another thread, that it's not possible to do what I want to do. *shrugs*

I guess I can go do it in After Effects, but it's a lot more grief.

I just want to have a movie file that's the right shape so that when I look at it on devices other than my TV - that is to say, devices that won't automatically adjust it from 4:3 out to 16:9 - it appears correctly.
User avatar
Ritsuka
HandBrake Team
Posts: 1650
Joined: Fri Jan 12, 2007 11:29 am

Re: Unlocking Aspect Ratio

Post by Ritsuka »

Disable "Optimal Size", disable "Automatic" display size. Set the height, set the display size.
Deleted User 11865

Re: Unlocking Aspect Ratio

Post by Deleted User 11865 »

Ritsuka wrote: Tue Dec 20, 2022 7:56 am Disable "Optimal Size", disable "Automatic" display size. Set the height, set the display size.
That doesn't work here.

Starting with a misflagged source (720x480 storage, 640x480 display) that needs correction to 16:9

(1) scan source

(2) start with Very Fast 480p30 preset

(3) set anamorphic to Custom

(4) disable Optimal Size

(5) Disable Automatic display size

(6) heigh is already correct at 480

(7) (a) increase Display Width with button: nothing happens
(7) (b) set display width via text box, tab out or press return: display width returns to 640
(7) (c) set Pixel Aspect to 32/27, Storage Size gets changed to 540 x 480 and Display Size remains 640 x 480

The only way to actually get 720x480 storage 853/480 display is to save a preset (I'm guessing the preset gets saved, then loaded via libhb code that behaves in a more consistent/expected manner).

Last night I though the behavior was just overly complex, but maybe there's actually a bug somewhere? Shouldn't (in anamorphic Custom and with Automatic Display Size unchecked) Display Width and Pixel Aspect only ever interact with each other and leave Storage Size completely alone?
User avatar
Ritsuka
HandBrake Team
Posts: 1650
Joined: Fri Jan 12, 2007 11:29 am

Re: Unlocking Aspect Ratio

Post by Ritsuka »

I think you don't need to set anamorphic to custom, it should stay set to automatic, I meant to say to disable the "Automatic" checkbox after the final size. The GUI should behave the same way, it mostly use the same code to calculate the size, but there could be a bug somewhere, https://github.com/HandBrake/HandBrake/issues/3885 for example.
Deleted User 11865

Re: Unlocking Aspect Ratio

Post by Deleted User 11865 »

Ah, anamorphic Automatic does work for this, indeed. Although for 720x480, it won't let you get the "exact" PAR like Custom is able to when you save/load a preset (32:27 instead of 853:720).
Post Reply