Sources
Pulls the last known value of a source. Will return 0 if the source doesn’t exist.
Very useful command to use together with Motion commands. For example, you can pull the current X and Y position of a source and then use Motion: Source Position to smoothly move it across the screen.
| Box Name | Type | Description |
|---|---|---|
| Scene Name | String | Scene name containing the source. Select from dropdown or input manually. |
| Source Name | String | Source name to pull the value. Select from dropdown or input manually. |
| Save Variable As | String | Variable name to save the pulled value into |
| Pull Value | Dropdown | Type of the value you wish to pull |
| Pull Type | Description | Possible values |
|---|---|---|
| Visible | Returns boolean value whether the source is visible or not | 0 for not visible and 1 for visible |
| X/Y position | Returns X or Y position of the source | For example 500 |
| X/Y scale | Returns scale of the source that affects its width (X) and height (Y) | 1 = 100% scale |
| Default X/Y Size | Returns default size of the source | For example 800 |
| Current X/Y Size | Returns current size of the source (applies scaling, crop etc.)) | For example 600 |
| Crop Left/Top/Right/Bottom | Returns current crop values of the source | For example 50 |
| Rotation | Returns the degree of rotation of the source | 0-360 |
| Volume | Returns the volume of the source in percentage | 0-1 |
| Volume dB | Returns the volume of the source in decibels | For example 50 |
| Muted | Returns boolean value whether the source is muted or not | 0 for unmuted and 1 for muted |
Changes the visibility of a source.
| Box Name | Type | Description |
|---|---|---|
| OBS | Dropdown | OBS to send this command to (if using multiple OBS) |
| Scene Name | String | Scene name containing the source. Select from the menu or type manually. Leave blank for current active scene. |
| Source Name | String | Source name. Select from the menu or type manually. |
| Visible | Checkbox | Checked = visible, Unchecked = not visible |
OBS WebSocket 5 Request: SetSceneItemEnabled
| Request Field | Type | Description |
|---|---|---|
| sceneName | String | Name of the scene the source is in. |
| sceneItemId | Number | Scene item ID resolved internally by SAMMI from the source name. |
| sceneItemEnabled | Boolean | true to show, false to hide the source. |
Toggles the visibility of a source. If the source is visible it’s turn off and vice versa.
| Box Name | Type | Description |
|---|---|---|
| OBS | Dropdown | OBS to send this command to (if using multiple OBS) |
| Scene Name | String | Scene name containing the source. Select from the menu or type manually. Leave blank for current active scene. |
| Source Name | String | Source name. Select from the menu or type manually. |
OBS WebSocket 5 Request: SetSceneItemEnabled
SAMMI reads the current visibility state from its internal cache and then calls SetSceneItemEnabled with the inverted value.
| Request Field | Type | Description |
|---|---|---|
| sceneName | String | Name of the scene the source is in. |
| sceneItemId | Number | Scene item ID resolved internally by SAMMI from the source name. |
| sceneItemEnabled | Boolean | The toggled visibility state (opposite of current). |
Changes the position of a source.
| Box Name | Type | Description |
|---|---|---|
| OBS | Dropdown | OBS to send this command to (if using multiple OBS) |
| Scene Name | String | Scene name containing the source. Select from the menu or type manually. Leave blank for current active scene. |
| Source Name | String | Source name. Select from the menu or type manually. |
| X | Number (optional) | X position to set the source to. Can leave blank to not modify it. |
| Y | Number (optional) | Y position to set the source to. Can leave blank to not modify it. |
OBS WebSocket 5 Request: SetSceneItemTransform
| Request Field | Type | Description |
|---|---|---|
| sceneName | String | Scene containing the source. |
| sceneItemId | Number | Scene item ID resolved internally by SAMMI from the source name. |
| sceneItemTransform | Object | {"positionX": 100, "positionY": 200} — only the fields being changed are included. |
Position 0, 0 is the top-left corner of the canvas. Coordinates are in pixels based on the canvas size (e.g. 1920×1080).
Changes the size of a source.
Use negative values for a horizontal (mirror) or vertical source flip.
The way the source resized is based on source’s positional alignment in OBS (source-Transform-Edit Transform).
| Box Name | Type | Description |
|---|---|---|
| OBS | Dropdown | OBS to send this command to (if using multiple OBS) |
| Scene Name | String | Scene name containing the source. Select from the menu or type manually. Leave blank for current active scene. |
| Source Name | String | Source name. Select from the menu or type manually. |
| X Scale | Real (optional) | X Scaling to set the source to. Leave blank to not modify it. 1.0 is 100%. |
| Y Scale | Real (optional) | Y Scaling to set the source at. Leave blank to not modify it. 1.0 is 100%. |
OBS WebSocket 5 Request: SetSceneItemTransform
| Request Field | Type | Description |
|---|---|---|
| sceneName | String | Scene containing the source. |
| sceneItemId | Number | Scene item ID resolved internally by SAMMI from the source name. |
| sceneItemTransform | Object | {"scaleX": 1.5, "scaleY": 1.5} — scale multipliers. 1.0 = 100%, 0.5 = 50%, -1.0 = flipped. |
Changes the rotation of a source.
The center point of the rotation is based on the Positional Alignment option (source-Transform-Edit Transform).
| Box Name | Type | Description |
|---|---|---|
| OBS | Dropdown | OBS to send this command to (if using multiple OBS) |
| Scene Name | String | Scene name containing the source. Select from the menu or type manually. Leave blank for current active scene. |
| Source Name | String | Source name. Select from the menu or type manually. |
| Rotation Angle | Number | Rotation angle to change the source to. 0 is normal, 180 is upside down, 360 is back normal |
OBS WebSocket 5 Request: SetSceneItemTransform
| Request Field | Type | Description |
|---|---|---|
| sceneName | String | Scene containing the source. |
| sceneItemId | Number | Scene item ID resolved internally by SAMMI from the source name. |
| sceneItemTransform | Object | {"rotation": 90} — rotation in degrees (0–360). |
Changes the volume of a source.
| Box Name | Type | Description |
|---|---|---|
| OBS | Dropdown | OBS to send this command to (if using multiple OBS) |
| Source Name | String | Source name. Select from the menu or type manually. |
| Volume | Number | Percentage to set the volume to, between 0 and 1. |
| Use dB | Checkbox | Whether you wish to use decibels for your values instead of percentage |
OBS WebSocket 5 Request: SetInputVolume
| Request Field | Type | Description |
|---|---|---|
| inputName | String | Name of the source to change volume for. |
| inputVolumeMul | Number | Volume in multiplier (0.0–1.0, where 1.0 = 100%). Used when Use dB is unchecked. |
| inputVolumeDb | Number | Volume in decibels (−100 to +26 dB). Used when Use dB is checked. |
Only one of inputVolumeMul or inputVolumeDb is sent per request depending on the Use dB checkbox.
Changes the positional alignment of a source.
| Box Name | Type | Description |
|---|---|---|
| OBS | Dropdown | OBS to send this command to (if using multiple OBS) |
| Scene Name | String | Scene name containing the source. Select from the menu or type manually. Leave blank for current active scene. |
| Source Name | String | Source name. Select from the menu or type manually. |
| Type | Dropdown | Type of the alignment. Select from the dropdown. |
OBS WebSocket 5 Request: SetSceneItemTransform
| Request Field | Type | Description |
|---|---|---|
| sceneName | String | Scene containing the source. |
| sceneItemId | Number | Scene item ID resolved internally by SAMMI from the source name. |
| sceneItemTransform | Object | {"alignment": 5} — a bitmask value representing the anchor point. |
| Alignment Value | Position |
|---|---|
5 |
Center |
4 |
Top Center |
6 |
Bottom Center |
1 |
Top Left |
2 |
Top Right |
9 |
Bottom Left |
10 |
Bottom Right |
8 |
Middle Left |
0 |
Middle Right |
Changes the crop settings of a source.
| Box Name | Type | Description |
|---|---|---|
| OBS | Dropdown | OBS to send this command to (if using multiple OBS) |
| Scene Name | String | Scene name containing the source. Select from the menu or type manually. Leave blank for current active scene. |
| Source Name | String | Source name. Select from the menu or type manually. |
| Left | Number | Left crop settings. |
| Top | Number | Top crop settings. |
| Right | Number | Right crop settings. |
| Bottom | Number | Bottom crop settings. |
OBS WebSocket 5 Request: SetSceneItemTransform
| Request Field | Type | Description |
|---|---|---|
| sceneName | String | Scene containing the source. |
| sceneItemId | Number | Scene item ID resolved internally by SAMMI from the source name. |
| sceneItemTransform | Object | {"cropLeft": 50, "cropTop": 0, "cropRight": 50, "cropBottom": 0} — crop values in pixels. |
Changes the text of a Text GDI+ source.
If you wish to change the text to a value saved in a variable, you need to wrap it: /$variable$/.
| Box Name | Type | Description |
|---|---|---|
| OBS | Dropdown | OBS to send this command to (if using multiple OBS) |
| Source Name | String | Text GDI+ source name. Select from dropdown or input manually. |
| New Text | String | The new text |
OBS WebSocket 5 Request: SetInputSettings
Sends SetInputSettings with inputSettings: { "text": "your text here" }.
| Request Field | Type | Description |
|---|---|---|
| inputName | String | Name of the Text GDI+ source. |
| inputSettings | Object | {"text": "..."} — the new text content. |
Changes the text of a Freetype 2 text source.
If you wish to change the text to a value saved in a variable, you need to wrap it: /$variable$/.
| Box Name | Type | Description |
|---|---|---|
| OBS | Dropdown | OBS to send this command to (if using multiple OBS) |
| Source Name | String | Text FT2 source name. Select from dropdown or input manually. |
| New Text | String | The new text |
OBS WebSocket 5 Request: SetInputSettings
Sends SetInputSettings with inputSettings: { "text": "your text here" }.
| Request Field | Type | Description |
|---|---|---|
| inputName | String | Name of the Text (Freetype 2) source. |
| inputSettings | Object | {"text": "..."} — the new text content. |
Changes settings of a source. Not to be confused with item transform settings.
Easy way to see your current source’s settings is to use the Check Settings button - after filling out the Source Name box, you will get a pop-up showing the source’s settings, excluding any still at default values.
Use JSON string validator if you want to make sure your formatting is correct.
| Box Name | Type | Description |
|---|---|---|
| OBS | Dropdown | OBS to send this command to (if using multiple OBS) |
| Source Name | String | Source name to change settings. Select from dropdown or input manually. |
| Settings | JSON String | The settings to be included. Formatted as a JSON String. Must be enclosed in {}. |
| JSON String | Description |
|---|---|
| {"url":"http://twitch.tv"} | Change URL of a browser source |
| {"local_file":"E:/Stream/hello.html"} | Change local file path of a browser source |
| {"file":"E:/Stream/image.png"} | Change local file path of an image source |
| {"playlist": [{"value": "E:/videos/video1.mp4"},{"value": "E:/videos/video2.mkv"}]} | Change local file paths for your VLC source. Each {"value":"X"} represents one file. |
| {"font": {"face": "Arial","flags": 8,"size": 48,"style": "Regular"}} | Change font settings of your GDI+ text source. Needs to include all values. |
OBS WebSocket 5 Request: SetInputSettings
| Request Field | Type | Description |
|---|---|---|
| inputName | String | Name of the source to update settings for. |
| inputSettings | Object | JSON object of the settings to apply (merged with existing settings by default). |
| overlay | Boolean (optional) | If true (default), merges with existing settings. If false, replaces all settings completely. |
The setting keys depend on the source type. Use the Check Settings button in SAMMI or Send OBS Request with GetInputSettings to see available keys for your source.
Mutes the sound of a source.
| Box Name | Type | Description |
|---|---|---|
| OBS | Dropdown | OBS to send this command to (if using multiple OBS) |
| Source Name | String | Source name to be muted. Can be a scene name as well. Select from dropdown or input manually. |
| Mute | Checkbox | Checked = mute, Unchecked = unmute |
OBS WebSocket 5 Request: SetInputMute
| Request Field | Type | Description |
|---|---|---|
| inputName | String | Name of the source to mute or unmute. |
| inputMuted | Boolean | true to mute, false to unmute. |
Inverts the mute status of a specified source. If the source was muted, it will be now unmuted and if the source was unmuted, it will be now muted.
| Box Name | Type | Description |
|---|---|---|
| OBS | Dropdown | OBS to send this command to (if using multiple OBS) |
| Source Name | String | Source name to be muted or unmuted. Can be a scene name as well. Select from dropdown or input manually. |
OBS WebSocket 5 Request: ToggleInputMute
| Request Field | Type | Description |
|---|---|---|
| inputName | String | Name of the source to toggle mute for. |
| Response Field | Type | Description |
|---|---|---|
| inputMuted | Boolean | The new mute state after toggling (true = muted, false = unmuted). |
Changes the monitoring type of an audio source.
Same option as in OBS-Audio Mixer-Cogwheel-Advanced Audio Properties.
| Box Name | Type | Description |
|---|---|---|
| OBS | Dropdown | OBS to send this command to (if using multiple OBS) |
| Source Name | String | Audio source name. Select from dropdown or input manually. |
| Monitor Type | dropdown | Type of monitoring to use |
OBS WebSocket 5 Request: SetInputAudioMonitorType
| Request Field | Type | Description |
|---|---|---|
| inputName | String | Name of the audio source. |
| monitorType | String | Monitor type to set. |
| Monitor Type Value | Description |
|---|---|
none |
No monitoring — audio is not sent to the monitoring device. |
monitorOnly |
Monitor only — audio is sent to the monitoring device but not to the stream/recording. |
monitorAndOutput |
Monitor and output — audio is sent to both the monitoring device and the stream/recording. |
Creates a new source and adds it to a scene.
You can pass a JSON string containing the new source’s settings as well.
The source will be added at the top of the list. To reorder it, use a Send OBS Request command.
| Box Name | Type | Description |
|---|---|---|
| OBS | Dropdown | OBS to send this command to (if using multiple OBS) |
| Source Name | String | Name of the new OBS source |
| Source Type | String | Type of the new source. Use the dropdown menu. If you do not see the desired source type (for example for some plugin sources), you should look at the OBS JSON file to figure out the correct value. |
| Scene Name | String | Name of the scene to add the source to. Select from dropdown or input manually. |
| Settings | JSON String | Source settings. Same format which is used in Source Change Settings command. |
| Visible | Checkbox | Whether the source should be set visible upon creation. Checked = visible, Unchecked = not visible |
OBS WebSocket 5 Request: CreateInput
| Request Field | Type | Description |
|---|---|---|
| sceneName | String | Scene to add the source to. |
| inputName | String | Name of the new source. |
| inputKind | String | Source type ID (e.g. browser_source, image_source, text_gdiplus_v2). |
| inputSettings | Object (optional) | JSON object with source-specific settings (same keys as used in SetInputSettings). |
| sceneItemEnabled | Boolean (optional) | Whether the source is visible after creation. |
| Response Field | Type | Description |
|---|---|---|
| inputUuid | String | The UUID of the newly created source. |
| sceneItemId | Number | The scene item ID of the source in the specified scene. |
Common inputKind values: browser_source, image_source, ffmpeg_source, vlc_source, text_gdiplus_v2, text_ft2_source_v2, color_source_v3, wasapi_input_capture, wasapi_output_capture, monitor_capture, window_capture, game_capture, dshow_input.
Deletes a source.
| Box Name | Type | Description |
|---|---|---|
| OBS | Dropdown | OBS to send this command to (if using multiple OBS) |
| Scene Name | String | Name of the scene the source resides in. Select from dropdown or input manually. |
| Source Name | String | Name of the source to delete. Select from dropdown or input manually. |
OBS WebSocket 5 Request: RemoveSceneItem
| Request Field | Type | Description |
|---|---|---|
| sceneName | String | Scene containing the source to remove. |
| sceneItemId | Number | Scene item ID resolved internally by SAMMI from the source name. |
Duplicates a source, copying all transform and crop info.
| Box Name | Type | Description |
|---|---|---|
| OBS | Dropdown | OBS to send this command to (if using multiple OBS) |
| Scene Name | String | Name of the scene where the source resides. Select from dropdown or input manually. |
| Source Name | String | Name of the source to duplicate. Select from dropdown or input manually. |
| Insertion Scene Name | String | Name of the scene to add the duplicated source to. Select from dropdown or input manually. |
OBS WebSocket 5 Request: DuplicateSceneItem
| Request Field | Type | Description |
|---|---|---|
| sceneName | String | Scene the original source is in. |
| sceneItemId | Number | Scene item ID resolved internally by SAMMI from the source name. |
| destinationSceneName | String (optional) | Scene to place the duplicated source in. Defaults to the same scene if not set. |
| Response Field | Type | Description |
|---|---|---|
| sceneItemId | Number | The scene item ID of the newly duplicated source. |
Changes the blend mode of a source.
| Box Name | Type | Description |
|---|---|---|
| OBS | Dropdown | OBS to send this command to (if using multiple OBS) |
| Scene Name | String | Scene name containing the source. Select from the menu or type manually. Leave blank for current active scene. |
| Source Name | String | Source name. Select from the menu or type manually. |
| Blend Mode | Dropdown | Select the blend mode for the source: Normal, Additive, Subtract, Screen, Multiply, Lighten or Darken. |
OBS WebSocket 5 Request: SetSceneItemBlendMode
| Request Field | Type | Description |
|---|---|---|
| sceneName | String | Scene containing the source. |
| sceneItemId | Number | Scene item ID resolved internally by SAMMI from the source name. |
| sceneItemBlendMode | String | Blend mode to apply. |
| Blend Mode Value | Description |
|---|---|
OBS_BLEND_NORMAL |
Normal compositing (default). |
OBS_BLEND_ADDITIVE |
Adds the pixel values together. |
OBS_BLEND_SUBTRACT |
Subtracts pixel values. |
OBS_BLEND_SCREEN |
Screen blend — brightens. |
OBS_BLEND_MULTIPLY |
Multiplies pixel values — darkens. |
OBS_BLEND_LIGHTEN |
Keeps the lighter of two values. |
OBS_BLEND_DARKEN |
Keeps the darker of two values. |
Saves a screenshot of an OBS source or scene to a local PNG file.
| Box Name | Type | Description |
|---|---|---|
| OBS | Dropdown | OBS to send this command to, if using multiple OBS connections. |
| Source Name | String | Name of the OBS source or scene to capture. |
| File Path | File Select | Local path to save the screenshot to. |
OBS WebSocket 5 Request: SaveSourceScreenshot
| Request Field | Type | Description |
|---|---|---|
| sourceName | String | Name of the source or scene to capture. |
| imageFormat | String | Always png for this command. |
| imageFilePath | String | Full local file path to save the PNG image to (e.g. C:/Screenshots/capture.png). |
Gets the current settings of an OBS source and saves them as an object.
| Box Name | Type | Description |
|---|---|---|
| OBS | Dropdown | OBS to send this command to, if using multiple OBS connections. |
| Source Name | String | OBS source to get settings from. Select from dropdown or input manually. |
| Save Variable As | String | Variable name to save the settings object. |
Example:
| Source Name | Save Variable As | Saved Object Example |
|---|---|---|
| Browser Source | sourceSettings | Object containing keys such as url, width, height, and other settings returned by OBS. |
| Image Source | sourceSettings | Object containing keys such as file and source-specific image settings returned by OBS. |
After saving the object, use Object Get Variable or JSON: Get Value after stringifying the object to read a specific setting.
OBS WebSocket 5 Request: GetInputSettings
| Request Field | Type | Description |
|---|---|---|
| inputName | String | Name of the source to get settings from. |
| Response Field | Type | Description |
|---|---|---|
| inputSettings | Object | All non-default settings for the source. The object is saved directly to your variable. |
| inputKind | String | The source type (e.g. browser_source, image_source). |
Example saved objects by source type:
| Source Type | Example Object |
|---|---|
| Browser Source | {"url": "https://...", "width": 800, "height": 600, "fps": 30} |
| Image Source | {"file": "C:/image.png", "unload": false} |
| Text (GDI+) | {"text": "Hello World", "font": {"face": "Arial", "size": 36}} |
| Media Source | {"local_file": "C:/video.mp4", "looping": true} |
Gets OBS source names and saves them as an array. If a scene is selected, only sources in that scene are returned. If the scene field is empty, all known sources are returned.
| Box Name | Type | Description |
|---|---|---|
| OBS | Dropdown | OBS to get the source list from, if using multiple OBS connections. |
| Scene Name | String | Optional scene to get sources from. Leave empty to get all known sources. |
| Save Variable As | String | Variable name to save the source name array. |
Examples:
| Scene Name | Save Variable As | Saved Array Example |
|---|---|---|
| Gameplay | sourceList | [Game Capture, Webcam, Chat, Alerts] |
| sourceList | All known OBS sources from the current OBS connection. |
Use an empty scene name when you want every known source, or select a scene when you only want the sources currently listed in that scene.
Gets transform data for an OBS source in a scene and saves it as an object.
| Box Name | Type | Description |
|---|---|---|
| OBS | Dropdown | OBS to send this command to, if using multiple OBS connections. |
| Scene Name | String | Scene the source is located in. Select from dropdown or input manually. |
| Source Name | String | Source to get transform data from. Select from dropdown or input manually. |
| Save Variable As | String | Variable name to save the transform object. |
Example:
| Scene Name | Source Name | Save Variable As | Saved Object Example |
|---|---|---|---|
| Gameplay | Webcam | webcamTransform | Object containing transform values returned by OBS. |
Typical values can include:
| Key | Description |
|---|---|
| positionX / positionY | Source position inside the scene. |
| width / height | Current source size after transform. |
| rotation | Source rotation. |
| cropLeft / cropTop / cropRight / cropBottom | Crop values. |
| sourceWidth / sourceHeight | Original source size. |
The exact keys depend on what OBS returns for the selected source and OBS WebSocket version.
OBS WebSocket 5 Request: GetSceneItemTransform
| Request Field | Type | Description |
|---|---|---|
| sceneName | String | Scene the source is in. |
| sceneItemId | Number | Scene item ID resolved internally by SAMMI from the source name. |
| Response Field (saved to variable) | Type | Description |
|---|---|---|
| positionX / positionY | Number | Source position on the canvas in pixels. |
| width / height | Number | Rendered width/height after scaling. |
| scaleX / scaleY | Number | Scale multiplier (1.0 = 100%). |
| sourceWidth / sourceHeight | Number | Original source dimensions in pixels. |
| rotation | Number | Rotation in degrees (0–360). |
| cropLeft / cropTop / cropRight / cropBottom | Number | Crop values in pixels. |
| boundsWidth / boundsHeight | Number | Bounding box dimensions if bounds are set. |
| alignment | Number | Positional alignment bitmask. |
Example saved object:
{
"positionX": 960,
"positionY": 540,
"width": 1920,
"height": 1080,
"scaleX": 1.0,
"scaleY": 1.0,
"rotation": 0,
"cropLeft": 0,
"cropTop": 0,
"cropRight": 0,
"cropBottom": 0,
"sourceWidth": 1920,
"sourceHeight": 1080
}
