Resource icon

Control Visca-over-IP based cameras 2.5

markdj

New Member
When there are no presets listed in the drop-down in the scene source, the syntax that you used in the script settings is probably not correct. The plugin is not capable of retrieving presets stored in your camera. You will have to list them manually in the script settings, using the format that is in the readme at https://github.com/vwout/obs-visca-control
Ah, I see what u mean now, I didn't realize the preset thing was like basic programming code. Thank you, this will be fun. I'll let you know how I get on.
 

PCCSF

New Member
Just got a new camera that supports Visca and it's been working fine once I get it running properly, however there seems to be a bug somewhere. I need some help getting the proper information to you to help troubleshoot. The bug is that after a reboot of the system, the recall presets seems to just stop.

What happens is if I delete all the instances of the preset commands in all my scenes, then re-add them, The script starts to work again. If I shutdown or reload OBS, randomly the presets are no longer being called.. I go through the process of deleting the "VISCA control" source one at a time through the scenes and eventually I will come across the one that seems to be hanging up the the recall script.. Then it will work fine as I add the script back into each scene that needs it.

I have not totally documented it yet but from initial trials it seems to be pretty random, however the fix is always the same. Delete then re-add.

Using plug in Version 1.3
OBS Version 27.0.0 64 bit
Windows 10 Pro Version 20H2 Build 19042.1165
Hardware is Intel I7 8700 with 16GB Ram
Camera is AIDA PTZ-NDI-X20 (Per mfg uses PTZOptics emulation) with Firmware V1031 (latest)


Any help would be appreciated.

Thank you.
 

vwout

Member
What happens is if I delete all the instances of the preset commands in all my scenes, then re-add them, The script starts to work again. If I shutdown or reload OBS, randomly the presets are no longer being called.. I go through the process of deleting the "VISCA control" source one at a time through the scenes and eventually I will come across the one that seems to be hanging up the the recall script.. Then it will work fine as I add the script back into each scene that needs it.

Any help would be appreciated.
Thank you for the complete description including version information!

Could you try the following: after starting OBS, open the scripts dialog, select the script 'obs-visca-control.lua' and click the reload button under the scripts (the icon with the two rounded arrows).
 

PCCSF

New Member
Thank you for the complete description including version information!

Could you try the following: after starting OBS, open the scripts dialog, select the script 'obs-visca-control.lua' and click the reload button under the scripts (the icon with the two rounded arrows).

Yay That works. Is this a problem/bug with OBS or the plugin?

I may need to implement this script / Process into a system I'm working on designing for a church where they do NOT have a tech or volunteer that is real tech savvy so I'm trying to make it as simple as possible. It will probably be a consideration if it's something that needs intervention randomly.

They need a system that they can turn on, and it works. I am going to implement using a streamdeck mini so they should be able to run most of their stream/worship with just a 6 button streamdeck and a computer. They already have an auto mixer for their in house sound system.
 

vwout

Member
You are welcome ;)

Actually, I don't know whether the problem is in the script, or OBS loading stuff. I have seen the behavior before but I can't really explain it. Guess I'll have to do some deep-dive debug sessions ...
Other than that, your approach should work. We use the plugin in the same way at church.
 

vwout

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

Release 1.4

Stability fixes and new features for the script plugin: support Pan/Tilt and Zoom in scene actions.

This update adds new capabilities for animation actions in the scene configuration dialog (thanks to a user contribution by christinoleo). The actions Pan/Tilt, with configurable direction and speed, and Zoom, also with configurable speed, are now available as action in a scene. This way you can pan the camera over a crowd automatically in a scene. When you switch scenes, the animation is...

Read the rest of this update entry...
 

enca1024

New Member
I'm using this to control a couple of Canon CR-N500s and it works very well. I think I've come across one issue though - as per the Visca spec I've seen, the minimum tilt speed is 01 but you currently have 00 for Visca.limits.TILT_MIN_SPEED in libvisca.lua. On my cameras, using 0 results in no movement at all so I believe this needs updating.
 

enca1024

New Member
Also, I've modified your script to add support for PRESET DRIVE SPEED for Preset Recall as well as reworking the Zoom function slightly to have a single Zoom action with the directions as a parameter which includes Stop as one of those directions. This makes it more closely aligned with the Pan/Tilt action and having the Stop option works much better for my use case.

