# Zoom, Follow Mouse & More
By Edoardo Guzzi
⚠️ This is a third-party script for OBS Studio.
It is NOT developed, maintained, or endorsed by the OBS Project.
---
## Description
Zoom, Follow Mouse & More is an advanced Lua script for OBS Studio that adds dynamic zooming and smooth mouse tracking to any valid video source.
It is designed for tutorials, coding streams, presentations, live demos, and any workflow where highlighting parts of the screen is essential.
The script includes animated transitions, multi-monitor support, anti-flicker logic, hotkey control, and fully configurable advanced parameters.
---
## Features
- Smooth animated zoom in / zoom out
- Mouse-follow tracking with adjustable smoothing
- Multi-monitor support
- Anti-flicker deadzone and threshold system
- Scene-aware transitions
- Cross-platform support (Windows / macOS / Linux)
- Fully configurable advanced settings
- Debug mode with detailed logging
---
## Requirements
- OBS Studio 30.0.0 or higher
- Recommended: OBS 32.0.0+
- Lua 5.1 (bundled with OBS)
---
## Installation
1. Download `zoom-follow-mouse-and-more-eg.lua`
2. Open OBS Studio
3. Go to Tools → Scripts
4. Click the "+" button and select the file
5. Assign hotkeys for:
- Toggle Zoom
- Toggle Follow
---
## IMPORTANT – Source Setup
Before activating zoom:
1. Select your source
2. Press CTRL + F (Fit to Screen)
This ensures correct mouse-to-crop mapping.
After fitting, you may still crop or resize the source manually — the script will continue working correctly.
---
## Main Settings
- Zoom Value (1.1 – 100)
- Zoom In Duration (1 – 60000 ms)
- Zoom Out Duration (1 – 60000 ms)
- Follow Speed (0.01 – 1.0)
- Enable Debug Mode
---
## Advanced Settings
Performance:
- Update Interval (8–100 ms)
- Mouse Cache Duration (4–32 ms)
Anti-Flickering:
- Mouse Deadzone (1–10 px)
- Crop Update Threshold (1–10 px)
- Crop Edge Threshold (1–20 px)
Scene Transitions:
- Scene Transition Duration (100–1000 ms)
Fallback Monitor Resolution:
- Default Monitor Width
- Default Monitor Height
---
## Troubleshooting
Zoom not activating:
- Ensure the source has valid dimensions
- Press CTRL + F before enabling zoom
Flickering:
- Increase Mouse Deadzone
- Increase Crop Update Threshold
- Increase Crop Edge Threshold
High CPU usage:
- Increase Update Interval
Enable Debug Mode and check:
Tools → Scripts → Script Logs
---
# Changelog
## 2.1.0 — 2025
- Rewritten zoom & follow engine using a state-machine animation system
- Fixed-endpoint interpolation (no per-frame recalculation)
- Improved first-click reliability
- Center-point follow system (no zoom drift)
- Removed legacy “Zoom Speed” slider
- Zoom In / Out durations moved to main settings
- Expanded limits:
- Zoom up to 100×
- Animation duration up to 60000 ms
---
## 2.0.2 — 2025
- Increased maximum zoom value
- Improved guidance on using high-resolution sources
- Clarified Fit-to-Screen requirement
---
## 2.0.1 — 2025
- Added additional valid video source types for macOS and Linux
- Fixed “No valid video source found” detection issues
---
## 2.0.0 — 2025 (Major Refactor)
- Complete code rewrite
- Performance optimizations (FFI caching, mouse caching)
- Anti-flickering engine
- Fully configurable parameters
- Improved validation and error handling
- Modular architecture
- Improved resource cleanup
- Enhanced debug logging
- Edge and corner handling logic
- OBS 32.0.0+ API compliance
---
## 1.1.0
- Initial release
---
## License
GNU General Public License v3.0
---
## Author
Edoardo Guzzi
By Edoardo Guzzi
⚠️ This is a third-party script for OBS Studio.
It is NOT developed, maintained, or endorsed by the OBS Project.
---
## Description
Zoom, Follow Mouse & More is an advanced Lua script for OBS Studio that adds dynamic zooming and smooth mouse tracking to any valid video source.
It is designed for tutorials, coding streams, presentations, live demos, and any workflow where highlighting parts of the screen is essential.
The script includes animated transitions, multi-monitor support, anti-flicker logic, hotkey control, and fully configurable advanced parameters.
---
## Features
- Smooth animated zoom in / zoom out
- Mouse-follow tracking with adjustable smoothing
- Multi-monitor support
- Anti-flicker deadzone and threshold system
- Scene-aware transitions
- Cross-platform support (Windows / macOS / Linux)
- Fully configurable advanced settings
- Debug mode with detailed logging
---
## Requirements
- OBS Studio 30.0.0 or higher
- Recommended: OBS 32.0.0+
- Lua 5.1 (bundled with OBS)
---
## Installation
1. Download `zoom-follow-mouse-and-more-eg.lua`
2. Open OBS Studio
3. Go to Tools → Scripts
4. Click the "+" button and select the file
5. Assign hotkeys for:
- Toggle Zoom
- Toggle Follow
---
## IMPORTANT – Source Setup
Before activating zoom:
1. Select your source
2. Press CTRL + F (Fit to Screen)
This ensures correct mouse-to-crop mapping.
After fitting, you may still crop or resize the source manually — the script will continue working correctly.
---
## Main Settings
- Zoom Value (1.1 – 100)
- Zoom In Duration (1 – 60000 ms)
- Zoom Out Duration (1 – 60000 ms)
- Follow Speed (0.01 – 1.0)
- Enable Debug Mode
---
## Advanced Settings
Performance:
- Update Interval (8–100 ms)
- Mouse Cache Duration (4–32 ms)
Anti-Flickering:
- Mouse Deadzone (1–10 px)
- Crop Update Threshold (1–10 px)
- Crop Edge Threshold (1–20 px)
Scene Transitions:
- Scene Transition Duration (100–1000 ms)
Fallback Monitor Resolution:
- Default Monitor Width
- Default Monitor Height
---
## Troubleshooting
Zoom not activating:
- Ensure the source has valid dimensions
- Press CTRL + F before enabling zoom
Flickering:
- Increase Mouse Deadzone
- Increase Crop Update Threshold
- Increase Crop Edge Threshold
High CPU usage:
- Increase Update Interval
Enable Debug Mode and check:
Tools → Scripts → Script Logs
---
# Changelog
## 2.1.0 — 2025
- Rewritten zoom & follow engine using a state-machine animation system
- Fixed-endpoint interpolation (no per-frame recalculation)
- Improved first-click reliability
- Center-point follow system (no zoom drift)
- Removed legacy “Zoom Speed” slider
- Zoom In / Out durations moved to main settings
- Expanded limits:
- Zoom up to 100×
- Animation duration up to 60000 ms
---
## 2.0.2 — 2025
- Increased maximum zoom value
- Improved guidance on using high-resolution sources
- Clarified Fit-to-Screen requirement
---
## 2.0.1 — 2025
- Added additional valid video source types for macOS and Linux
- Fixed “No valid video source found” detection issues
---
## 2.0.0 — 2025 (Major Refactor)
- Complete code rewrite
- Performance optimizations (FFI caching, mouse caching)
- Anti-flickering engine
- Fully configurable parameters
- Improved validation and error handling
- Modular architecture
- Improved resource cleanup
- Enhanced debug logging
- Edge and corner handling logic
- OBS 32.0.0+ API compliance
---
## 1.1.0
- Initial release
---
## License
GNU General Public License v3.0
---
## Author
Edoardo Guzzi