PTZ camera scene switching - What do I need?

mball2301

New Member
I am a newbie to OBS Studio, but want to thank all the contributors for a wonderful product. It has been able to handle all I throw at it until now. I was one of those who when Covid 19 shut down our church I said I could setup a multiple camera solution and YouTube streaming and was quite successful with consumer grade Camcorders. As the weeks have gone on of course the congregation and staff are asking the questions of "why can't we" or "how come close ups look fuzzy" (using a scene crop for close up). So we are switching out the consumer grade digital camcorders with PTZ Optics NDI/HX cameras.
What I did not realize was how to hide the camera movement when you switch scenes on the same camera. I then found transition stinger to the rescue.

Here comes the issue. I really do not want to use stinger between every scene switch but only when the preview scene (using studio mode) camera source is the same as the active camera source, otherwise I want to use a fade. Also I am using the cgi commands from PTZ Optics to trigger the camera movement, so I also need a way to trigger the browser refresh if the preview camera source is different then the active camera. Below is the use cases I am talking about.

Preview SceneActive Scene Action wanted
Camera 1 NormalCamera 1 ZoomTrigger a stinger transition to hide the camera movement that is triggered by Camera 1 Normal cgi cmd.
Camera 2 tightCamera 1 NormalRefresh the browser cgi in preview camera to trigger Camera 2 when it is selected for preview and fade to Camera 2 tight when transitioned from preview to active.

Any advice would be greatly appreciated.
 

AllenKnapp

New Member
I am pretty much in the same boat. I'd be happy to use a stinger to mask the movement of the PTZ camera but am not having any look with that. I downloaded a free "blank stinger" from PTZOptics, but it seems to be a zip file with a bunch of black images so I can't really figure out how to make a proper stinger out of that.
 

mhauge

New Member
We are a house of worship and have struggled with masking PTZ camera transitions in a dual camera environment. When using OBS in Studio Mode, we sought an easy way to trigger events in the preview pane (send HTTP calls to our cameras to trigger presets), rather then when the scene becomes "Active". We landed on using Touch Portal macros to do this for us. Touch Portal has the ability to create a button that loads the preview pane, along with an HTTP call. We are using a tablet from Walmart ($39) over USB to assure battery life. A higher quality tablet could be reliable enough to do this over wireless if desired.

Has anyone else come up with alternate solutions? If so, please share. I imagine this might be able to be done with hotkeys within OBS, eliminating the need for an external device to perform the action.

Thoughts?
 

AllenKnapp

New Member
The Touch Portal macro system sounds useful. I'll look into it. I wonder if it works with my Elgato Streamdeck to initiate the macros?
 

mball2301

New Member
I put triggers (browser sources) in the scene. I just want to find a script that I can assign to a hot key to refresh that browser source so it will call the preset while it is still in the preview position. I do not know the objects that are declared in OBS to be able to write the script myself. I have loaded the PTZOptics plugin and it works well, but you have to know which camera source and preset you are on and find that on the plugin. It works but it takes time.
"My kingdom for a Hot Key!"
 

mball2301

New Member
I found a lua script to refresh browser sources, but am trying to adopt it to just find the sources in the preview scene, but for some reason it is not returning the preview scene.
I try to create a list of scene items with the following:

local scene_items = obs.obs_scene_enum_items(obs.obs_frontend_get_current_preview_scene())

can I not do this in lua? I have done this before in java.
 

mball2301

New Member
I was able to get a lua script working that refreshes the browsers in the preview scene of Studio mode. It is working well so far.
 

kpdillon

New Member
I was able to get a lua script working that refreshes the browsers in the preview scene of Studio mode. It is working well so far.
Would you mind sharing the script? I have PTZOptics Cameras and I'm dealing with the 3 step process of changing scenes at my church as well. 1. Click the camera scene 2. click the ptzoptics plugin and select the camera 3. select one of the 1-9 presets.

Thanks!
 

mball2301

New Member
It is now in the Resources and is called Reload browser in preview source. I use a browser source to trigger the preset and use the script to refresh the browser while still in preview (studio mode). This triggers the preset.
 

kpdillon

New Member
It is now in the Resources and is called Reload browser in preview source. I use a browser source to trigger the preset and use the script to refresh the browser while still in preview (studio mode). This triggers the preset.
Thank you! I can't wait to try it out!
 

mball2301

New Member
Do you have a hot key setup in your settings? The script will only trigger if you want it to. This is done through the script dialogue or assigning a hot key to the script. I use the "F1" key. This way if you have times you do not want to trigger the preset in preview (i.e same camera fade) you have control over that.

