Resource icon

Control Visca-over-IP based cameras 2.5

Paul E.

New Member
I finally got a chance to start testing yesterday. At first I was having trouble getting any commands to go through, but then I think I found the problem. Because I have PTZOptics cameras, I originally set the UDP port to 1259. When I reset the port to 52381, that's when things started working. And now I've checked the network settings in each camera's web interface. They do say the UDP port is 1259, but it also says the "Sony Visca" port is 52381. So that would seem to confirm that 52381 is the correct port, even for PTZOptics cameras. Perhaps this is something that changed with updated camera firmware.

On an unrelated note, there are two typos in the instructions in the "Action configuration" block:
1. "must be send" should be "must be sent"
2. "(start)" and "(stops)" should be made consistent to either end with an 's' or not. I think either is fine, as long as they match.

Thank you very much for this "custom" update!
 

vwout

Member
Thanks for the feedback!
Because I have PTZOptics cameras, I originally set the UDP port to 1259. When I reset the port to 52381, that's when things started working.
Both should work. The port configured in the plugin should match the port configured in the camera, but as important, the mode should be set to match the camera protocol as well. Some cameras are not very verbose on the Visca dialect used - but your model seems to be quite clear on this subject.
 

vwout

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

Release 2.2

A small update release with a bugfix a few additional capabilities:

  • The Pan/Tilt speed increment/decrement hotkey only worked at first press (issue #11).
  • Additional actions were added to the scene actions and hotkeys to stop a pan/tilt/focus/zoom operation. This is specifically useful when triggering commands via external tools such as Companion.
  • Small interface improvements, such as hiding configuration...

Read the rest of this update entry...
 

rege0039

New Member
Hi,

Looks like a great resource. I'm trying to use it with my Zowietek AI 1080p camera. According to https://www.zowietek.com/knowledge-...nd-turn-on-or-off-tracking-by-visca-commands/ I should be able to send a code to turn the AI on and off when the scene is sent to programme.

I have it set up like this
OBS.png


But nothing seems to be happening.

I am clearly getting something wrong ! Any help greatly appreciated.
 

Attachments

  • OBS.png
    OBS.png
    31.4 KB · Views: 9

vwout

Member
The arguments of the start and stop commands should only contain the hexadecimal commands, so just '81 0A 11 A3 00'
 

rege0039

New Member
OK got it turn the AI on and off but only when it's set to 'Always' and would prefer it be when made program, that doesn't seem to work
 

vwout

Member
Could you share more details of your scenes and configuration?
What would also help is a log. Enable 'enable verbose logging (debug)' in the script settings of this plugin.
 

vwout

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

Release 2.4

This release implements a significant change regarding the handling of start and stop actions on Visca cameras. This fixes issues where start and stop actions were not executed, conditionally executed or incorrectly (superfluous) executed. The new system implements consistent execution. For details and notes see README on GitHub

In addition, this release contains several...

Read the rest of this update entry...
 

maestroteague

New Member
First, let me say thank you so much for developing this plugin and continuing to develop it. We recently got our first PTZ camera ( a PTZOptics clone from Prisual). I had tried other plug-ins and http-cgi commands to recall presets, but there was nothing else that I could find that would enable me to start and stop AI tracking. The only ways available are over their web interface or by visca commands. With your custom command ability, I am not completely set up now. Our presentation software uses MIDI cues which end up triggering hotkeys for scenes in OBS, so now I can set up calls for everything right in the presentation software and our volunteer doesn't have to do anything else to call presets and start the tracking. So happy!
I do have one issue (possibly). While I was testing things out, the scripts log was open, and with every scene I called, the following line showed in the script log:
[obs-visca-control.lua] Failed to call calldata_signal_callback for calldata_signal_callback: [string "C:/Program Files/obs-studio/data/obs-plugins/..."]:1206: table index is nil
I don't know if this is a problem or not - the script is sending all the commands that I am asking it to, and the camera is doing what I ask. If you need more information, I'll be glad to provide whatever you ask for. Thanks again!
 

vwout

Member
Thank you very much for the kind words and and the feedback.
The problem you experience was reported on release 2.4, issue 15. It occurs when you run OBS in 'normal' mode (with one camera view) instead of studio mode. You can ignore the error, or update to the latest code on Github, that fixes the bug. This will be included in the next release.

Since you are using stop commands, you might experience issue 16 issue as well, preventing from running stop commands. This occurs if two consecutive scenes both send Visca commands to the same camera. A fix is being worked on.
 

UroDoc

New Member
I have been using this script for over 3 years flawlessly, EXCEPT for version 2.4 which I installed today. While the script still moves the camera based on scene selection, adjusts focus and zoom, I now get the following error message in a pop up window:

[obs-visca-control.lua] source_signal_processor (1167): Show visca source 'Visca Camera Control 9' (camera 1): no action
[obs-visca-control.lua] source_signal_processor (1167): Activate visca source 'Visca Camera Control 9' (camera 1): process
[obs-visca-control.lua] do_cam_action_start (563): Start cam 1 action 2 (args speed=0, direction=0, preset=9)
[obs-visca-control.lua] open_visca_connection (421): Setup new connection for cam 1 at 192.168.7.192:52381
[obs-visca-control.lua] ? (431): Connection Completion received for camera 1 (seq_nr 0)
[obs-visca-control.lua] ? (452): Set camera 1 version info to Vendor: Unknown (0000), Model: Unknown (0000), Firmware: 0140
[obs-visca-control.lua] ? (795): Poll camera 1 (table: 0x01763230e060): 01 11 00 0A 00 00 00 00 90 50 00 00 00 00 01 40 02 FF
[obs-visca-control.lua] ? (524): Connection ACK received for camera 1 (seq_nr 1)
[obs-visca-control.lua] ? (795): Poll camera 1 (table: 0x01763230e060): 01 11 00 03 00 00 00 01 90 41 FF
[obs-visca-control.lua] ? (431): Connection Completion received for camera 1 (seq_nr 1)
[obs-visca-control.lua] ? (795): Poll camera 1 (table: 0x01763230e060): 01 11 00 03 00 00 00 01 90 51 FF
[obs-visca-control.lua] source_signal_processor (1167): Show visca source 'Visca Camera Control 11' (camera 1): no action
[obs-visca-control.lua] source_signal_processor (1167): Activate visca source 'Visca Camera Control 11' (camera 1): process
[obs-visca-control.lua] do_cam_action_start (563): Start cam 1 action 2 (args speed=0, direction=0, preset=11)
[obs-visca-control.lua] ? (524): Connection ACK received for camera 1 (seq_nr 2)
[obs-visca-control.lua] ? (795): Poll camera 1 (table: 0x01763230e060): 01 11 00 03 00 00 00 02 90 41 FF
[obs-visca-control.lua] source_signal_processor (1167): Hide visca source 'Visca Camera Control 9' (camera 1): process
[obs-visca-control.lua] camera_active_in_scene (1068): Current program scene is Organ
[obs-visca-control.lua] camera_active_in_scene (1073): Camera ref: 1 active on program: 1
[obs-visca-control.lua] source_signal_processor (1226): Not running stop action for source 'Visca Camera Control 9', because it is currently active on program
[obs-visca-control.lua] source_signal_processor (1167): Deactivate visca source 'Visca Camera Control 9' (camera 1): process
[obs-visca-control.lua] Failed to call calldata_signal_callback for calldata_signal_callback: [string "C:/Program Files/OBS-Studio/data/obs-plugins/..."]:1206: table index is nil
[obs-visca-control.lua] ? (431): Connection Completion received for camera 1 (seq_nr 2)
[obs-visca-control.lua] ? (795): Poll camera 1 (table: 0x01763230e060): 01 11 00 03 00 00 00 02 90 51 FF
[obs-visca-control.lua] source_signal_processor (1167): Show visca source 'Visca Camera Control 9' (camera 1): no action
[obs-visca-control.lua] source_signal_processor (1167): Activate visca source 'Visca Camera Control 9' (camera 1): process
[obs-visca-control.lua] do_cam_action_start (563): Start cam 1 action 2 (args speed=0, direction=0, preset=9)
[obs-visca-control.lua] ? (524): Connection ACK received for camera 1 (seq_nr 3)
[obs-visca-control.lua] ? (795): Poll camera 1 (table: 0x01763230e060): 01 11 00 03 00 00 00 03 90 41 FF
[obs-visca-control.lua] source_signal_processor (1167): Hide visca source 'Visca Camera Control 11' (camera 1): process
[obs-visca-control.lua] camera_active_in_scene (1068): Current program scene is Hymns-Piano
[obs-visca-control.lua] camera_active_in_scene (1073): Camera ref: 1 active on program: 1
[obs-visca-control.lua] source_signal_processor (1226): Not running stop action for source 'Visca Camera Control 11', because it is currently active on program
[obs-visca-control.lua] source_signal_processor (1167): Deactivate visca source 'Visca Camera Control 11' (camera 1): process
[obs-visca-control.lua] Failed to call calldata_signal_callback for calldata_signal_callback: [string "C:/Program Files/OBS-Studio/data/obs-plugins/..."]:1206: table index is nil
[obs-visca-control.lua] ? (431): Connection Completion received for camera 1 (seq_nr 3)
[obs-visca-control.lua] ? (795): Poll camera 1 (table: 0x01763230e060): 01 11 00 03 00 00 00 03 90 51 FF
[obs-visca-control.lua] source_signal_processor (1167): Show visca source 'Visca Camera Control 19' (camera 1): no action
[obs-visca-control.lua] source_signal_processor (1167): Activate visca source 'Visca Camera Control 19' (camera 1): process
[obs-visca-control.lua] do_cam_action_start (563): Start cam 1 action 2 (args speed=0, direction=0, preset=19)
[obs-visca-control.lua] ? (524): Connection ACK received for camera 1 (seq_nr 4)
[obs-visca-control.lua] ? (795): Poll camera 1 (table: 0x01763230e060): 01 11 00 03 00 00 00 04 90 41 FF
[obs-visca-control.lua] source_signal_processor (1167): Hide visca source 'Visca Camera Control 9' (camera 1): process
[obs-visca-control.lua] camera_active_in_scene (1068): Current program scene is Hymns-Organ
[obs-visca-control.lua] camera_active_in_scene (1073): Camera ref: 1 active on program: 1
[obs-visca-control.lua] source_signal_processor (1226): Not running stop action for source 'Visca Camera Control 9', because it is currently active on program
[obs-visca-control.lua] source_signal_processor (1167): Deactivate visca source 'Visca Camera Control 9' (camera 1): process
[obs-visca-control.lua] Failed to call calldata_signal_callback for calldata_signal_callback: [string "C:/Program Files/OBS-Studio/data/obs-plugins/..."]:1206: table index is nil
[obs-visca-control.lua] ? (431): Connection Completion received for camera 1 (seq_nr 4)
[obs-visca-control.lua] ? (795): Poll camera 1 (table: 0x01763230e060): 01 11 00 03 00 00 00 04 90 51 FF

With each scene selection additional lines were added. I went back to version 2.2 and the popup window disappeared.
The only issue with the old version (and also with version 2.4) is that the script can not identify the the camera model (Canon CR-N300)
the field entry is:
00), model unknown (0000), firmware 01.40 (which is the correct firmware version)

