BlankSourceCode / obs-zoom-to-mouse

An OBS lua script to zoom a display-capture source to focus on the mouse
178 stars 15 forks source link

Add basic dual machine support #23

Closed BlankSourceCode closed 5 months ago

BlankSourceCode commented 6 months ago

This PR adds some basic support for running OBS on one machine, while capturing the screen and mouse position from another machine (via capture card for example).

Essentially it adds a small UDP socket server that you can enable. When enabled the server will listen for mouse update information and use that when it calculates the zoom and tracking position.

To enable the new socket listener options you need to have ljsocket.lua in the same directory as the main lua script (though it does not need to be added to OBS as a script). You then need some external program to pass the mouse position to the socket server. For this, I have created a separate repository obs-zoom-to-mouse-remote which has a small socket client that will post mouse coordinates to the server. Check out that repo for more information.