Okay I was able to get it working by unselecting "relative" -- I still needed to add padding to the source, so I did that by setting the crop/pad filter width and height to 2320x1480 (i.e., 1920x1080 + 400).
The only issue now is that this padding shows up when zooming in, so there is this black space around the perimeter of the canvas.
It looks like the error message in the script is backwards, its warning you about non-relative crop/pad filter, when really that's the kind of filter it actually wants. Sorry about that, I need to swap the wording.
For the padding showing up, I expect this is an existing issue that I haven't managed to fix yet, where it cannot calculate the zoom crop offset automatically. The workaround for this is to edit the script slightly for your specific scenario. If you open the obs-zoom-to-mouse.lua file in a text editor (notepad will work), and then edit the values for the crop.x and crop.y calculations around
line 789 :
Lua:
crop.x = math.floor(clamp(0, (zoom.source_size.width - new_size.width), crop.x))
crop.y = math.floor(clamp(0, (zoom.source_size.height - new_size.height), crop.y))
You'll want to change the 0s (for the left/top amount) and a value after the new_size_width/height (for the right/bottom). Something like this might work for you (to add 200 to each side assuming your padding is centered):
Lua:
crop.x = math.floor(clamp(200, (zoom.source_size.width - new_size.width - 200), crop.x))
crop.y = math.floor(clamp(200, (zoom.source_size.height - new_size.height - 200), crop.y))
That should prevent the zoom from showing the padding outside of the area. Though you may need to play around with the numbers. Let me know if that works, if so, I think I will just add some new settings to the script to let people customize these values without needing to edit the file all the time.
Also, zooming on my second monitor doesn't seem to be behaving correctly. I assume the solution might be duplicating the script with different manual position for the second monitor?
I suspect so, yes. I had an idea for letting people select multiple different zoom sources each with their own set of positions/crops/zoom/speeds by using a custom filter that you applied to the sources that you wanted to zoom, rather than having a single set of settings you put in the script window. But I had some issues with OBS crashing when I created those magic filters from lua, so I put in on hold. The current workaround is to duplicate the script and rename it.