obs-zoom-to-mouse icon indicating copy to clipboard operation
obs-zoom-to-mouse copied to clipboard

Unable to cover full bounding box on super ultra wide

Open Hezkore opened this issue 1 year ago • 8 comments

My monitor is 5120 x 1440, so the image is very wide. I have my bounding box for the desktop capture set to 1920 x 1080 and "Scale to inner bounds". But when I zoom in it doesn't actually cover the entire bounding box, it only covers what it already renders.

Is there a way to fix this? I've attached a video demonstrating this, notice the black bars at the top and bottom.

https://github.com/BlankSourceCode/obs-zoom-to-mouse/assets/1727541/84b1119f-cc48-4add-968b-0363ef5ab1f3

Hezkore avatar Feb 15 '24 00:02 Hezkore

I'm not exactly sure how the "Set manual source position" option works, but I've modified the code so that it at least makes sense to me.

By changing these lines: https://github.com/BlankSourceCode/obs-zoom-to-mouse/blob/53dc1a5425c2a96db34fb34aae40283f84bf1720/obs-zoom-to-mouse.lua#L786-L789

To:

local new_size = {
    width = monitor_override_w / zoom.zoom_to,
    height = monitor_override_h / zoom.zoom_to
}

I get the expected result when setting "Monitor Width" to 5120 and "Monitor Height" to 1440, then "Width" to 1920 and "Height" to 1080 in the "Set manual source position" menu.

I've attached a video demonstrating this.

https://github.com/BlankSourceCode/obs-zoom-to-mouse/assets/1727541/c29df7ed-af0d-47dd-978e-30c9caed2e25

Hezkore avatar Feb 15 '24 01:02 Hezkore

@Hezkore That's a great workaround. I suspect the change may break some scenarios depending on the sort of zoom source and/or crop values it might have, but I'm glad you got it working for your case.

To be honest, there are so many different sizes and positions in the script now that even I get confused about what they all do. I probably need to overhaul them at some point.

Thanks for posting this, I'm going to point some others at it to see if the same workaround fixes their issue.

BlankSourceCode avatar Feb 18 '24 16:02 BlankSourceCode

worked

ibrah3m avatar Feb 19 '24 16:02 ibrah3m

Worked for me too! Thank you for sharing :)

estebandelpino avatar Feb 19 '24 17:02 estebandelpino

I might cry. Finally a zoom script that works. Thank you so much for posting this workaround for ultrawide.

chriszuko avatar Apr 25 '24 18:04 chriszuko

I think I have a similar issue. My monitor size is 3840x2160, but I have it scaled down to 1920x1080 for readability in my settings. My zoom doesn't quite zoom in on the cursor, nor does it follow it. Here is a gif

2024-05-09_17-53-34 (2)

transform setting 2024-05-09_17-57-25

Script setting 2024-05-09_17-57-10

MajorWookie avatar May 09 '24 21:05 MajorWookie

Update: I was able to resolve my issue.

  1. Checked my Video setting. Made the base (Canvas) Resolution the same as my monitor resolution. 2024-05-09_23-04-17

  2. Set manual source potion to the below 2024-05-09_23-07-20

MajorWookie avatar May 10 '24 03:05 MajorWookie

Thank you for your assistance @Hezkore ! I'm using a monitor with a resolution of 1960x1080, and I often record in a vertical screen format (9:16 aspect ratio). When I zoom in, the screen correctly follows the movement of the mouse cursor. However, upon zooming out, the screen reverts to its original position instead of remaining centered around the current mouse location. Ideally, I would like the screen to stay centered on the mouse cursor's position after zooming out.

gnyuan avatar Jul 18 '24 17:07 gnyuan