OBS General

Edit

Trigger OBS Hotkey #

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] section which should have all your unique hotkey names listed.

Box Name Type Description
hotkeyName 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
keyId String Main key ID, such as A or F1. It has to be the OBS name for it, such as OBS_KEY_A.
All OBS hotkeys can be found in OBS Studio’s documentation.
Shift Boolean Whether to include Shift key
Alt Boolean Whether to include Alt key
Control Boolean Whether to include CTRL key


Edit

Fetch OBS Data #

Allows you to request data from OBS websocket and save it in a variable.
All the possible requests are documented in OBS websocket protocol reference.
The requested value will not be saved immediately, you must give you other commands a delay of 100-500ms to process the request.

If the requested value is inside another object already, you can access it with a simple dot-notation.
For example, if you want to retrieve Brightness value from Color Correction Filter, you will notice that it is inside an object called settings. {"settings": {"brightness": 0.78}, "status": "ok", "type": "color_filter"}</code>. In this case, the Fetch Value will be settings.brightness`.

Use JSON string validator if you want to make sure your formatting is correct.

Box Name Type Description
OBS command JSON String Works the same as the custom packet command. Do not include the "message-id" part.
Fetch Value String or object Name of a value you wish to get.
For values inside another object use object dot notation. For values inside an array use index position
Variable String Name of a variable to save the data under.
Turn to real boolean Whether you expect a real value (=number) or a string.

Fetch OBS Data Examples

Object Snippet (if present) What to retrieve OBS Command Fetch Value
"stats":{"cpu-usage":0.75013036185501325,...} current CPU usage {“request-type”:”GetStats”} stats.cpu-usage
N/A Time elapsed since streaming started {"request-type":"GetStreamingStatus"} stream-timecode
N/A Current width of a source {"scene-name":"YOURSCENENAME","item":"YOURSOURCENAME","request-type":"GetSceneItemProperties"} width
"crop":{"left":0,...} Current left crop of a source {"scene-name":"YOURSCENENAME","item":"YOURSOURCENAME","request-type":"GetSceneItemProperties"} crop.left
N/A Current text in a GDI source {"request-type":"GetTextGDIPlusProperties","source":"YOURSOURCENAME"} text
"settings":{"brightness":-0.5,...} Color Correction Brightness Value {"request-type":"GetSourceFilterInfo","sourceName":"YOURSOURCENAME","filterName":"Color Correction"} settings.brightness
"sceneItems":["sourceName":"Browser",...},{"sourceName":"Text GDI",...}] First source name in a specified scene {"request-type":"GetSceneItemList","sceneName":"YOURSCENENAME"} sceneItems[0].sourceName


Edit

Custom Packet #

Sends a custom packet to the OBS websocket in JSON format.
All the possible requests are documented in OBS websocket protocol reference.

  1. Use "message-id": "6666" to get a pop up message on your screen every time you execute the command (useful for troubleshooting).
  2. Use "message-id": "1" to hide the pop up message.

If the value you’re requesting is inside an object, you have to provide the whole object. For example, to set the scale for a scene item in SetSceneItemProperties request, you need to do: "scale":{"x":NEW SCALE X, "y":NEW SCALE Y }, just scale.x : NEW SCALE X is not gonna work as it’s not a valid JSON format.
Use JSON string validator if you want to make sure your formatting is correct.

Box Name Type Description
String JSON String JSON string to send to OBS Websocket.

Custom packet examples

JSON String Description
{"request-type":"GetVersion","message-id":"6666"} Current OBS websocket version, status and available requests
{"request-type":"GetStats","message-id":"6666"} OBS stats (similar info as provided in OBS’s stats window)
{"request-type":"SetCurrentProfile","profile-name":"YOURPROFILENAME","message-id":"1"} changes active profile in OBS
{"request-type":"SetSceneItemProperties","scene-name":"YOURSCENENAME", "item": {"name":"YOURSOURCENAME"}, "position": {"x":500, "y":500 }, "scale":{"x":0.5, "y":0.5}, "locked":true,"message-id":"6666"} changes position and scale of a source and locks it
{"request-type":"StartRecording","message-id":"1"} Starts recording
{"request-type":"StartReplayBuffer","message-id":"1"} Starts replay buffer
{"request-type":"GetSceneList","message-id":"6666"} Retrieves a list of scenes in the current profile
{"request-type":"GetSceneItemProperties","scene-name":"YOURSCENENAME", "item":"YOURSOURCENAME", "message-id":"6666"} Retrieves source item properties (position, rotation, scale etc.)
{"request-type":"GetSourceFilterInfo", "sourceName":"YOURSOURCENAME", "filterName":"YOURFILTERNAME", "message-id":"6666"} Retrieves current source filter settings