If you want your OBS view to smoothly follow your mouse cursor and zoom into the exact part of the screen you are working on, OBS Mouse Follower makes that setup much easier.
This script is designed for creators, teachers, developers, and anyone who wants to make screen recordings or live demos feel more dynamic. Instead of manually moving sources around during a recording, you can let OBS automatically follow your cursor, zoom in when needed, and even switch between monitors.
Repository: https://github.com/TIBI4/OBS-Mouse-Follower
Important: this version is built for OBS Studio on Windows.
What OBS Mouse Follower does
Once loaded into OBS, the script:
- creates or reuses a dedicated
Mouse Followerscene - creates one
Display Follower Nsource for each detected monitor - follows your mouse cursor smoothly
- lets you toggle zoom in and out
- lets you select a rectangle to zoom into a specific area
- automatically switches displays when your cursor moves across monitors
That means you can build a screen-recording workflow that feels much more polished without having to manually crop or reposition your monitor source while recording.
Step 1: Download the script
Go to the repository and download the file obs-mouse-follower.lua.
Unlike older OBS scripts that relied on Python, this one runs as a Lua script inside OBS, so you do not need to install Python for this setup.
If you are downloading from GitHub, keep the script in a folder where you can easily find it later.
Step 2: Load the script in OBS
Open OBS Studio and go to Tools > Scripts.
In the Scripts window, press the + button and load obs-mouse-follower.lua.
After you load it, the script will begin preparing the OBS side of the setup for you. It uses a scene called Mouse Follower and creates monitor capture sources for the displays it detects.
If you use more than one monitor, this is where the script starts becoming especially useful, because it can manage separate display sources and switch between them based on your cursor position.
Step 3: Configure the script settings
Once the script is loaded, click it in the OBS Scripts panel to see its settings.
You will find options such as:
Show cursorFollow speed (%)Follow border (%)Zoom easing speed (%)Lock sensitivity (ms)Display switch delay (ms)Display switch rectangle modeTick interval (ms)Auto-lock on direction reversalKeep OBS aspect ratio on rectangle select- per-display disable options for monitors you do not want the script to use
If you are not sure where to start, these values are a good baseline:
Follow speed (%): 10Zoom easing speed (%): 20Follow border (%): 5Keep OBS aspect ratio on rectangle select: enabled
These settings usually give a smooth result without making the camera movement feel too fast or too aggressive.
Step 4: Set up your hotkeys
Now go to File > Settings > Hotkeys.
Look for the hotkeys added by OBS Mouse Follower and assign keys for:
Toggle mouse followToggle zoomSet rectangle
These are the core controls for using the script during recording or streaming.
Here is how they work:
Toggle mouse followenables or disables the automatic cursor-follow behaviorToggle zoomswitches between the full-screen view and your zoomed viewSet rectanglelets you define a zoom area by holding the hotkey for the first corner and releasing it on the opposite corner
That last one is especially useful during tutorials, code walkthroughs, design reviews, or any presentation where you want to draw attention to one part of the screen without losing clarity.
Step 5: Start using the Mouse Follower scene
Switch to the Mouse Follower scene in OBS and test the behavior.
Move your cursor around the screen and watch how the crop follows it. If zoom is enabled, the camera will stay focused on the active area instead of showing the entire display all the time.
If you use multiple monitors, move your cursor from one screen to another and the script can switch to the display your mouse is currently on. This makes it much easier to record workflows that span more than one monitor without building a complicated manual scene setup.
When you want to focus on a specific part of the screen, use the rectangle hotkey to define the area. When you want to return to a wider view, use the zoom toggle.
Why this is useful for tutorials and demos
A lot of screen recordings fail for a simple reason: the viewer does not know where to look.
With OBS Mouse Follower, your recording becomes easier to follow because the frame naturally stays centered on the action. That can make a big difference when you are:
- teaching software
- recording coding tutorials
- demonstrating UI or UX work
- showing spreadsheets, dashboards, or admin panels
- streaming workflows across multiple monitors
Instead of constantly editing zooms in post-production, you can handle much of that movement live while recording.
Final thoughts
OBS Mouse Follower is a lightweight way to make screen captures feel more intentional and easier to watch. Setup is simple, the controls are practical, and the automatic mouse-follow behavior can make tutorials and demos look much more professional.
If you want to try it, grab the script from the repository:
https://github.com/TIBI4/OBS-Mouse-Follower
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
You were right. I could try to add support for Ubuntu, but I don’t have an Ubuntu machine ATM. Did you find another solution for this?
Not working. Nothing under description.
What is not working? Sorry.
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.
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.