How to Use OBS Scene Switching to Automate PTZOptics Preset Recall
April 02, 2025
The PTZOptics cameras feature two forms of IP control... PTZOptics VISCA over IP and HTTP-CGI.
The HTTP-CGI commands are able to be used within OBS to automate control based on scene switches.
Let's start by exploring the HTTP-CGI commands and specifically the preset recall command...
PTZOptics HTTP-CGI Commands - Download Location: https://ptzoptics.com/developer-portal/
For a preset recall, we have the following HTTP-CGI command available:
http://[camera ip]/cgi-bin/ptzctrl.cgi?ptzcmd&poscall&[position number]
Here we replace the [camera ip] with the camera's current IP address and [position number] with the desired preset to recall.
As an example for a camera at the default 192.168.100.88 IP address where we wish to recall preset 2 would look as follows:
http:// 192.168.100.88 /cgi-bin/ptzctrl.cgi?ptzcmd&poscall& 2
We've now examined the command(s) we'll be using in OBS to automate more of the production and can begin exploring how to implement these into the OBS scenes.
Open OBS and create two (2) scenes each with your live video as the source.
In Scene 1 add a "Browser" source and configure the source using the command explored above to "call" a preset
Other than adding our command to the URL section the only other change is to click "Refresh browser when scene becomes active"
Now in scene 2 repeat these same steps using a different [position number] so that we can create movement.
Note: If needed you can always send the browser source layer to the back so it is covered by other content
Now as you make each of these scenes live they will recall the designated preset position for the camera(s).