General

Edit

Send OBS Request #

Allows you to request data from OBS websocket and save it in a variable.

This command should be followed by a Wait until Variable Exists command with an adequate timeout to allow for the OBS Websocket to respond.

The requested value will always be inside an object called responseData (for OBSws 5), but may be inside a second object. You can access it with object dot notation.
For example, if you want to retrieve the Brightness value from a Colour Correction filter, you will notice that it is inside an object called filterSettings. { "filterEnabled": true, "filterKind": "color_filter_v2", "filterSettings": { "brightness": 0.078 }, "filterIndex": 0.0 }. In this case, the Fetch Value will be responseData.filterSettings.brightness.

Use JSON string validator if you want to make sure your formatting is correct.
Be mindful of any trailing commas in your request that will cause OBS to disconnect, such as:

{
  "op": 6,
  "d": {
    "requestType": "GetVersion",  // this trailing commma must be removed
  }
}
Box Name Type Description
OBS Dropdown OBS to send this command to (if using multiple OBS connections).
OBS Command (JSON) JSON String JSON String to send to OBS Websocket. You can use the dropdown to select a JSON template for each request (OBSws 5 only).
Fetch Value String or object Name of a value you wish to get. Leave blank to fetch the whole object.
For values inside another object use object dot notation. For values inside an array use index position.
Save Variable As (optional) String Name of a variable to save the data under.

Send OBS Request Examples (OBSws 5)

What to retrieve OBS Command Fetch Value
current CPU usage {"op":6,"d":{
"requestType":"GetStats",
"requestData":{}
}}
responseData.cpuUsage
Time elapsed since streaming started {"op":6,"d":{
"requestType":"GetStreamStatus",
"requestData":{}
}}
responseData.outputTimecode
Scene Item ID of a source {"op":6,"d":{
"requestType":"GetSceneItemId",
"requestData":{"sceneName":"YOUR SCENE NAME","sourceName":"YOUR SOURCE NAME"}
}}
responseData.sceneItemId
Current width of a source {"op":6,"d":{
"requestType":"GetSceneItemTransform",
"requestData":{"sceneName":"YOUR SCENE NAME","sceneItemId":"YOUR SCENE ITEM ID"}
}}
responseData.sceneItemTransform.width
Current text in a GDI source {"op":6,"d":{
"requestType":"GetInputSettings",
"requestData":{"inputName":"YOUR SOURCE NAME"}
}}
responseData.inputSettings.text
Brightness value of a Colour Correction filter {"op":6,"d":{
"requestType":"GetSourceFilter",
"requestData":{"sourceName":"YOUR SOURCE NAME","filterName":"YOUR FILTER NAME"}
}}
responseData.filterSettings.brightness
First source name in a specified scene {"op":6,"d":{
"requestType":"GetSceneItemList",
"requestData":{"sceneName":"YOUR SCENE NAME"}
}}
responseData.sceneItems[0].sourceName


Edit

Event Pull #

Similar to ‘Trigger Pull Data’ command, but for OBS Websocket 5 Events.
This command will return a response from the OBS Event Trigger that was used.
More information about all possible OBS events can be found in Official OBS Websocket Documentation.

Box Name Type Description
Save Variable As String Variable name where the value will be saved to.
Pull Value Dropdown Select value from the dropdown list. Typing all will return the full response object.


Edit

Change Studio Mode #

Enables or disables studio mode in your OBS.

Box Name Type Description
OBS Dropdown OBS to send this command to (if using multiple OBS)
Enable Checkbox Checked = enable studio mode, unchecked = disable studio mode


Edit

Trigger OBS Hotkey Name #

Activates any OBS hotkey without having to manually press it.
You can find the unique name of a hotkey in one of these two locations:

  1. For general hotkeys: basic.ini file in C:/Users/USERNAME/AppData/Roaming/obs-studio/basic/profiles/YOUR_CURRENT_PROFILE
  2. For source-specific hotkeys: YOURSCENENAME.JSON file in C:/Users/USERNAME/AppData/Roaming/obs-studio/basic/scenes
    Once you open the file, look for HOTKEYS under each source which should have all your unique hotkey names listed.

Box Name Type Description
OBS Dropdown OBS to send this command to (if using multiple OBS)
Hotkey Name String Unique name of the hotkey


Edit

Trigger OBS Hotkey Sequence #

Executes hotkey routine.
Does not actually perform the key presses, it simply activates any hotkey action you’ve set.

Box Name Type Description
OBS Dropdown OBS to send this command to (if using multiple OBS)
Key ID String Main key ID. It must be the OBS name for it, such as OBS_KEY_A.
All OBS hotkeys can be found in OBS Studio’s documentation.
Ctrl Checkbox Whether to include Ctrl key
Alt Checkbox Whether to include Alt key
Shift Checkbox Whether to include Shift key


Edit

Event Subscription #

By default, all OBS events marked as ‘high volume’ are disabled. High volume events must be explicitly subscribed to. This command must be used each time you connect to OBS.

Box Name Type Description
Base Events Int Default base events to listen to using a bitmask. Best to not modify.
Volume Meters Checkbox A high-volume event providing volume levels of all active inputs every 50 milliseconds.
Active State Checkbox An input’s active state has changed. When an input is active, it means it’s being shown by the program feed.
State Changed Checkbox An input’s show state has changed. When an input is showing, it means it’s being shown by the preview or a dialog.
Transform Changed Checkbox The transform/crop of a scene item has changed. Enabled in SAMMI by default.