Also have you created a browser trigger using the PTZ Optics cgi commands in the scene?
https://ptzoptics.com/wp-content/uploads/2020/01/PTZOptics-HTTP-CGI-Commands-rev-1.4-1-20.pdf
 

caskeynorman

New Member
hi guys, Ireland based Church and hopefully setting up 2 x ptz cams in OBS. Wondering what PTZ cams everyone is using? dont want to break the back but struggling with the RTSP concept. Was looking at Hikvision CCTV cams but dont think this is an option. Any help would be great

thanks

Norman
 

Geo108

New Member
It is now in the Resources and is called Reload browser in preview source. I use a browser source to trigger the preset and use the script to refresh the browser while still in preview (studio mode). This triggers the preset.
Hello, where could I find this script, and how do I install it? I'm having the exact same issue with the preset not activating until the transition begins. Your help will be greatly appreciated.
 

Geo108

New Member
^ Re my post above, I was able to find the script, imported it and it works very well. Thanks to all who are so helpful on this forum.
 

dqm

Member
I am a newbie to OBS Studio, but want to thank all the contributors for a wonderful product. It has been able to handle all I throw at it until now. I was one of those who when Covid 19 shut down our church I said I could setup a multiple camera solution and YouTube streaming and was quite successful with consumer grade Camcorders. As the weeks have gone on of course the congregation and staff are asking the questions of "why can't we" or "how come close ups look fuzzy" (using a scene crop for close up). So we are switching out the consumer grade digital camcorders with PTZ Optics NDI/HX cameras.
What I did not realize was how to hide the camera movement when you switch scenes on the same camera. I then found transition stinger to the rescue.

Here comes the issue. I really do not want to use stinger between every scene switch but only when the preview scene (using studio mode) camera source is the same as the active camera source, otherwise I want to use a fade. Also I am using the cgi commands from PTZ Optics to trigger the camera movement, so I also need a way to trigger the browser refresh if the preview camera source is different then the active camera. Below is the use cases I am talking about.

Preview SceneActive Scene Action wanted
Camera 1 NormalCamera 1 ZoomTrigger a stinger transition to hide the camera movement that is triggered by Camera 1 Normal cgi cmd.
Camera 2 tightCamera 1 NormalRefresh the browser cgi in preview camera to trigger Camera 2 when it is selected for preview and fade to Camera 2 tight when transitioned from preview to active.

Any advice would be greatly appreciated.
I'm also grappling with masking camera movement between scene changes. Stingers seems like a viable way to introduce a delay that masks the PTZ movement. Beyond that, I'm confused by your chart showing preview scene different from active scene on the same camera. In my mind, it's impossible for the camera to be both zoomed and normal at the same time. Please explain.
 

wilderf353

Member
We purchased a $80 manual focus set-and-forget camera and use it between camera pan/tilt/zooms.

Here is a snippet from our worship script from last week that describes how to use the fixed focus camera. Our left & right cameras are PTZ cameras and the center camera is the fixed focus one.

1634086803771.png


If you like, you can watch this video of the switch to see what I mean.
 

dqm

Member
We purchased a $80 manual focus set-and-forget camera and use it between camera pan/tilt/zooms.

Here is a snippet from our worship script from last week that describes how to use the fixed focus camera. Our left & right cameras are PTZ cameras and the center camera is the fixed focus one.

View attachment 76064

If you like, you can watch this video of the switch to see what I mean.
Thanks for sharing your ideas. Masking PTZ movement with multiple cameras is straight forward--I mean just prepare one camera when another is in program view. The challenge is masking the PTZ movement across scene transitions involving the same camera.

What do you mean by "auto switcher" on the F1/F2 hot keys?
 

wilderf353

Member
...The challenge is masking the PTZ movement across scene transitions involving the same camera.
I agree ... that is why we added a 3rd fixed focus camera and suggest that our Tech Deck people use it during a transition. You don't have to worry about masking transitions on it, since it can't pan/tilt/zoom.

... What do you mean by "auto switcher" on the F1/F2 hot keys?

We are using the Advanced Scene Switcher. On the Scene Sequence tab we added 3 scenes: left, right, & center camera scenes. We set each scene to display for 30 seconds. On the settings->hotkeys page, we configured the F1/F2 keys to start/stop the sequence. Note: the F1 key will only start the sequence if we are showing a scene that is listed on the Scene Sequence tab.
 
Top