Any dev considered about PTZ control in the future ?

Lucdelaselle

New Member
Hey !
I start to discover OBS, and i love it.

I'm a sound guy first, but i do quite a lot of live music video shooting, and i got tired of sync files into editing softs and spend hours on editing.
So i'm considering editing live with OBS, using PTZ cameras, and recording/streaming live.

I just tested one, and i had a hell of a day trying to find a soft to control preset positions of the camera, with some speed control during the switching of presets, like what is available in VMix (and i'd rather use OBS, for many reasons).

I was then wondering, if it was on the way somehow :)
 

Lucdelaselle

New Member
What kind of PTZ camera do you have? If you have one from PTZOptics, they have an OBS plugin that gives you a PTZ controller: https://obsproject.com/forum/resources/ptzoptics-camera-controller-for-obs.673/

No, i got models from a company called Flyan Electronics.
I tried of course that plugin with no chance.
But i tried the demo version of VMix, and the cameras work on the inbuild PTZ control module, with the Sony Visca protocol.
I guess PTZOptics have limited their plugin to their own cameras, which is understandable.
Thanks for the advice though !
 

dodgepong

Administrator
Community Helper
Does your PTZ camera not already come with control software? I admit I'm curious what advantage you would have from controlling it via OBS. Are you mostly interested in tying scene switches to camera positions?
 

Lucdelaselle

New Member
Does your PTZ camera not already come with control software? I admit I'm curious what advantage you would have from controlling it via OBS. Are you mostly interested in tying scene switches to camera positions?

I can access HTTP server of the camera via browser and control position, true, and i even programmed scripts on Firefox to access presets with just clicking those scripts.
But it's missing a speed control when the camera is switching to a new position, it just goes quick to that new position.
What would be great, as what we can find in the VMix functions, is a speed control on that moving positions, so that the camera could make slow panoramic from a position to another. I think the PTZOptics plugin has this function.
Actually, what would be great, would be that same plugin with open ports or with different protocol options, so that it could control any camera brand.
Thanks for your curiosity !
 

PTZOptics

New Member
I can access HTTP server of the camera via browser and control position, true, and i even programmed scripts on Firefox to access presets with just clicking those scripts.
But it's missing a speed control when the camera is switching to a new position, it just goes quick to that new position.
What would be great, as what we can find in the VMix functions, is a speed control on that moving positions, so that the camera could make slow panoramic from a position to another. I think the PTZOptics plugin has this function.
Actually, what would be great, would be that same plugin with open ports or with different protocol options, so that it could control any camera brand.
Thanks for your curiosity !

We have made some more improvements to the app which include the ability to have variable PTZ camera speeds. We have also finally finished the Mac version of the plugin.
 

PTZOptics

New Member
Does your PTZ camera not already come with control software? I admit I'm curious what advantage you would have from controlling it via OBS. Are you mostly interested in tying scene switches to camera positions?

We have created an integration to add hotkeys support. So this will help tie together some of the advanced functionalities that users have been requesting.
 

Lucdelaselle

New Member
We have made some more improvements to the app which include the ability to have variable PTZ camera speeds. We have also finally finished the Mac version of the plugin.
Well, that's great news !
Still, i just tried that version, and can't access my camera, which isn't a PTZOptics one, but a Flyan product : FLA-HD520ST.
It's supposed to use some Sony Visac over IP protocol.
I can have it controled by VMix, and a softwarecalled PTZJoy from Rocosoft.
Is your app and plugin dedicated to PTZOptics camera only ?
 

PTZOptics

New Member
Well, that's great news !
Still, i just tried that version, and can't access my camera, which isn't a PTZOptics one, but a Flyan product : FLA-HD520ST.
It's supposed to use some Sony Visac over IP protocol.
I can have it controled by VMix, and a softwarecalled PTZJoy from Rocosoft.
Is your app and plugin dedicated to PTZOptics camera only ?
Yes, this plugin works for PTZOptics camera only
 

Lawrence_SoCal

Active Member
I've started a project to work with Sony VISCA cameras. Very basic at the moment and lots to add,
Best Wishes and I'll be keeping an eye out. Are you going to post about your plugin at https://obsproject.com/forum/resources/

In reply to @dodgepong, yes camera control based on scene is exactly what I'm looking for. In our case, HoW, and my OBS setup has a scene count now of ~25
I picked up a Panasonic AW-HN38 NDI 22x camera yesterday. For volunteers, the more I can automate the better so looking forward to better PTZ camera control from OBS
 

glikely

Member
Best Wishes and I'll be keeping an eye out. Are you going to post about your plugin at https://obsproject.com/forum/resources/

Thanks!

