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

  1. Open the SAMMI Core transmitter.
  2. Select the deck where you want to create the automation, or create a new deck.
  3. Right-click on an empty grid space and select Create Button.
  4. 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

  1. Right-click your button and select Edit Commands to open the command editor.
  2. Click the “+” (Add Command) button.
  3. In the command search bar, type OBS and select the OBS: Source Visibility command (sometimes listed as OBS: Set Source Visibility depending 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

  1. Click Save in the command editor window.
  2. Click Save again on your deck to apply the changes.
  3. 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.