Resource icon

Zoom and Follow 0.1.0

time2innov8

New Member
I have successfully installed the script on two laptops and also used version 28 and 29 of OBS however I get the same issue on both systems. When I enable the script for the first time on a source that is correctly identified in the log it zooms into a portion of the display. However when I disable the script the display does not zoom back out, subsequent triggers of the script using the hotkey causes the source to be zoomed into a 1 pixel square which when toggled returns only to the first zoom level. I cannot successfully zoom in and out of my source.
Has anyone else experienced this issue, is there something obvious I have missed?
 

NexusFred

New Member
Hello, I just install the script but I have some questions

1) Is it normal that I don't have the "Select the monitor to use for zoom" option?
1683125952246.png



2) The script do not zoom into the source but just crop and center it! Do I miss a setting somewhere?
1683125960452.png

1683125969399.png


Configuration Software:
Windows 11 22H2
OBS Studio 29.1.0
Python 3.10

Configuration Hardware:
CPU I9 12900K
GPU NVIDIA RTX 3070Ti (8Go)
2 Monitors EIZO
 

intrinsic75

New Member
Hi, so I am not to familiar with Python. but I did follow all the instruction with the installation, getting the pip install pywinctl and screeninfo done correctly I think... but when I add the script to OBS this is what I get and I have no idea if I did something wrong as it doesnt allow me to use said script. :\ Any help would be appreciative ^^
 

getphily

New Member
Hi, so I am not to familiar with Python. but I did follow all the instruction with the installation, getting the pip install pywinctl and screeninfo done correctly I think... but when I add the script to OBS this is what I get and I have no idea if I did something wrong as it doesnt allow me to use said script. :\ Any help would be appreciative ^^
I think I'm in the same boat.

I did a screen capture to demonstrate my issue.

https://share.descript.com/view/Vug5nbqpkEB
 

Joni8829

New Member
Hey, sooo Uhh I tried downloading, and the properties doesn't show up, and I get this error:

[zoom_and_follow_mouse.py] Traceback (most recent call last):
[zoom_and_follow_mouse.py] File "C:/Program Files/obs-studio/data/obs-plugins/frontend-tools/scripts\zoom_and_follow_mouse.py", line 14, in <module>
[zoom_and_follow_mouse.py] import pywinctl as pwc
[zoom_and_follow_mouse.py] File "C:\Users\Joni8829\AppData\Local\Programs\Python\Python36\lib\site-packages\pywinctl\__init__.py", line 4
[zoom_and_follow_mouse.py] from __future__ import annotations
[zoom_and_follow_mouse.py] ^
[zoom_and_follow_mouse.py] SyntaxError: future feature annotations is not defined
 

lcalder

Member
Ever since upgrading to OBS v29, and now OBS v30 as well, the mouse zoom and follow script seems to fail to respond to the zoom hotkey after the first 3 to 10 presses. If I exit OBS and restart, then it will work again for some (limited) number of hotkey presses. It seems that if the zoom follow hotkey is pressed once or twice that this problem will occur much sooner. I love this plugin, but it sure is difficult to use when so unreliable. Sometimes it zooms in and then stops responding to the hotkey, and I am stuck with the zoomed-in screen and can't show the unzoomed portion of the screen unless I relaunch, and during an online presentation this can be quite frustrating.
 

caseymccuan

New Member
Hey, sooo Uhh I tried downloading, and the properties doesn't show up, and I get this error:

[zoom_and_follow_mouse.py] Traceback (most recent call last):
[zoom_and_follow_mouse.py] File "C:/Program Files/obs-studio/data/obs-plugins/frontend-tools/scripts\zoom_and_follow_mouse.py", line 14, in <module>
[zoom_and_follow_mouse.py] import pywinctl as pwc
[zoom_and_follow_mouse.py] File "C:\Users\Joni8829\AppData\Local\Programs\Python\Python36\lib\site-packages\pywinctl\__init__.py", line 4
[zoom_and_follow_mouse.py] from __future__ import annotations
[zoom_and_follow_mouse.py] ^
[zoom_and_follow_mouse.py] SyntaxError: future feature annotations is not defined
I'm getting something very similar. PLEASE HELP!


