Resource icon

Control Visca-over-IP based cameras 2.1

vwout

Member
Great that you got it to work!

I should have thought about the script reload. Yes, when you (attempt to) use the plugin in a scene, a connection is created. Its configuration will only be forcefully be updated after a script release.
 

JVRaines

New Member
This script looks promising for my use, especially the animation function. Would it be possible to add a configurable delay before the preset is called? I am using a stinger that takes 1 second to wipe on the screen and the cam needs to be still for that period. Currently, I handle it with a browser source calling Javascript with setTimeout and fetch. It's a little arcane and VISCA would be cleaner.
 

vwout

Member
Sure, that doesn't look hard to add. I will include it in the next release.
As a small bonus, it might even allow adding multiple Visca commands in the same scene, to be executed sequentially based on configured delays...
 

vwout

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

Release 1.6

This release adds several features and contains a significant number of reworks to improve the code quality.

New features:
  • The number of camera configurations that can be stored increased to the arbitrary maximum of 42
  • Add visca support for focus control. The plugin now supports hotkeys for changing the focus (automatic mode (default for most cameras, manual mode, single shot refocus trigger, focus to infinity, focus to near and focus to far). The hotkeys can be assigned via...

Read the rest of this update entry...
 

vwout

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

Release 2.0

A second major release of the Visca over IP control plugin for OBS!

This release contains many and significant changes to the code to enable several new features, completely backward compatible with all previous releases.

Most noticeable is the integration of a nice new feature suggested and initially implemented by user tmimlitch. The current pan, tilt and zoom value of a camera can be retrieved and stored in a scene action, which are recalled when the scene becomes active. This means...

Read the rest of this update entry...
 

vwout

Member
One additional note: the plugin tries to detect the camera brand, model and version. This will be shown with the camera in the scripts settings under 'Version Info'. This information is provided by the camera as codes. If your camera provides this information and the plugin shows this as 'Vendor: Unknown (vvvv), Model: Unknown (mmmm), ...', please share the actual vendor and model name and the vvvv and mmmm shown in the plugin, so this information can be added.
 

Jeggins

New Member
Hi and thanks for this script so far :)

I managed to add position recalls to ma scenes but I have the problem that i can recall a saved position exactly 3 times. After that the cam is not responding. I have to reload the script to have 3 more position recalls :D

I have the "NewTek NDI PTZ1" camera.
I tried the PTZOptics Mode but with that i had no camera movement at all. I added two logs from the OBS scriptlog. The first one shows 4 scene changes with 3 successfull cam preset recalls and the last one failing. The second log shows some unfinished messages that i get when i reload my script.
 

Attachments

  • log1.txt
    7 KB · Views: 4
  • log2.txt
    314 bytes · Views: 4
  • obs_script.jpg
    obs_script.jpg
    70.6 KB · Views: 10
  • settings_preset.jpg
    settings_preset.jpg
    28.9 KB · Views: 10

vwout

Member
Hi Jeggins,

You are welcome :)

To start with log2, this is because not all replies from the camera can be linked to a send message.
From the logs, it looks like the camera has some issues:
- not sending its own Vendor data (it identifies as Sony)
- it seems to be sending incorrect message counters on reply's
Both should not prevent the plugin from sending more commands to the camera, but this looks suspicious.

One question for confirmation: you are only sending the preset recall command after the previous command has been fully completed, so when the camera has reached the preset position? It looks like that looking at the logs, but just to be sure.
The test you are doing is recalling respectively preset 2, 3, 4 and 1. The call to preset 1 is failing. Although you probably tested this, could you try sending preset 2, 3, or 4 again - so sending a 'known good' preset recall?

When this continues to fail, could you modify libvisca.lua at line 941 and change:
message.seq_nr = self.last_seq_nr
to
message.seq_nr = 0

On a side note: your camera seems to still have stock firmware (revision 104). The latest at the NewTek site is 121 (VHR121F, see https://www.newtek.com/downloads/). Besides testing the above, you could also try a firmware update.
 

Jeggins

New Member
Hi vwout,
thanks for your quick reply.
changing the mentioned line in the libvisca.lua did the job :) thank you very much!!

doublechecked my firmware version but I am at version VHR121F as you can see here:
1666433921511.png


Thank you again for the script ;) loving it
 

vwout

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

Release 2.1

A small update release introducing a few additional capabilities

- Add functions for changing color gain (saturation) and brightness (#8). The color gain can be increased on the fly using assignable shortcut keys, or can be set to a fixed value as scene action.
- Add API commands to libvisca for reset/set/get Color Gain (Saturation) and set/get Brightness.
- Make previously hardcoded pan, tilt, zoom and focus speeds configurable per camera, add shortcuts for live modification (#6)
- Add...

Read the rest of this update entry...
 
Top