Any help would be greatly appreciated.
Thanks
 

vwout

Member
Thank you for the feedback.

The problem you experience was reported on release 2.4, issue 15. It occurs when you run OBS in 'normal' mode (with one camera view) instead of studio mode. You can ignore the error (although it is very annoying), or update to the latest code on Github, that fixes the bug. This will be included in the next release.

The identification of your camera is what it is; it looks like the camera does not send vendor or model info, only the firmware version is send.
 

UroDoc

New Member
Thank you for the feedback.

The problem you experience was reported on release 2.4, issue 15. It occurs when you run OBS in 'normal' mode (with one camera view) instead of studio mode. You can ignore the error (although it is very annoying), or update to the latest code on Github, that fixes the bug. This will be included in the next release.

The identification of your camera is what it is; it looks like the camera does not send vendor or model info, only the firmware version is send.
I am using the latest version 2.4 downloaded today. I will wait for the next version. The script is phenomenal. We have been using it for streaming the church service. I use it in conjunction with the PowerPoint macro on this site so that advancing slides changes scenes and camera positions.
Thanks
 

vwout

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

Release 2.5

This is a bugfix release to resolve several issues related to the new action handling introduced in version 2.4:
- Fix double free of scene source (causes corruption like removal of scenes and eventually crashes OBS)
- Safe handling of context variables - repair operation in non-studio mode (issue #15)
- Run stop commands before activation of new scene with same camera, to ensure stop command execution...

Read the rest of this update entry...
 

vwout

Member
I will wait for the next version. The script is phenomenal.
Thank you very much! The fix release is just released. This solves the annoyance you experienced, plus a significant bug that could lead to loss of scene configuration.
 

UroDoc

New Member
Just installed version 2.5 and everything is now working perfectly. No error messages. Running OBS 30.0.2, windows 10 as a regular user not administrator, Canon CR-N300 PTZ camera, PTZOptics Superjoy and Atem Mini Pro
Thanks for resolving the issue so quickly.
 
Top