PTZ Visca Control with USB Joystick

Using the Church Webcasting System, YouTube, etc. Including cameras and mixers.
jeremywillden
New Member
Posts: 31
Joined: Sun Mar 19, 2017 8:24 pm

PTZ Visca Control with USB Joystick

Postby jeremywillden » Sat Jan 18, 2020 6:44 pm

Our stake center was just upgraded to the new HD distribution system and we finally have a PTZ camera mounted on the back wall of the chapel. The person who adjusted the system and trained us said there was a free Visca control software package for controlling the camera (via USB->RS232->PTZ camera) but the packages I found were either free and supported IP cameras only (no Ethernet on this camera) or cost almost as much as a Visca hardware joystick controller ($300+).

For anyone interested, I've put together (very early "pre-alpha" quality, written in Golang, so it should compile for Mac, Windows, and Linux) PTZ control program that accepts input from a USB game pad joystick controller (a cheap clone of the XBox controller on Amazon) and connects via USB (in the video rack) to the camera.

One joystick ("hat") controls pan and tilt, the other controls zoom and focus. The other dozen-or-so buttons are not yet used, but could be. It takes advantage of all the variable zoom speeds supported by the Visca protocol, so it is pretty easy to move very smoothly, including panning and tilting while zooming. I'm running it on a Raspberry Pi with a touchscreen, though it's just a command-line application right now.

Anyone interested in trying it out? I plan to open-source it, and I'd like to add a few more features like:
GUI with preset buttons for specific shots (wide, tall/medium/short pulpit, choir, organist, pianist, chorister) and maybe even an "automatic choir" mode that slowly pans across the choir slowly, perhaps with a "choir men" and "choir women" button as well. I thought it would be even cooler to add an Arduino under the pulpit with a laser rangefinder module (I think they are about $15 or so) to send the pulpit height back to the Pi eventually, to support a "pulpit auto-height" mode as well.

Anyone out there feeling really adventurous that wants to try it out soon? Our conference is in about 10 days so I hope to add several more features in time to use them in a real stream.

mhsmith19
New Member
Posts: 3
Joined: Sun Oct 13, 2019 12:51 pm
Location: Illinois

Re: PTZ Visca Control with USB Joystick

Postby mhsmith19 » Sat Jan 25, 2020 7:04 pm

Jeremy, I am interested. We too have the set-up in our stake center as you describe.

tietjenl
New Member
Posts: 1
Joined: Sun Jan 19, 2020 12:55 pm

Re: PTZ Visca Control with USB Joystick

Postby tietjenl » Fri Feb 21, 2020 5:57 pm

I have searched far and wide and finally found a product that works like a charm.
https://www.ptzcontroller.com/ - (at the time of posting it was $99)
It supports on screen (windows) control or Joystick control.

bwarnke2
New Member
Posts: 1
Joined: Tue May 05, 2020 6:25 pm

Re: PTZ Visca Control with USB Joystick

Postby bwarnke2 » Tue May 05, 2020 6:27 pm

Jeremy,

I'm wondering if you ended up making the PTZ code available?
Is it on github - or something similar?

thanks,
Bill

jeremywillden
New Member
Posts: 31
Joined: Sun Mar 19, 2017 8:24 pm

Re: PTZ Visca Control with USB Joystick

Postby jeremywillden » Thu Oct 01, 2020 8:06 pm