[zoom_and_follow_mouse.py] Traceback (most recent call last):
[zoom_and_follow_mouse.py] File "C:\Program Files/obs-studio/data/obs-plugins/frontend-tools/scripts\zoom_and_follow_mouse.py", line 7, in <module>
[zoom_and_follow_mouse.py] import pymonctl as pmc
[zoom_and_follow_mouse.py] File "C:\Users\mccuacl\AppData\Local\Programs\Python\Python310\lib\site-packages\pymonctl\__init__.py", line 21, in <module>
[zoom_and_follow_mouse.py] from ._main import (getAllMonitors, getAllMonitorsDict, getMonitorsCount, getPrimary, findMonitor, findMonitorInfo,
[zoom_and_follow_mouse.py] File "C:\Users\mccuacl\AppData\Local\Programs\Python\Python310\lib\site-packages\pymonctl\_main.py", line 11, in <module>
[zoom_and_follow_mouse.py] from ._structs import DisplayMode, ScreenValue, Size, Point, Box, Rect, Position, Orientation
[zoom_and_follow_mouse.py] File "C:\Users\mccuacl\AppData\Local\Programs\Python\Python310\lib\site-packages\pymonctl\_structs.py", line 8, in <module>
[zoom_and_follow_mouse.py] from typing_extensions import TypedDict
[zoom_and_follow_mouse.py] ModuleNotFoundError: No module named 'typing_extensions'
 

albertocv

Member
Today the script stopped working. I got an error for a missing file.
So I removed it and reinstalled it.

Now the script options are correctly showing up in my settings. But instead of zooming, the source is cropped (as shown in the attachment). Follow doesn't work. And I can't disable the zoom.

I have two monitors. I selected a screen capture as the source and it is zooming on the correct monitor.

What should I do?
 

Attachments

  • SNAG-0008.png
    SNAG-0008.png
    81.5 KB · Views: 28

dgghita

New Member
Today the script stopped working. I got an error for a missing file.
So I removed it and reinstalled it.

Now the script options are correctly showing up in my settings. But instead of zooming, the source is cropped (as shown in the attachment). Follow doesn't work. And I can't disable the zoom.

I have two monitors. I selected a screen capture as the source and it is zooming on the correct monitor.

What should I do?
I installed it yesterday and at first it did what you show. Then I set my Window Capture source to "Stretch to the width of bounds" bounding box type and that solved it for me.

But today it started breaking. missing the hotkeys, then zooming in 2x or so at some point and making that the default (so zooming again will zoom EVEN MORE and in the top left corner too), not being able to recover the Window Capture source back to see the whole thing EVEN AFTER deleting the script and restarting OBS. Other times, it's milder, and the zooming back out just resets the window slightly offset. The only solution is to disable the script, create a new Window Capture source and copy and paste the transform from the old to the new one.

The weirdest thing was that, at one point, I wouldn't see the zoom in OBS but I would see it in the window itself (and following the mouse and everything, just not in OBS), that was pretty wild. I think it went away after I refreshed the page or restarted the browser (it was a Chrome window and I was cropping just the webpage, I tried both with and without "Client Area").

I suspect it's because I have a 4k monitor (TV actually) that's set to 250% scaling, so maybe it will work if I do a full restart of my PC. It worked great yesterday but I left the PC open overnight with the TV off so technically the monitor got disconnected and reconnected and maybe some weird DPI stuff happened.

It's still a bit scary that even if you get rid of the plugin script altogether, restart OBS, restart the captured window, reset all transforms, it never truly goes away until you just delete the source and create a new one. Also, OBS gives a crash message when you close it.

I didn't mean this as a rant, I really appreciate the incredible work that went into making this plugin (it's over 1k lines of code!), but I tried to be explicit in the hope that it would give some hints.

My OS is Win 11 22H2
My OBS is 29.1.3
My Python is 3.11 (I tried with 3.10 too but it just didn't start)
 

dgghita

New Member
I installed it yesterday and at first it did what you show. Then I set my Window Capture source to "Stretch to the width of bounds" bounding box type and that solved it for me.

But today it started breaking. missing the hotkeys, then zooming in 2x or so at some point and making that the default (so zooming again will zoom EVEN MORE and in the top left corner too), not being able to recover the Window Capture source back to see the whole thing EVEN AFTER deleting the script and restarting OBS. Other times, it's milder, and the zooming back out just resets the window slightly offset. The only solution is to disable the script, create a new Window Capture source and copy and paste the transform from the old to the new one.

The weirdest thing was that, at one point, I wouldn't see the zoom in OBS but I would see it in the window itself (and following the mouse and everything, just not in OBS), that was pretty wild. I think it went away after I refreshed the page or restarted the browser (it was a Chrome window and I was cropping just the webpage, I tried both with and without "Client Area").

I suspect it's because I have a 4k monitor (TV actually) that's set to 250% scaling, so maybe it will work if I do a full restart of my PC. It worked great yesterday but I left the PC open overnight with the TV off so technically the monitor got disconnected and reconnected and maybe some weird DPI stuff happened.

It's still a bit scary that even if you get rid of the plugin script altogether, restart OBS, restart the captured window, reset all transforms, it never truly goes away until you just delete the source and create a new one. Also, OBS gives a crash message when you close it.

I didn't mean this as a rant, I really appreciate the incredible work that went into making this plugin (it's over 1k lines of code!), but I tried to be explicit in the hope that it would give some hints.

