Automatically change Source to first layer

ramoses

New Member
Hi, I'm pretty new to OBS, but I am already using some plugins and learning a lot with the community. So here is the thing:

I have one Scene (Cameras) that I need to have all my 3 cameras. I have all the cameras in only one Scene because I won't have to individually add all 3 cameras for each new scene I need them again. I use my Deckboard App to turn on and off the cameras via LAN, and here is the problem: because OBS uses layers if I want to see the last camera I need to turn off the other 2 cameras so it will show this last one. What I need is that whenever the camera is switched ON it will change its position to the first layer. Any idea how I can do it? I tried searching for plugins, but I wasn't successful, if you guys have any other suggestions I would love to try them out. Thank you, guys!
 

WBE

Member
If I understand you correctly you want to show one camera at a time and the three camera's to be at the same place, either full screen or as a Picture in Picture. What would be the key benefit then from turning cameras on or off? Why not switch scenes (when fullscreen) of switch source visibility (when PiP)? Hotkey wise that latter would be:
x.png



On your point of having to add three cameras over and over again to scenes: you can add them to a group, so there would be only one item to add.
 

ramoses

New Member
The main reason I need it that way its because I need it to work with my Deckboard. I need as few buttons as possible and it needs to be visually good for me. Since Deckboard Pro App has not the best API integrations I can't know if the camera it's on or off just with macro buttons, so I need to use the API integration (pretty limited one just to explain. This API integration will change the button image based on it's state (active or deactivated) so I won't need to see OBS to know if the webcam it's on or off, yet with a macro I can't see on the Deckboard interface the current state of the webcam. The solution that I found was to trigger a script to put the activated scene to the first layer whenever it is activated. I know it's confusing, but if I wasn't clear enough just ask me that I will try to explain it again.
 

WBE

Member
Did you really find a working solution, or just an idea of a path to a solution?

It is important to formulate carefully. You do not want to switch cameras in OBS Studio, but turning the actual cameras on and off directly. Then you want a script in OBS to act upon the camera sending a signal or not. Right? -- I'm not sure whether that is possible.

The Deckboard App website appears to be not so descriptive on API integrations. "With OBS Studio and Streamlabs OBS integration, control scenes and objects for better broadcasting experience." That's all, but that does sound a bit contradicting to the limitations you're describing... Maybe somebody that actually uses the Deckboard App could be of any help.
 

koala

Active Member
Does the hotkey solution proposed by @WBE not work for you? In case you didn't read his screenshot close enough: He defines the same hotkey multiple times. For example the Z hotkey is defined as "show test 1", "hide test 2", "hide test 3", so whenever you press Z, all 3 actions are performed: sources 1 is shown and sources 2 and 3 are hidden.

As far as I ready your OP, this is what you want: press some hotkey (I assume your Deckboard is able to send some key just like an ordinary keyboard) and the camera associated with that key is shown and the other two are hidden. Assign 3 different hotkeys in OBS for hide/show as in the screenshot and assign these to some key of your Deckboard. Consider adding modifiers like CTRL and ALT to prevent interference with regular keyboard usage. Or use keys that are usually not present on an ordinary keyboard like F13..F24, which is my choice to handle key presses that are artificially generated only.

Moving sources up/down/top/bottom with hotkeys or automatically isn't possible in OBS.
 

ramoses

New Member
The main reason I can't use macros to solve the problem is that Deckbarod Pro App doesn't have button states for macro, only for the API integrations. As you can see in the first video using the desktop version of the Deckboard App the button will change its state based on the source state if activated or deactivated. The second video I send macros to my audio mixer (Voicemeeter) to mute and unmute my microphone, yet I can't see if it is muted or unmuted based on it's interface, so I need to constantly press the buttons and that's the main problem, it's not a good interface layout. I want to avoid the second layout I've shown to you, so I CAN'T use macros.

First video: https://puu.sh/HIA1O.mp4
Second video: https://puu.sh/HIA1Y.mp4
 
Top