Hi guys, there is a bug that occurs when using the script to capture and zoom in on window capture of a browser tab.
I was trying to use "zoom on any source" and selected a window capture of my open browser (Chrome). It woked and it zooms fine, HOWEVER any adjustments made to the size of the source (cropping via ALT+dragging, resizing, transforming, etc.) are NOT carried over.
As soon as you switch scenes, all your resizing adjustments go out the window and the window capture is full size again.
ALSO using the script prevents from being able to use CLIENT AREA on a windowed source of a browser (in my example).
Normally, I select window capture, choose my open browser window, then pick 'Client Area' to only capture that. With your script running, however, toggling that option has no effect.
What I'm trying to do:
I'm on a widescreen monitor. One third of that is used up by my open Chrome browser. I want to capture only the client area of that browser tab and then zoom and follow within only that client area.
Additional note:
Doing a display capture is NOT an option because that shows superfluous elements i.e. the mouse cursor or tab preview thumbnails that are all filtered out when using window capture and client area option.
The script works best with display capture sources, everything else is a best guess on the part of the script and so need a bunch of manual tweaking.
When you select a source from the `Zoom Source` dropdown, the script stores the current state of that source's transform and crop settings at that point. When you change scenes, close OBS, remove the script (or any other way you might stop the script), it returns the source settings back to those stored original values. This is to prevent issues with things getting messed up with your layout like it can with certain other approaches to zooming.
With that, there is also an issue with non-display capture sources where OBS gives incorrect values for the transform crop, so I disabled that bit of the code. If you want to try having the script use those crop values anyway, you will need to edit the script. Look for the comment
-- Non-Display Capture sources don't correctly report crop values
(around line 572) and comment out the code that sets each value to zero (aka. prefix the next 4 lines each with
--
). That will have the script save/load the crop values for non-display capture sources.
The "supported" way to do it I put in the readme, but what you have to do is use a manual crop/pad filter set to non-relative instead. So, you would select <None> on the Zoom Source dropdown (so that the transform goes back to original), then add a new crop/pad filter to the source, uncheck Relative, set the x/y/width/height of that filter to be whatever you want. And finally reselect the source in the dropdown to save those new values. Though even then the script might act odd because its still not a display source (ymmv).
For the client area not working, does it do anything if you uninstall the script? I don't know what browser you are using, but most modern ones don't have separate client and non-client areas anymore, they override and render their own window so clicking the 'client area' checkbox doesn't change anything as both sizes reported by Windows are the same (maybe you aren't on Windows and it works differently?). Not sure how the script could be interfering with that unless it's done in OBS via the transform, but I'd need to repro it on my end to be able to see what's going on.
If you can manage to crop the source to your liking (while Zoom Source is set to <None>), you'll probably also need to use the `Set manual source position` option. The script won't be able to auto calculate the position of the window source (since OBS doesn't say). You'll need to figure out the exact X/Y pixel coordinates of the left/top of the part of the window you have shown as well as the Width/Height of the cropped part, along with the size of your monitor that the window is displayed on. Once you set those the script should (hopefully) zoom correctly on the cropped part.
Thanks for trying the script.