It's still very much a work in progress, but runs great (Golang) on a Raspberry Pi, even an older model 2 or 3. It's here and I'll try to add some additional documentation and background. With remote streaming, I'd like to add some "preset" functions (press a button to go to a wide shot, another button to go to the pulpit, that sort of thing) but right now you just plug in a USB joystick (I'm using a clone of an XBox controller) and the USB port for the USB->Serial adapter that runs the camera and do "go run main.go" (with Golang installed).
https://github.com/jeremywillden/visca-stick

User avatar
hicksticks2001
New Member
Posts: 38
Joined: Sun Aug 14, 2016 11:35 am
Contact:

Re: PTZ Visca Control with USB Joystick

Postby hicksticks2001 » Mon Oct 12, 2020 5:48 am

Jeremy, thank you for sharing this. Any chance you can release some compiled binaries that work on Windows for Golang? I would love to try this out but I'm not much of a developer to build from source.
-Aaron Hixson
Payson Utah Mountain View Stake
aaron@hixsonfamily.net

miguelos
New Member
Posts: 1
Joined: Thu Nov 26, 2020 2:54 pm

Re: PTZ Visca Control with USB Joystick

Postby miguelos » Thu Nov 26, 2020 2:59 pm

Hi Jeremy. I'm very interested in this.
I'm currently testing VISCA PTZ camera using free software + predefined hex commands send.
But joystick would be great.
Although don't know golang at all I managed to install it on ubuntu, downloaded requested dependencies, but when I start I get the following :

go run main.go
2020/11/26 22:41:31 Found serial port /dev/ttyS0 serial number
2020/11/26 22:41:31 Found serial port /dev/ttyS1 serial number
(...)
2020/11/26 22:41:31 Found serial port /dev/ttyS8 serial number
2020/11/26 22:41:31 Found serial port /dev/ttyS9 serial number
2020/11/26 22:41:31 Found serial port /dev/ttyUSB0 serial number
2020/11/26 22:41:31 Permission denied
exit status 1

any advice appreciated

perrymw2322
New Member
Posts: 1
Joined: Sun Jan 17, 2021 3:37 pm

Re: PTZ Visca Control with USB Joystick

Postby perrymw2322 » Sat Jan 23, 2021 2:04 pm

We just had what I assume is the same system installed and were told there was free software when given the training as well. I have yet to find a single solution that is free which will work, but I will detail how I am currently controlling it for anyone else who is interested:

We use OBS to control our broadcasts, so I wanted to be able to control the camera via software as well. This method allows control inside Windows on a PC and provides the ability to save presets.
All of the software listed is free.

First, if you have the same USB-to-Serial adapter as we do, you have to install the driver from http://www.prolific.com.tw/UserFiles/fi ... r_v204.zip, because windows doesn't automatically detect it.

In order to control the camera, I have installed a Serial Communications Port to TCP Server. This acts as a protocol interpreter between the camera control software and the camera itself.

Download the two programs below in order to get started:

1. COM by TCP: https://sourceforge.net/projects/combyt ... e/download
- This software is the intermediate which provides the protocol translation.
- It does not install, but must be run each time as an administrator in order to work.

2. PTZOptics Open Source Control Software:
Installer: https://f.hubspotusercontent20.net/hubf ... %201.4.msi
Manual: https://ptzoptics.com/wp-content/upload ... r-v1.3.pdf

Install the downloaded PTZOptics software with default settings.

Connect your computer to the USB port labeled camera on the AV rack.
ComByTCP does not install and must be run manually as an ADMINISTRATOR each time. To do this, right click on it and select run as administrator. Change the Com Port to whichever the camera is using, ours is on COM5 but it could be any of them, so you might need to verify in device manager.
After selecting the com port, enter "127.0.0.1" as the server, and "5678" as the port.
Everything else remains as default.
Select “Server”, which initiates the software to pass information between the Camera and Control Software.
Open the PTZOptics software and select:
->Settings->Multi Camera Settings
For Camera 1, set to IP Camera, and enter 127.0.0.1 in the box and select OK.
Now select the “camera 1” toggle which initiates communications between the camera and software. You should see new status in COM by TCP reporting "Client connected"
A box may popup and say "Connection Refused", select OK and ignore. (There seems to be more information being passed, but it is unneeded for our purposes.)
Whatever you set, automatically persists after closing the software.

You can now select:
->View->Advanced View and display all available options and then set presets etc.

Hope this helps.

snihipali99
New Member
Posts: 7
Joined: Thu Jan 30, 2020 1:19 pm

Re: PTZ Visca Control with USB Joystick

Postby snihipali99 » Sun Jan 31, 2021 10:37 am

perrymw2322 wrote:Connect your computer to the USB port labeled camera on the AV rack.
ComByTCP does not install and must be run manually as an ADMINISTRATOR each time. To do this, right click on it and select run as administrator. Change the Com Port to whichever the camera is using, ours is on COM5 but it could be any of them, so you might need to verify in device manager.
After selecting the com port, enter "127.0.0.1" as the server, and "5678" as the port.
Everything else remains as default.
Select “Server”, which initiates the software to pass information between the Camera and Control Software.
Open the PTZOptics software and select:
->Settings->Multi Camera Settings
For Camera 1, set to IP Camera, and enter 127.0.0.1 in the box and select OK.
Now select the “camera 1” toggle which initiates communications between the camera and software. You should see new status in COM by TCP reporting "Client connected"
A box may popup and say "Connection Refused", select OK and ignore. (There seems to be more information being passed, but it is unneeded for our purposes.)
Whatever you set, automatically persists after closing the software.

You can now select:
->View->Advanced View and display all available options and then set presets etc.

Hope this helps.
Our building was just upgraded to HD A/V including a Lumens PTZ camera. The setup appears to be very similar and I'm trying to control the camera using the USB port in the rack connected to a computer. I followed this instructions and it appears to connect but does not control the camera. Checking to see if there are any ideas of what may be the issue. Screenshot attached.
Attachments
Screen Shot 2021-01-31 at 7.18.12 AM.png
(1.48 MiB) Not downloaded yet

russellhltn
Community Administrator
Posts: 31002
Joined: Sat Jan 20, 2007 2:53 pm
Location: U.S.

Re: PTZ Visca Control with USB Joystick

Postby russellhltn » Sun Jan 31, 2021 12:06 pm

snihipali99 wrote:Our building was just upgraded to HD A/V including a Lumens PTZ camera. The setup appears to be very similar and I'm trying to control the camera using the USB port in the rack connected to a computer. I followed this instructions and it appears to connect but does not control the camera. Checking to see if there are any ideas of what may be the issue. Screenshot attached.
I'm thinking that you are connected to the USB to serial port converter that's part of the equipment rack, however, that may not have been connected to the camera. At least not correctly. I'd examine the wiring coming from the rack equipment to see if it's even connected.
Have you searched the Help Center? Try doing a Google search and adding "site:churchofjesuschrist.org/help" to the search criteria.

So we can better help you, please edit your Profile to include your general location.


Return to “Non-Interactive Webcasting”

Who is online

Users browsing this forum: No registered users