As soon as the plugin is in a useful state I will submit it as a resource. I'm getting close. I've just added multiple PTZ device instances, but need to add a way to select between them. I also need to make it cross-platform. At the moment I'm developing on Linux, but it should be buildable on Windows and OSX too.
 

teisen

New Member
@glikely I am interested in contributing to your plugin. I am a java and js developer so bear with me on getting back up to speed on the syntax. I am looking to add generic PTZ support for NDI cameras. Looks like your architecture is set up in a way to support multiple protocols. What do you think? One of my use cases is that I can define a position per scene, so that when I select a new scene that contains a PTZ camera position it will first send request to reposition and then wait specified milliseconds before switching to the new camera. Toby
 

glikely

Member
@teisen: Great! I would appreciate the help.

I absolutely do intend to support multiple camera protocols. At the moment I'm using libvisca as the backend, but I want to refactor libvisca into some kind of "libptz" that abstracts the details behind a common API.

Triggering presets on selecting a scene is certainly doable.
 

dabldgd

New Member
I have been working on SW to control Sony RS-232 VISCA cameras for most of the year ... and have recently been trying to integrate with the generally undocumented UDP interface that Livestream Studio provides for this. I am putting this effort on the shelf due to apparent errors in the interface.

I have a stand-alone windows program (in regular, good-old C, built with msys64 and Gtk3+) that controls pointing, recalls and sets presets, controls camera exposures. I have built a camera simulator for testing. My next effort will be incorporate camera color / white balance control. I choose to build / code from the bottom-up, rather than using one of pre-existing libraries.

The specific command sequences used for camera control are treated as "data" and could be adapted for other cameras (if the command sequences are documented). My camera control code is pretty independent of the Windows UI code.

I have experimented with OBS and am interested in participating in this project - especially if my current efforts are useful.

Dave
 

glikely

Member
Hi Dave,

Sounds interesting. I'm also using Sony VISCA cameras that will talk either RS-232 or UDP. I've only got RS232 working at this point, but UDP is on my to-do list.

I'm hoping it will be easy to add more protocols to the plugin. I've created a common base class for all PTZ devices which each protocol can inherit. Most of the plugin won't need to care about protocol-specific details.

I have a stand-alone windows program (in regular, good-old C, built with msys64 and Gtk3+) that controls pointing, recalls and sets presets, controls camera exposures. I have built a camera simulator for testing. My next effort will be incorporate camera color / white balance control. I choose to build / code from the bottom-up, rather than using one of pre-existing libraries.

I'm particularly interested your camera simulator. I've started to contribute to libvisca (also plain old C), and it has been an excellent starting point, but it is lacking in at kind of test suite. Have you posted any of your choice publicly? If so, what license are you using?

Ultimately I want to refactor libvisca into a more generic libptz that can speak multiple protocols, but for right now I'm focusing on core functionality.
 

glikely

Member
I have experimented with OBS and am interested in participating in this project - especially if my current efforts are useful.

I would very much appreciate the help! Take a look at the TODO file in the GitHub repo. I've tried to keep it up to date. My background is the Linux kernel, so writing C++ Qt code is all new for me! Just let me know what you plan to work on so we're not duplicating work. Patches can be sent as GitHub pull requests.
 
Hello! Would this plugin work for getting simple zoom and pan functionality from e.g. a logitech C922 or similar? I know it's digital, but even just being able to hotkey the zoom functionality would be great if it's possible. I teach and deliver training online and t's not practical to open the camera properties / control window to use the slider control while delivering a session., as its far slower than a hotkey!

P.S. Sorry if this is a stupid question - I'm a relative newbie to OBS... Thanks in advance for the help :-)
 

glikely

Member
Hello! Would this plugin work for getting simple zoom and pan functionality from e.g. a logitech C922 or similar? I know it's digital, but even just being able to hotkey the zoom functionality would be great if it's possible. I teach and deliver training online and t's not practical to open the camera properties / control window to use the slider control while delivering a session., as its far slower than a hotkey!

P.S. Sorry if this is a stupid question - I'm a relative newbie to OBS... Thanks in advance for the help :-)

Not a stupid question at all! Yes, I think it is entirely feasible to wire up digital zoom control on fixed webcams, or even create a 'virtual' PTZ that scales and pans any OBS source. I think it would involve creating a new PTZDevice object and wiring it up to the translation controls of a source.

I'll add it to the wishlist. I'm unlikely to get to it anytime soon, but if you want to give it a shot, I'd be happy to merge in the changes.
 

glikely

Member
Update: I've got scene tracking working with the plugin now. If the PTZ device name matches a scene name, then it can automatically select that PTZ device when the scene becomes the active program or preview scene. Basic gamepad support is also working.
 
Top