Toggle OBS Source Visibility with SAMMI
This article provides a step-by-step guide on how to automatically toggle the visibility of any source in OBS Studio using a SAMMI automation script. You will learn how to configure a SAMMI button, select the correct OBS commands, and set up the toggle action to streamline your live streaming production.
Prerequisites
Before you begin, ensure you have the following set up: * SAMMI Core installed and running. * OBS Studio open with the OBS WebSockets server enabled. * SAMMI successfully connected to OBS Studio (indicated by a green OBS status indicator in SAMMI).
Step 1: Create a New Button in SAMMI
- Open the SAMMI Core transmitter.
- Select the deck where you want to create the automation, or create a new deck.
- Right-click on an empty grid space and select Create Button.
- Right-click the newly created button, select Edit Appearance, and give it a name (e.g., “Toggle Camera” or “Toggle Overlay”).
Step 2: Add the OBS Command
- Right-click your button and select Edit Commands to open the command editor.
- Click the “+” (Add Command) button.
- In the command search bar, type
OBSand select the OBS: Source Visibility command (sometimes listed asOBS: Set Source Visibilitydepending on your SAMMI version).
Step 3: Configure the Command Settings
Once the command is added to your script, fill in the following
parameters: * Connection: Select your active OBS
connection (usually main or 0). *
Scene Name: Type or select the exact name of the OBS
scene containing your target source. * Source Name:
Type or select the exact name of the source you want to toggle. *
Visible/Render: Change this setting to
Toggle (or use the value 2 if entering it
manually as a variable). This tells SAMMI to switch the source to
visible if it is hidden, and hidden if it is visible.
Step 4: Save and Test
- Click Save in the command editor window.
- Click Save again on your deck to apply the changes.
- To test the automation, make sure OBS is visible on your screen, then double-click the button inside the SAMMI deck. Your specified source should instantly appear or disappear in OBS Studio.