OBS Mouse Follower Tutorial

OBS Mouse Follower Tutorial

In this tutorial I’m going to explain how to follow your mouse and make zoom ins and zoom outs using the script I made for you in 5 steps.

Follow and zoom your mouse in OBS with this script!

Attention: This script has been tested only on Windows OS for now.

  • Step 1: Install Python 3.6.8 (or any 3.6.x) from the official Python website.
    • Scroll down that site and find the Files title. You will see a table in there with all the different Python versions per OS.
    • Download Python 64 bits version or 32 bits version depending on your system, and run the file. You will see a file path below Install Now. Write it down, as this will be used later!
  • Step 2: Download and add Mouse Follower Script to OBS.
    • Go to The Script Repository and download OBS Mouse Follower Script, then decompress it wherever you want.
    • Open OBS, then Tools > Scripts > Python Settings and set the Python Install Path to the file path you got in Step 1.
    • Now got to Tools > Scripts > Python Settings > Scripts and press the + button under Loaded Scripts, and add OBS Mouse Follower.py from its location.
  • Step 3: Configure the script and recommended settings.
    • Next to the Loaded Scripts, you will find all your imported script’s configurations, so you need to select OBS Mouse Follower.py and you will see all the settings it has.
    • Set Max x size to your display’s width in pixels. Do the same with Max y size for the height.
    • Recommended settings for Follow and Zoom speed percentage is 10.
    • Very recommended settings for Keep aspect ratio on select rectangle is Check.
    • Select your screen source.
image-1
  • Step 4: Configure your monitor source.
    • Right click your source and then Transform > Stretch to screen.
  • Step 5: Know how to use the hotkeys and set them.
    • Go to File > Settings > Hotkeys.
    • Configure:
      – Set rectangle is VERY important. With it, you will draw an invisible rectangle. Just start pressing the hotkey for the first point of the rectangle, and release the hotkey when you finished your rectangle.
      – Toggle mouse follow to stop/start following the mouse.
      – Toggle zoom to show full screen or just the selected rectangle.
      – Undo rectangle set to set the camera to the previous rectangle.
      – Redo rectangle set to set the camera to the un-done rectangle set.
image-2
  • Have fun!

6 thoughts on “OBS Mouse Follower Tutorial”
  1. Usefull script, but in Ubuntu + OBS 27.1.3 there is no Python setting section in tools scripts window. In addition, this error are in script log.
    It seems that this script work only in windows. (I see windll in the error).

    [OBS Mouse Follower.py] Traceback (most recent call last):
    [OBS Mouse Follower.py] File "/home/ms/Documents/vedio/obs/OBS-Mouse-Follower/OBS Mouse Follower.py", line 3, in
    [OBS Mouse Follower.py] from ctypes import windll, Structure, c_long, byref
    [OBS Mouse Follower.py] File "/usr/lib/python3.8/ctypes/__init__.py", line 7, in
    [OBS Mouse Follower.py] from _ctypes import Union, Structure, Array
    [OBS Mouse Follower.py] ImportError: /usr/lib/python3.8/lib-dynload/_ctypes.cpython-38-x86_64-linux-gnu.so: undefined symbol: PyFloat_Type
    [OBS Mouse Follower.py] Traceback (most recent call last):
    [OBS Mouse Follower.py] File "/home/ms/Documents/vedio/obs/OBS-Mouse-Follower/OBS Mouse Follower.py", line 3, in
    [OBS Mouse Follower.py] from ctypes import windll, Structure, c_long, byref
    [OBS Mouse Follower.py] File "/usr/lib/python3.8/ctypes/__init__.py", line 7, in
    [OBS Mouse Follower.py] from _ctypes import Union, Structure, Array
    [OBS Mouse Follower.py] ImportError: /usr/lib/python3.8/lib-dynload/_ctypes.cpython-38-x86_64-linux-gnu.so: undefined symbol: PyFloat_Type
    [OBS Mouse Follower.py] Traceback (most recent call last):
    [OBS Mouse Follower.py] File "/home/ms/Documents/vedio/obs/OBS-Mouse-Follower/OBS Mouse Follower.py", line 3, in
    [OBS Mouse Follower.py] from ctypes import windll, Structure, c_long, byref
    [OBS Mouse Follower.py] File "/usr/lib/python3.8/ctypes/__init__.py", line 7, in
    [OBS Mouse Follower.py] from _ctypes import Union, Structure, Array
    [OBS Mouse Follower.py] ImportError: /usr/lib/python3.8/lib-dynload/_ctypes.cpython-38-x86_64-linux-gnu.so: undefined symbol: PyFloat_Type

  2. I have three monitors. I’m capturing the middle monitor. The mouse isn’t followed except in a narrow band on the left side of the middle monitor. If I move the mouse to the right monitor, the zoom rectangle moves to the right as expected, but obviously, the mouse cursor is no longer in the target display.

    1. I get what you try to achieve. I made this work for one screen only. Maybe it should work with more than 1 monitor.

      For this version, what you want, won’t work. But I’ll do my best to make it available for more monitors.

Leave a Reply

Your email address will not be published. Required fields are marked *