Both of these need a bit of tidy up right now but I'd be happy to either share what I've done so far or do some tidy up and share if it's of use.
 

vwout

Member
Thanks for pointing out that bug. It is resolved in the latest commit on Github.
Regarding the other changes, I'd be happy to integrate those changes. I am curious how you handle the zoom Stop command in relation to deactivation of a scene. When a zoom action is executed, deactivating the scene, will stop the zoom (if the camera is no longer active). Are you applying it in scenes that use the same camera source, to start/stop zooming triggered by a scene?
 

enca1024

New Member
Thanks for fixing the bug so quickly!

In terms of the zoom Stop command, I've left the deactivation of the scene as is. I've simply combined the Zoom In and Zoom Out actions into one Zoom action which has "Directions". Those Directions pull the values from Visca.Zoom_subcommand, in the same way that the PanTilt Directions come from Visca.PanTilt_directions. I've then introduced a connection.Cam_Zoom(subcommand, speed) function in libvisca.lua which forwards to the appropriate existing Zoom function.

For my use case, I'd like to be able to stop a zoom with the camera still active. The way I've done it is to have various scenes in OBS which include the camera plus the appropriate Visca Camera Control PanTilt or Zoom direction. One of the scenes is a "Stop" command which also includes the camera as a source and uses two Visca Camera Control sources to stop both the PanTilt and Zoom. With an Elgato StreamDeck I can then have direction and zoom buttons for a camera which kick-off smooth slow pans and/or zooms when live with a stop button to stop the movement when appropriate.

I'll aim to do some tidy up of the code over the next few days and send it over.
 

enca1024

New Member
I've modified the checked in scripts from yesterday (11th Oct) with the updated zoom code to make it more consistent with Pan/Tilt and included a Zoom Stop command. See attached .txts (renamed from .lua). They now do the following:

- Merge Zoom In and Zoom Out into one Zoom action
- Add a Zoom/Stop command
- Update the Zoom Speed slider under properties (when the Zoom action is selected) to go from 0-7 as per the Visca spec.

I've tested it in OBS using a Visca Control Source but haven't tested the hotkeys or deactivating a scene, although I believe I've made the relevant updates.

If you're ok with this, I can factor in the Preset Drive Speed too.
 

Attachments

  • libvisca.txt
    13.8 KB · Views: 42
  • obs-visca-control.txt
    29.5 KB · Views: 47

howieb

New Member
FYI this did not fix my symptom (needing to reload the script every time we start OBS) but the addition of the speeds of PTZ is a very nice addition. Less dizzying if we have to move the camera while the camera is visible.
I'm having the same problem you are... Just stops working. I'll have to try this tomorrow (reloading the script). I've tried everything but that. If it works for me I'll be very pleased (and I'd love to get the root cause and issue fixed).
 

mab42

New Member
Same here - need to reload the script after each start of OBS to make it working with a BirdDog P200.

Oh, and almost forgot: Thank you very much indeed for making this available. If we can get rid of the reload issue, this will be a core element of our system to quickly power up, load some presets and afterwards power down. Very much appreciated!
 

vwout

Member
Thanks for all the heads up. I'm puzzled why the reload is required. I did some debugging but unfortunately did not find the root cause yet. I will spend some more time with OBS, my Lua editor, and Wireshark.
 

vwout

Member
@mab42, @howieb, @PCCSF: I found the root cause of the issue at startup of OBS.
It is related to the initialization of defaults.

It occurs when the Visca port is not modified during configuration but left to its default value. You can work around it by manually adjusting the port and setting it back to the default (52381).

This will be properly solved in the next release.
 

mab42

New Member
@mab42, @howieb, @PCCSF: I found the root cause of the issue at startup of OBS.
It is related to the initialization of defaults.

It occurs when the Visca port is not modified during configuration but left to its default value. You can work around it by manually adjusting the port and setting it back to the default (52381).

This will be properly solved in the next release.
Great you found the cause...
FWIW, I did enter my custom port in the script UI before.
I just noticed a new version on github and tried it - seems to work fine now! :-)
 
Top