PTZOptics Camera Controller for OBS

PTZOptics Camera Controller for OBS 2018-04-30

Luis Eduardo

New Member
Can not conect to the specific camera. Conection refused.
I can see my ip camera in OBS (It's a camera onvif ptz $20), but plugin ptz optics does not link. I'm using the same ip address than media source but does not work,
Using CMS software I can move our camera in ptz, but must to have both (cms and obs) programs running to broadcast.
refused3.jpg
 

Tpallot

Member
Question about calling a preset when click on the scene - I have that working via the HTTP commands, BUT...I don't want to switch to a scene with camera 1 and the audience sees it swing from one side of the room to the other. I had hoped I could call the scene in Studio mode, have the camera move to where it needs to go, and THEN fade the scene to be live, but calling it in studio mode does not initiate the camera moving to the preset. Is there a way to tell a scene to call a preset and THEN fade into live view? Thanks!
 

Henk R

New Member
Question about calling a preset when click on the scene - I have that working via the HTTP commands, BUT...I don't want to switch to a scene with camera 1 and the audience sees it swing from one side of the room to the other. I had hoped I could call the scene in Studio mode, have the camera move to where it needs to go, and THEN fade the scene to be live, but calling it in studio mode does not initiate the camera moving to the preset. Is there a way to tell a scene to call a preset and THEN fade into live view? Thanks!
When will this problem be soved. It should be a great thing to have.
 

DCStrato

Member
PTZ Controller tightly integrated with OBS.

Anyone is welcome to try out the code I wrote for Windows to run 5 generic PTZ cameras with Serial or VIsca over IP. All presets can be named as well as cameras and HOME is included as a 13th preset. PTZOptics did a really nice job and offers tech support. Cam controller is good for the price but didn't offer enough presets and the Browser interface was clunky and hard to explain, but they too offer tech support. I did a pretty good job and do not offer tech support. I have been using it without issue for months now. EXE controls the cameras and sets their presets, then communicates those named settings to PBS. A Lua script drives a source that can be included in a scene to move the camera during preview or active window (we use studio mode and like to see the camera for the next scene is in place before transition) to the named preset by communicating back to the app. It also renames the source in the scene so it reads "(n) Move Camera 1 to Stage Left", or whatever text you used to name your cameras and presets. The (n) is just the source number so it stays Unique as required by OBS. If you change them in the App they will automatically change in all the scenes. The readability allows my less than technical staff to build English like camera movements without using a browser insert. Duplicate sources are often created by OBS when duplicating scenes (same (n) in the source name), and changing one changes them all! To cover this all duplicate PRESET sources used in multiple scenes are flagged and turned RED. This saved us a TON of headaches. I will work to fix any bugs anyone reports and will probably publish the APP source early next year and maybe someone will move it to a Mac. I have not tried it on anything but a Windows machine. I am just working to document it a bit better. It is out there for those interested and not using PTZ optics cameras, and PTZ Optics is welcome to copy any features they like for their own product. App goes anywhere and SimpleCam.lua goes with the other LUA scripts in the OBS install. Click on arrows or home or +/- to move camera. Sliders adjust speed. + in zoom will go into digital zoom if available. Set then Preset, sets that button at current location/zoom. Rename then Preset changes names. Click the Camera title to change it. That's about it.
 

MacEdgar

New Member
So I'm also working with a Church to do broadcasts and though PTZOptics call it a plugin, its really a separate app. Right? WIndows has the Dockable panel, but this is not available for MAC that I have seen. If available, please let me know where to download. I still don't think it will fix scene changes but will allow for minor adjustments like zoom and pan and NOT switch apps.

What I have done is taken our bulletin(template of the service), and created a new doc that shows scene changes and what camera to go to and what PRESET to select. This gives me up to 9 camera views to choose from. Fortunately we have two cameras that we can switch to. So set camera 1 and 2 at the beginning of the service, then change the view of the camera that is not active. No direct control from OBS for now without seeing the camera pan and will get odd shots. PTZOptics does support URL changes and I have yet to be able to use them but then still run into the pan (change view) motion.

I believe I saw a plugin that tracks a target. That would be useful when a target moves to new locations and a actual scene change or camera change is distracting. This is where direct camera control would be useful.

So far, running the two apps and switching cameras works and looks great. Super happy with the quality of both PTZOptics and OBS.

I know there is IOS software that can turn IOS devices into another camera for ~$15. So may need to use that as a secondary camera for shots of a Pulpit or well positioned single shots and leave the PTZCamera for longer shots. I will look into the IOS app for remote shots like outside, etc.
 

MacEdgar

New Member
Can not conect to the specific camera. Conection refused.
I can see my ip camera in OBS (It's a camera onvif ptz $20), but plugin ptz optics does not link. I'm using the same ip address than media source but does not work,
Using CMS software I can move our camera in ptz, but must to have both (cms and obs) programs running to broadcast.View attachment 60425
Try RTSP://192.168.0.21:554/1 and RTSP://192.168.0.22:554/1. I also had to make sure the cameras were setup with the broadcast 1 from the web browser configuration. aka open browser and sign in.
 

CameraGuy

New Member
Saw a video from PTZOptics on this. In the video they showed a button at the bottom of the window in the plugin/app for White Balance. I need that badly and can't seem to find it. Did I miss it or was that a different plugin/app? Or some sort of custom script? I've also got a request in to PTZOptics about this but figured I'd check here as well.

Also noticed in OBS that now with this plugin/app installed, my CPU usage has increase dramatically - even with the control panel for it undocked and closed in OBS. Guessing that's because this is truly a separate app running in the background all the time? We're a church on a repurposed PC (Win10) which wasn't intended for video use and are now pushing it pretty hard with this camera controller installed - often above 75% when we stream - which makes me WAAAYYYY nervous. Looking into a GeForce graphics card upgrade but like others, we're on a budget. What's the procedure for removing this (and other) plugin from OBS? Just delete all the added files and reboot - then restart OBS?

Thanks in advance for any help and please forgive me if I need to post this as a new thread.
 

KilroyRecords

New Member
Loving the app so far, but found a bug on mac (osx 10.15.7 obs 26.1.2 pt30x-sdi firmware 6.3.18)
when i first installed, everything worked as expected, but now preset 3 cannot be written or recalled.
please advise
 

G0MJW

Member
PTZ Controller tightly integrated with OBS.

Anyone is welcome to try out the code I wrote for Windows to run 5 generic PTZ cameras with Serial or VIsca over IP. All presets can be named as well as cameras and HOME is included as a 13th preset.
Thanks for posting this - it's nice and simple. I was trying to get the visca camera lib working under windows 10, without great results. This does just what I want. I can't figure out how to save a preset but perhaps I will get there in the end.
 

DCStrato

Member
Thanks for posting this - it's nice and simple. I was trying to get the visca camera lib working under windows 10, without great results. This does just what I want. I can't figure out how to save a preset but perhaps I will get there in the end.
Here is the current version if you are interested. Includes new EXE and Lua. Fixes On/Off and adds 5 different groups of presets. Still only 14 at a time, but if you have different projects, you can switch between groups and use a different 14.

DC
 

Attachments

  • SimpleCam_1_6_0_34.zip
    195.5 KB · Views: 66

yukon92

New Member
Question about calling a preset when click on the scene - I have that working via the HTTP commands, BUT...I don't want to switch to a scene with camera 1 and the audience sees it swing from one side of the room to the other. I had hoped I could call the scene in Studio mode, have the camera move to where it needs to go, and THEN fade the scene to be live, but calling it in studio mode does not initiate the camera moving to the preset. Is there a way to tell a scene to call a preset and THEN fade into live view? Thanks!

I had the same issue. what I first implemented was use SOURCE DOC plugin to display my PTZoptics camera previews in OBS. Then I put PTZoptics plugin, and docked a view of the preset buttons below each preview (i modified the HTML code slightly to make their default buttons smaller in this view). So the operator just click on a preset, then once the camera is moved to its correct position, click on the preview image above and it automatically goes live.


Subsequently (although the above is simultaneously available) I now use PowerPoint slides to send commands to OBS to move cameras a change scenes as required through .BAT files and OBS websocket plugin.
This code example below make obs to switch to the scene called "Cam1-LIVE"

OBSCommand.exe /server=OBSip1:4444 /password="password1" scene="Cam1-LIVE"

To make a PTZoptic camera move in OBS to a preset, you send it a 'browser' command, with the syntax that something like this
" http://IP-ofCAMERA/cgi-bin/ptzctrl.cgi?ptzcmd&poscall&10 "
which would tell whatever ptzopti camera ip you put in there to move to position "10"

Problem is (and if smarter obs people can tell me how to do this that would be awesome) when you activate a scene in OBS, it will want to make that scene go live, messes things up visually. I got around this by installing an instance of OBS on powerpoint that runs in the background strictly to control these camera movements, then put in a delay to allow the .BAT file (2 seconds) between telling the camear to move, and telling OBS to go live with it. Something like this:

OBSCommand.exe /server=OBS-ip1:4444 /password="password1" scene="Cam1 Move Pos 10"
timeout /t 2 /nobreak > NUL
OBSCommand.exe /server=OBS-ip2:4444 /password="password1" scene="Cam1-LIVE"

So first command sends a websocekt command to ip1 (powerpoint computer that has OBS in the background) to activate the "cam1 move pos 10" scene that contains the browser code to move the camera. This OBS isn't live so dont care, its just acting as the mechanism for me to send a move command to the camera. Then it sleeps for 2 seconds and runs the second, then it runs the second command which tells the main OBS computer (on ip-2) to flip to scene "Cam1-Live". Works really well, can do some pretty complicated moves and setups for automatically.
 

DCStrato

Member
I wrote this code because our church didn't use PTZ Optics and I could not find another solution. We have used it every Sunday for over a year. Last update was in August to support up to 5 preset groups, since we were doing other events and didn't want to disturb our standard 14 presets we used on Sunday. Integrates 5 cameras (controls only show two at a time) and auto loads presets on scene changes, optionally during preview in studio mode. Supports VISCA over IP and/or serial connections. No browser required. Easy to rename and reset presets. Only downside is I have very little time to answer questions and have only used it on Windows computer. Extract, add Lua Script to OBS scripts folder, and run the EXE. Install Camera Preset Source in a scene for control. Most of it is easy to navigate. Source code is published on Git. Free to whoever is interested.
SimpleCam.gif
 

Attachments

  • SimpleCam.zip
    195.5 KB · Views: 47

glikely

Member
I wrote this code because our church didn't use PTZ Optics and I could not find another solution. We have used it every Sunday for over a year. Last update was in August to support up to 5 preset groups, since we were doing other events and didn't want to disturb our standard 14 presets we used on Sunday. Integrates 5 cameras (controls only show two at a time) and auto loads presets on scene changes, optionally during preview in studio mode. Supports VISCA over IP and/or serial connections. No browser required. Easy to rename and reset presets. Only downside is I have very little time to answer questions and have only used it on Windows computer. Extract, add Lua Script to OBS scripts folder, and run the EXE. Install Camera Preset Source in a scene for control. Most of it is easy to navigate. Source code is published on Git. Free to whoever is interested.
View attachment 76589
Are you able to post a link to the Git repo? What license are your using on the code?
 

DCStrato

Member
Standard MIT Open Source
glikely: I suspect had your PTZControls been available in early 2020 I would not have invested the time creating SimpleCam. We have all we need for now, but might consider looking at PTZControls at some point. I can see you are walking through many of the same issues with accidentally moving the live camera, etc. We do mostly preset camera scenes, but keep a scene with all camera sources loaded and switch between them in studio mode. This lets us prepare a new view with a different camera prior to a transition. The camera source in the active scene is automatically locked, the other sources unlocked, and the preview changed to a different source after the transition via a separate script. Changing the visibility of a camera source automatically turns off the visibility of the other camera sources as an option. Sometimes we do multi-camera insets that require a separate scene. Blocking any changes to the current camera kept us from making small changes to the active camera if required. I found it best to try to keep the operator as informed as possible rather than preventing actions.

DC
 

Homer

New Member
glikely: I suspect had your PTZControls been available in early 2020 I would not have invested the time creating SimpleCam. We have all we need for now, but might consider looking at PTZControls at some point. I can see you are walking through many of the same issues with accidentally moving the live camera, etc. We do mostly preset camera scenes, but keep a scene with all camera sources loaded and switch between them in studio mode. This lets us prepare a new view with a different camera prior to a transition. The camera source in the active scene is automatically locked, the other sources unlocked, and the preview changed to a different source after the transition via a separate script. Changing the visibility of a camera source automatically turns off the visibility of the other camera sources as an option. Sometimes we do multi-camera insets that require a separate scene. Blocking any changes to the current camera kept us from making small changes to the active camera if required. I found it best to try to keep the operator as informed as possible rather than preventing actions.

DC

Hello DNStrato, hello glikely,
First of all I would like to thank you for your plugins which I'm sure we'll be happy to try.
I would like to ask each of you two questions:
1. Is your script / plugin limited to special interfaces like RS232, RS485 or IP? Is it possible to use standard protocols via IP?
2. Is it possible to extend your script / plugin to not only control a PTZ camera by scene selection but to send comands to a further software running on the same PC as well, like freestyler DMX?
Let me explain the background of my questions:
Since the beginning of the Corona epidemic, we are streaming our services with OBS. We currently use two cameras: a permanently mounted wide-angle camera and a camcorder on a tripod. The tilt movement of the tripod cannot be carried out without bucking. However, our biggest problem was, that the lighting from above was so dominant that our pastor always had shadows on his eyes. So we recently bought a moving head. We control this via the freeware software freestyler DMX. Here, too, we work with presets, means for each scene we define pan, tilt, zoom, dimmer and color (light temperature). All in all, we currently need four operators for our technical equipment: One operator controls the applications song beamer and OBS using our church PC. The mixer operator controls the sound in our church and the sound output to OBS simultaneously. One person struggles with the camcorder on the tripod, and since few weeks one additional person controls the moving head with freestyler DMX using his private laptop. There are inevitable coordination problems when switching the scenes. Another problem is that we always need four people. We're looking for a way to get by with just two people. You made it possible for a PTZ camera to be automatically controlled via the scene selector in OBS. So we can save the cameraman by replacing the camcorder with a PTZ camera (which still has to be choosen). Second step: I read that the FreeStyler DMX software can be controlled via commands. If I could now not only assign a camera preset to each scene in OBS, but also a freestyler DMX preset, I could also save the fourth man and his laptop. To do this, a command would simply have to go out to freestyler DMX at the same time as the command to the PTZ control. There is only one thing we would like to avoid: That the poor guy, who is already busy with the song beamer and OBS scene selection, should also take care of any fine adjustments to the camera or moving head. So after I have programmed all required scenes, your plugins seem to make it possible for the OBS operator to have no more controls to learn at all, nor has any more work than before. That would be exactly what we need.
 

DCStrato

Member
Hi Homer,

I do understand what you are trying to accomplish, but unfortunately for now only VISCA protocol for cameras is supported. RS232 or IP. Not sure I am up to writing DMX packets at the moment, especially with nothing to test it with. I have not seen a lot of options for DMX control in OBS. It looks like several have started projects over the past few years, but not sure what became of them.

DC
 
Top