My OS is Win 11 22H2
My OBS is 29.1.3
My Python is 3.11 (I tried with 3.10 too but it just didn't start)
Just to add, I restarted and enabled the debug log. When I press the hotkey, it does nothing but says the following:

[zoom_and_follow_mouse.py] Update source size
[zoom_and_follow_mouse.py] self.source_name: Chrome Window Capture
[zoom_and_follow_mouse.py] Source loaded successfully: window_capture
[zoom_and_follow_mouse.py] Source Type: window_capture
[zoom_and_follow_mouse.py] I don't know how it gets here.
[zoom_and_follow_mouse.py] Mouse position: Point(x=2370, y=980)
[zoom_and_follow_mouse.py] Zoom: True

Then on pressing again, it just says:

[zoom_and_follow_mouse.py] Zoom: False
 

dgghita

New Member
I'm getting something very similar. PLEASE HELP!


[zoom_and_follow_mouse.py] Traceback (most recent call last):
[zoom_and_follow_mouse.py] File "C:\Program Files/obs-studio/data/obs-plugins/frontend-tools/scripts\zoom_and_follow_mouse.py", line 7, in <module>
[zoom_and_follow_mouse.py] import pymonctl as pmc
[zoom_and_follow_mouse.py] File "C:\Users\mccuacl\AppData\Local\Programs\Python\Python310\lib\site-packages\pymonctl\__init__.py", line 21, in <module>
[zoom_and_follow_mouse.py] from ._main import (getAllMonitors, getAllMonitorsDict, getMonitorsCount, getPrimary, findMonitor, findMonitorInfo,
[zoom_and_follow_mouse.py] File "C:\Users\mccuacl\AppData\Local\Programs\Python\Python310\lib\site-packages\pymonctl\_main.py", line 11, in <module>
[zoom_and_follow_mouse.py] from ._structs import DisplayMode, ScreenValue, Size, Point, Box, Rect, Position, Orientation
[zoom_and_follow_mouse.py] File "C:\Users\mccuacl\AppData\Local\Programs\Python\Python310\lib\site-packages\pymonctl\_structs.py", line 8, in <module>
[zoom_and_follow_mouse.py] from typing_extensions import TypedDict
[zoom_and_follow_mouse.py] ModuleNotFoundError: No module named 'typing_extensions'
try this in an admin prompt:

pip install typing_extensions

Mine got installed when I did "pip install pywinctl", but I guess it can be different. There's a requirements.txt on the github page, check that for all the dependencies, although in my case I also needed "pip install pypiwin32" and a restart of OBS.
 

albertocv

Member
try this in an admin prompt:

pip install typing_extensions

Mine got installed when I did "pip install pywinctl", but I guess it can be different. There's a requirements.txt on the github page, check that for all the dependencies, although in my case I also needed "pip install pypiwin32" and a restart of OBS.
It worked!
I already installed the requirements. But I didn't have pypiwin32.
How did you find out it's necessary?
 

dgghita

New Member
It worked!
I already installed the requirements. But I didn't have pypiwin32.
How did you find out it's necessary?
There was some other python error it was giving me on startup (which I forgot by now) and I googled that and found it.

Glad it's working for you now, my setup died after a day and I still have no clue why. First it slightly changed the positioning of the window when zooming out, then it only zoomed out to about 50%, then it stopped working altogether. I'm still trying to figure out why. (EDIT: Seems to work if I create a blank new Profile + Scene Collection, there is hope!)
 
Last edited:

albertocv

Member
There was some other python error it was giving me on startup (which I forgot by now) and I googled that and found it.

Glad it's working for you now, my setup died after a day and I still have no clue why. First it slightly changed the positioning of the window when zooming out, then it only zoomed out to about 50%, then it stopped working altogether. I'm still trying to figure out why. (EDIT: Seems to work if I create a blank new Profile + Scene Collection, there is hope!)
I wasn't getting errors at startup.
 

triphvzvrd

New Member
I GOT IT TO WORK ON MAC M1 MAX!!!!
or so i thought
Python version 3.11 any -- other version didn't want to work or install
and OBS version 29.1.3


now the Hotkeys will not respond and they here is the script from the log
[zoom_and_follow_mouse.py] self.source_name: macOS Screen Capture
[zoom_and_follow_mouse.py] Source loaded successfully: screen_capture
[zoom_and_follow_mouse.py] Source Type: screen_capture
[zoom_and_follow_mouse.py] Apple Silicon
[zoom_and_follow_mouse.py] data: {'type': 0, 'application': 'com.google.Chrome'}
[zoom_and_follow_mouse.py] Only one monitor cached
[zoom_and_follow_mouse.py] Updating stored dimensions to match monitor's dimensions
[zoom_and_follow_mouse.py] Dimensions did not change
[zoom_and_follow_mouse.py] 3456.0, 2234.0, 0.0, 0.0
[zoom_and_follow_mouse.py] Scale: 2.0
[zoom_and_follow_mouse.py] Mouse position: Point(x=957, y=586)

[zoom_and_follow_mouse.py] Zoom: True


Im not sure what im doing wrong at all
 

gagansuie

New Member
try this in an admin prompt:

pip install typing_extensions

Mine got installed when I did "pip install pywinctl", but I guess it can be different. There's a requirements.txt on the github page, check that for all the dependencies, although in my case I also needed "pip install pypiwin32" and a restart of OBS.
Im stilling having issues with this setup.

Im live here if anyone wants to help out. :)
 
Top