Resource icon

Control Visca-over-IP based cameras 2.5

vwout

Member
vwout submitted a new resource:

Control Visca-over-IP based cameras - This script adds a source to a scene in OBS which can be used to control a camera.

This plugin adds a source to a scene in OBS. With this source, a camera can be controlled. Its main purpose is to automatically switch a camera to a certain preset when the scene is activated. This activation can be as soon as the scene is active in preview, in program, or both.

Besides recalling a pre-made preset, this plugin supports a few more control operations:
  • Switch camera On
  • Switch camera Off
  • Preset Recall
This plugin requires the camera to support Visca over...

Read more about this resource...
 

ghostman90215

New Member
This is spot-on wha I’m looking for, and inferring from the examples... for the same reasons... PSZ camera steering based on scene selection for worship services so that the stream producer can automate camera control without the need for a person separately running the cameras.

I downloaded and installed this last night. I have not been able to get it to work. Is there a troubleshooting protocol someone could point me at?
 

Lawrence_SoCal

Active Member
Sorry, for new folks to OBS, the following installation instructions may not be clear:

The plugin is a script plugin and utilizes the Lua scripting capabilities of OBS. To use the plugin, add the file obs-visca-control.lua to OBS under Script in the Tools menu. The other .lua files in this repository are also required, but should not be added as scripts in OBS.

the 3 *.lua files in the download ZIP, being
  1. libvisca.lua Cleanup
  2. ljsocket.lua Add Visca library with support for Power On/Off and Preset Recall
  3. obs-visca-control.lua Release v1.0
The first 2 of those, being the "other" files referenced. And all 3 files need to go into the same directory, right?

Is the following accurate (for fresh Win10 x64 OS, 64-bit OBS install) /common practice
Copy those 3 files into either
C:\Program Files\obs-studio\data\obs-scripting\64bit
or would it be
C:\Program Files\obs-studio\data\obs-plugins\frontend-tools\scripts
or does it not matter? [sorry, showing my obvious ignorance on this matter]

Then
To use the plugin, add the file obs-visca-control.lua to OBS under Script in the Tools menu
that is, in OBS, click on Tool-> Scripts then click the "+" symbol, and point to obs-visca-control.lua and Click OK ??
 

vwout

Member
I downloaded and installed this last night. I have not been able to get it to work. Is there a troubleshooting protocol someone could point me at?
What you can do is open the script log from the scripts dialog. This might log failures or issues. To get more detailed logging, open obs-visca-control.lua and change line 18 to 'plugin_data.debug = true'. A reload of the plugin should start logging plenty of information.
When you don't see errors in the logs, it could be that your camera uses a Visca dialect that is slightly different from the 'standard'.
 

vwout

Member
The first 2 of those, being the "other" files referenced. And all 3 files need to go into the same directory, right?
That is correct.

Is the following accurate (for fresh Win10 x64 OS, 64-bit OBS install) /common practice
...
or does it not matter? [sorry, showing my obvious ignorance on this matter]
It does not matter where the 3 files are. These can be stored anywhere the directory obs-plugins\frontend-tools\scripts is a good place; the other location is for plugins and this is a script. But files can be anywhere on your machine.

that is, in OBS, click on Tool-> Scripts then click the "+" symbol, and point to obs-visca-control.lua and Click OK ??
Correct.

for new folks to OBS, the following installation instructions may not be clear:
I will make an attempt to improve the readme ;)
 

vwout

Member
vwout updated Control Visca-over-IP based cameras with a new update entry:

Release 1.1

This updated includes a few enhancements and minor changes to the documentation:
  • The visibility (enabled/disable) of the Visca plugin source is now respected. When the plugin is disabled in a scene, the action is not executed.
  • A new options is added to the source settings of the plugin to run an action on preview only when the camera is not active on program. This prevents accidental changes to the camera as long as it is live for broadcasting.

Read the rest of this update entry...
 

btpwisconsin

New Member
Has anyone tried this with PTZOptics Cameras?
I am also trying to use this script with PTZOptics cameras. It appears to provide exactly the functionality I want (calling Preset positions only in Preview), but I cannot get it work. My PTZOptics camera states that the UDP port is 1259 rather than 52381. I tried changing the default UDP in the libvisca.lua file and then monitored the UDP traffic. It still appears to go out on UDP Port 52381. I tried to define the IP address using 192.169.x.x: 1259, but the Script didn't accept that.

Is there a way to change the UDP port used to send these VISCA over IP commands through the script?

Thanks for this awesome script!
 

btpwisconsin

New Member
I am also trying to use this script with PTZOptics cameras. It appears to provide exactly the functionality I want (calling Preset positions only in Preview), but I cannot get it work. My PTZOptics camera states that the UDP port is 1259 rather than 52381. I tried changing the default UDP in the libvisca.lua file and then monitored the UDP traffic. It still appears to go out on UDP Port 52381. I tried to define the IP address using 192.169.x.x: 1259, but the Script didn't accept that.

Is there a way to change the UDP port used to send these VISCA over IP commands through the script?

Thanks for this awesome script!

An update. I must have been editing the libvisca.lua incorrectly at first. When I changed line 6 of this file to set the default port to 1259, it did result in UDP messages sent to the port that PTZOptics uses for Visca over IP. I cannot test this today as I need to get into my church to reconnect the cameras. But I'll try to report whether it works once I'm able to do that.
 

btpwisconsin

New Member
An update. I must have been editing the libvisca.lua incorrectly at first. When I changed line 6 of this file to set the default port to 1259, it did result in UDP messages sent to the port that PTZOptics uses for Visca over IP. I cannot test this today as I need to get into my church to reconnect the cameras. But I'll try to report whether it works once I'm able to do that.
After getting back to this with connected PTZOptics cameras I do see UDP network traffic at the correct remote UDP port and IP address but my cameras do not respond to the Preset Recalls that I send :-(. No joy yet with PTZOptics Cams and this script
 

CyBeaer

New Member
same here, tested with editing the libvisca.lua and changing the ports in the webinterface of the cameras.

Are all VISCA Protocoll Cameras supported or is there some exclusion?

Tested with the PTZOptics Camera NDI HS and the HuddleCamHD
 

vwout

Member
After taking a closer look to the PTZOptics specification, it looks like their Visca implementation only supports 'commands' and therefore does not use the Visca message header. You can test this hypothesis by replacing lines 64-77 in libvisca.lua by the single line
local data = self.payload
 

RolandW

New Member
I'm happy to report that this works perfectly with our church's BZB Gear BG-UPTZ-12X camera. This will make training volunteers much easier. Thanks!
 

extrapolary

New Member
I've been using this for a few weeks and it works great. However, the motion between presets can be jerky and rapid. Is there a way to control the movement speed?
 

vwout

Member
@extrapolary Thanks :). The support for movement speed depends on the camera. The plugin only requests the camera to recall a preset. The Visca protocol does not support setting a movement speed that should be applied for that specific recall. Movement speed could be part of the preset, but that is dependent on the implementation of presets by the camera.
At this moment, the plugin also does not know what the preset represents; it is not aware whether the preset is a zoom, a pan or a change in image settings
 

vwout

Member
Regarding the support of PTZOptics cameras: Is the anyone that has a PTZOptics camera and has the knowledge to make a network capture (Wireshark) so that I can try to make the plugin work with PTZOptics as well?
 
Top