Wednesday, July 14, 2021

Automatically move PTZoptics Camera OBS Studio based on scene

Have your PTZoptics camera move to a pre-programmed x/y/z location automatically

You can have your PTZoptics camera move to a preset position that you've stored automatically when you select a scene.  Basically, we will use the "BROWSER" function in OBS to send an HTML command to the specific camera, that is formatted to trigger one of the pre-stored positions.

First, save a preset location.  In this example, Position #25 has been saved.  I'm doing this through the GUI of the PTZoptics camera.  




Now, in OBS, lets create a scene


Now in "Sources" we'll create a new one


Select "BROWSER"


Give it a name and click OK

You'll see the following

In the "URL" section paste in the following code syntax, but with changes for your situation.

http://IPofCAMERA/cgi-bin/ptzctrl.cgi?ptzcmd&poscall&PositionNumber

So as example, the camera I have uses IP 192.168.2.211 and we are using saved position # 25 so my code would look like 

      http://192.168.2.211/cgi-bin/ptzctrl.cgi?ptzcmd&poscall&25


Make sure you now check "Refresh browser when scene becomes active"

Then press "OK"

Now, add in the Camera input for the PTZoptics camera you are trying to control into the SOURCES window,  In my example the camera with IP of 192.168.2.211 is on Input #4

Now when you select the scene, your camera will move to that preset position #25 automatically.





No comments:

Post a Comment