Resource icon

Control Visca-over-IP based cameras 2.5

jzee

New Member
Got it working! So cool!!!
Can't wait to use it next week for my 4 camera live stream, what a game changer!
Thanks for writing this from the bottom of my heart :)
Hey, I'm in a similar situation and couldn't get it to work with this camera either.
What did you end up doing to fix it?
 

PCCSF

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.
SWEEEEET..

That workaround fixed it!

Thank you....
 

barryOBS

New Member
I have a problem with the control of multiple cameras. When adding the first camera I can do everything with it, full control. When I add the next two cameras I can not pan or tilt, only zoom and adjust focus. It seems something is blocking the movements. Those two cameras also doesn't respond to the remote control anymore and I have to unplug the power to get contact with them with the remote. I use Visca over IP UDP Port 52831. The cameras are StoltzenArgos PTZ3000 . I have control over all three when I use a physical PTZ controller.
 

vwout

Member
Hi @barryOBS, can you share you configuration and a log file of a session?
You can get a log by enabling the checkbox 'Enable verbose logging' in the script settings. Open the log using the 'Script log' button and try using the camera's.
 

RolandW

New Member
I've been using 1.2 successfully for some time now with our BZB Gear PTZ camera, but have not been able to get it to work with our B20SA. The latter does not have pan or tilt capability, but I would like to have scenes for various zoom levels. Most of this thread is way over my head. Is there anything obvious in the attached screenshot that gives you a clue? I am at home now so I don't have it in front of me. I intended to work on this earlier today, but while I was at church our flakey rural DSL connection went down so I had to call it a day. Thanks for providing this great tool!
 

Attachments

  • Visca Script Screenshot.PNG
    Visca Script Screenshot.PNG
    26.7 KB · Views: 44

vwout

Member
Hi RolandW, you are welcome :)

Your configuration looks correct at first glance. A quick scan of the user manual (https://bzbgear.com/wp-content/uploads/2020/manuals/BG-B20SA-manual.pdf) however seems to suggest two things:
- This specific camera model uses port 3001 (see chapter 4.2.6)
- It looks like this model uses the PTZ-Optics variant of the Visca protocol

In order to be able to set these, update the plugin to the latest version (1.5 at time of writing, see the download link). Version 1.3 and later allow configuration of the port (defaults to 52381 and may need to be changed to 3001) and the mode (may need to be changed to PTZ-Optics).
When testing, I suggest making these changes one at a time:
- Update the plugin, retest (no change expected)
- Change the port of the B20SA, retest (may already work)
- Change the mode to PTZ-Optics, retest
- In case it still does not work, leave the mode to PTZ-Optics and change the port back to 52381, retest
 

RolandW

New Member
Wow, thank you for the quick diagnosis. I was actually getting ready to install 1.5 yesterday when internet and phone service went down for the whole neighborhood. I doubt I'll have time to do that before the service today but I hope to get back over there later in the week. Is updating just a matter of replacing obs-visca-control.lua with the new file? If I have a minute to spare this morning, I might try just changing the port to see what happens (sorry: I should have read the manual more thoroughly). I will report back!
 

RolandW

New Member
Hi RolandW, you are welcome :)

Your configuration looks correct at first glance. A quick scan of the user manual (https://bzbgear.com/wp-content/uploads/2020/manuals/BG-B20SA-manual.pdf) however seems to suggest two things:
- This specific camera model uses port 3001 (see chapter 4.2.6)
- It looks like this model uses the PTZ-Optics variant of the Visca protocol

In order to be able to set these, update the plugin to the latest version (1.5 at time of writing, see the download link). Version 1.3 and later allow configuration of the port (defaults to 52381 and may need to be changed to 3001) and the mode (may need to be changed to PTZ-Optics).
When testing, I suggest making these changes one at a time:
- Update the plugin, retest (no change expected)
- Change the port of the B20SA, retest (may already work)
- Change the mode to PTZ-Optics, retest
- In case it still does not work, leave the mode to PTZ-Optics and change the port back to 52381, retest
Time was limited today, but I tried all of that with no luck. Is there a way to delete the uncooperative camera from the script setup while leaving the one that's working, or would I have to remove the script altogether and start over?
Is there anything I should check in the camera configuration? It says the visca port is 1259, but is that for visca over serial? The PTZ camera also says 1259 there, and it works fine with the script showing port 52381.
 
Last edited:

vwout

Member
You can reduce the camera count to 1 and reload the script, that will remove (or actually: hide) the settings for the B20SA.

Do you have a utility or script that comes with the camera to control it via Visca over IP?
Visca over Serial uses a serial connection, not a network connection and for that the port is not applicable, so unless the manual is wrong, the port is 3001. Port 1259 however is used by PTZOptics, so it could make sense to set it to port 1259 and mode PTZOptics.
 

RolandW

New Member
Yes, that's what I was getting at: the Visca port setting on the camera itself (4.2.6 in the B20SA user manual) is irrelevant here because it applies only when you're using Visca over a serial connection, correct?
I'm pretty sure I did try 1259 in conjunction with PTZOptics mode, with no success. But I can double-check next time I'm there. I can take more screenshots or send logs if that would help. I did not see any obvious error messages.
I use the BZB web client (described in 4.2.1) for creating and activating zoom presets on the B20SA, and it works well. I assume the client is using Visca over IP? I have a browser dock in OBS for each camera. The client displays the same controls for pan, tilt, zoom and focus regardless of whether the camera supports all of those functions. I don't have to use it to activate presets for the PTZ camera because your script works so well with it.
One problem I've had with the PTZ is that it will sometimes lose focus when zoomed in fairly tight, and the autofocus has to hunt to find its place back. Because of that I usually set focus to manual for the sermon using the web GUI, but I've found that if a scene containing the Visca script is the Program scene, the camera seems to remain in autofocus mode and thus can still wander. So once the camera has been positioned by the script, I switch to the plain PTZ camera scene (with no script source). If I then set the camera to manual focus, it stays put. Stated differently: it seems that changes to a camera's focus mode while that camera's script-controlled scene is in Program do not have any effect on the camera's focus behavior.
Thank you!
 

vwout

Member
the Visca port setting on the camera itself (4.2.6 in the B20SA user manual) is irrelevant here because it applies only when you're using Visca over a serial connection, correct?
No. Visca over serial uses RS232 or RS485, see chapter 5. There is no port in Visca over serial (only a camera address, but that is a totally different topic).

I assume the client is using Visca over IP?
Probably not. Hard to tell without the physical camera, but a camera webUI typically uses a web API.

One problem I've had with the PTZ is that it will sometimes lose focus ...
That is something in control of by the camera. The plugin does not control (auto)focus. When there is little contrast in view, your camera might have trouble focusing. It's not a DSLR with phase detection AF. Instead it probably applies image processing software.

I've found that if a scene containing the Visca script ... the camera seems to remain in autofocus mode ...
The only thing this plugin does is recall a preset. If the focus mode is part of the preset, it is recalled to what you saved in the preset.

it seems that changes to a camera's focus mode while that camera's script-controlled scene is in Program do not have any effect on the camera's focus behavior.
What happens depends on what you configured. The script recalls a preset. When the focus mode is included in the preset (whether or not, is determined by the camera firmware), it is recalled with the preset. When the behavior is different between Preview and Program, you probably change the 'Action Active' configuration in de scene settings to 'On Program' or 'On Preview' instead of 'Always'.
 

RolandW

New Member
Here is a screenshot of the Network Port configuration for the camera that doesn't work (the settings are identical for the one that does work). Both cameras have 1259 here for Port Visca. In the script setup, both are set up for port 52381.

Screenshot BZB Port Config 220129.png
 

RolandW

New Member
The plugin does not control (auto)focus...
Yes, I am aware of all that, thank you. I have a workaround so I probably shouldn't have mentioned it. I have tried saving the preset with the camera manually focused but it does not save that focus distance with the preset. When I call that preset – either with the script or by picking it in the BZB UI – the camera still "hunts" for the focus, which indicates to me that it is in autofocus mode, not manual. Bottom line is that I don't think this "save the focus mode with the preset" feature works on this camera.
 

vwout

Member
Here is a screenshot of the Network Port configuration for the camera that doesn't work (the settings are identical for the one that does work). Both cameras have 1259 here for Port Visca. In the script setup, both are set up for port 52381.
Based on this, I'd suggest to configure the port in the plugin to 1259 and set the mode to PTZOptics.
 

RolandW

New Member
Will do, but I'm pretty sure I've already tried that – and every other combination of ports (1259, 3001, 52381) and modes I can think of. Thanks!
 

RolandW

New Member
To quote another user: Got it working! So cool!!!
I was trying various combinations of port and mode, and clicked the Reload Script button. All of a sudden it started working. The port is now 52381 and mode is PTZOptics. I am positive I had tried that combination before without success. Did I simply need to click Reload Script after making the change?
 
Top