obs-websocket provides a feature-rich RPC communication protocol, giving access to much of OBS’s feature set. This document contains everything you should know in order to make a connection and use obs-websocket’s functionality to the fullest.
Get, Set, Get[x]List, Start[x], Toggle[x]sourceName, sourceKind, sourceType, sceneName, sceneItemNameHere’s info on how to connect to obs-websocket
These steps should be followed precisely. Failure to connect to the server as instructed will likely result in your client being treated in an undefined way.
Initial HTTP request made to the obs-websocket server.
Sec-WebSocket-Protocol header can be used to tell obs-websocket which kind of message encoding to use. By default, obs-websocket uses JSON over text. Available subprotocols:
obswebsocket.json - JSON over text framesobswebsocket.msgpack - MsgPack over binary framesOnce the connection is upgraded, the websocket server will immediately send an OpCode 0 Hello message to the client.
The client listens for the Hello and responds with an OpCode 1 Identify containing all appropriate session parameters.
authentication field in the messageData object, the server requires authentication, and the steps in Creating an authentication string should be followed.authentication field, the resulting Identify object sent to the server does not require an authentication string.rpcVersion is supported, and if not it provides its closest supported version in Identify.The server receives and processes the Identify sent by the client.
Identify message data does not contain an authentication string, or the string is not correct, the connection is closed with WebSocketCloseCode::AuthenticationFailedrpcVersion which the server cannot use, the connection is closed with WebSocketCloseCode::UnsupportedRpcVersion. This system allows both the server and client to have seamless backwards compatibility.Once identification is processed on the server, the server responds to the client with an OpCode 2 Identified.
The client will begin receiving events from obs-websocket and may now make requests to obs-websocket.
At any time after a client has been identified, it may send an OpCode 3 Reidentify message to update certain allowed session parameters. The server will respond in the same way it does during initial identification.
obswebsocket.json (default) subprotocol, or a text frame is received while using the obswebsocket.msgpack subprotocol, the connection is closed with WebSocketCloseCode::MessageDecodeError.request-type field in the first level JSON from unidentified clients. If a message matches, the connection is closed with WebSocketCloseCode::UnsupportedRpcVersion and a warning is logged.messageType is not recognized to the obs-websocket server, the connection is closed with WebSocketCloseCode::UnknownOpCode.Identify before it has received an Identified. Doing so will result in the connection being closed with WebSocketCloseCode::NotIdentified.obs-websocket uses SHA256 to transmit authentication credentials. The server starts by sending an object in the authentication field of its Hello message data. The client processes the authentication challenge and responds via the authentication string in the Identify message data.
For this guide, we’ll be using supersecretpassword as the password.
The authentication object in Hello looks like this (example):
{
"challenge": "+IxH4CnCiqpX1rM9scsNynZzbOe4KhDeYcTNS3PDaeY=",
"salt": "lM1GncleQOaCu9lT1yeUZhFYnqhsLLP1G5lAGo3ixaI="
}
To generate the authentication string, follow these steps:
salt provided by the server (password + salt)challenge sent by the server (base64_secret + challenge)authentication string.For real-world examples of the authentication string creation, refer to the obs-websocket client libraries listed on the README.
The following message types are the low-level message types which may be sent to and from obs-websocket.
Messages sent from the obs-websocket server or client may contain these first-level fields, known as the base object:
{
"op": number,
"d": object
}
op is a WebSocketOpCode OpCode.d is an object of the data fields associated with the operation.Data Keys:
{
"obsWebSocketVersion": string,
"rpcVersion": number,
"authentication": object(optional)
}
rpcVersion is a version number which gets incremented on each breaking change to the obs-websocket protocol. Its usage in this context is to provide the current rpc version that the server would like to use.Example Messages: Authentication is required
{
"op": 0,
"d": {
"obsWebSocketVersion": "5.1.0",
"rpcVersion": 1,
"authentication": {
"challenge": "+IxH4CnCiqpX1rM9scsNynZzbOe4KhDeYcTNS3PDaeY=",
"salt": "lM1GncleQOaCu9lT1yeUZhFYnqhsLLP1G5lAGo3ixaI="
}
}
}
Authentication is not required
{
"op": 0,
"d": {
"obsWebSocketVersion": "5.1.0",
"rpcVersion": 1
}
}
Hello message, should contain authentication string if authentication is required, along with PubSub subscriptions and other session parameters.Data Keys:
{
"rpcVersion": number,
"authentication": string(optional),
"eventSubscriptions": number(optional) = (EventSubscription::All)
}
rpcVersion is the version number that the client would like the obs-websocket server to use.eventSubscriptions is a bitmask of EventSubscriptions items to subscribe to events and event categories at will. By default, all event categories are subscribed, except for events marked as high volume. High volume events must be explicitly subscribed to.Example Message:
{
"op": 1,
"d": {
"rpcVersion": 1,
"authentication": "Dj6cLS+jrNA0HpCArRg0Z/Fc+YHdt2FQfAvgD1mip6Y=",
"eventSubscriptions": 33
}
}
Data Keys:
{
"negotiatedRpcVersion": number
}
negotiatedRpcVersionExample Message:
{
"op": 2,
"d": {
"negotiatedRpcVersion": 1
}
}
Data Keys:
{
"eventSubscriptions": number(optional) = (EventSubscription::All)
}
Data Keys:
{
"eventType": string,
"eventIntent": number,
"eventData": object(optional)
}
eventIntent is the original intent required to be subscribed to in order to receive the event.Example Message:
{
"op": 5,
"d": {
"eventType": "StudioModeStateChanged",
"eventIntent": 1,
"eventData": {
"studioModeEnabled": true
}
}
}
Data Keys:
{
"requestType": string,
"requestId": string,
"requestData": object(optional),
}
Example Message:
{
"op": 6,
"d": {
"requestType": "SetCurrentProgramScene",
"requestId": "f819dcf0-89cc-11eb-8f0e-382c4ac93b9c",
"requestData": {
"sceneName": "Scene 12"
}
}
}
Data Keys:
{
"requestType": string,
"requestId": string,
"requestStatus": object,
"responseData": object(optional)
}
requestType and requestId are simply mirrors of what was sent by the client.requestStatus object:
{
"result": bool,
"code": number,
"comment": string(optional)
}
result is true if the request resulted in RequestStatus::Success. False if otherwise.code is a RequestStatus code.comment may be provided by the server on errors to offer further details on why a request failed.Example Messages: Successful Response
{
"op": 7,
"d": {
"requestType": "SetCurrentProgramScene",
"requestId": "f819dcf0-89cc-11eb-8f0e-382c4ac93b9c",
"requestStatus": {
"result": true,
"code": 100
}
}
}
Failure Response
{
"op": 7,
"d": {
"requestType": "SetCurrentProgramScene",
"requestId": "f819dcf0-89cc-11eb-8f0e-382c4ac93b9c",
"requestStatus": {
"result": false,
"code": 608,
"comment": "Parameter: sceneName"
}
}
}
Data Keys:
{
"requestId": string,
"haltOnFailure": bool(optional) = false,
"executionType": number(optional) = RequestBatchExecutionType::SerialRealtime
"requests": array<object>
}
haltOnFailure is true, the processing of requests will be halted on first failure. Returns only the processed requests in RequestBatchResponse.requests array follow the same structure as the Request payload data format, however requestId is an optional field.Data Keys:
{
"requestId": string,
"results": array<object>
}
These are enumeration declarations, which are referenced throughout obs-websocket’s protocol.
The initial message sent by obs-websocket to newly connected clients.
01The message sent by a newly connected client to obs-websocket in response to a Hello.
11The response sent by obs-websocket to a client after it has successfully identified with obs-websocket.
21The message sent by an already-identified client to update identification parameters.
31The message sent by obs-websocket containing an event payload.
51The message sent by a client to obs-websocket to perform a request.
61The message sent by obs-websocket in response to a particular request from a client.
71The message sent by a client to obs-websocket to perform a batch of requests.
81The message sent by obs-websocket in response to a particular batch of requests from a client.
91For internal use only to tell the request handler not to perform any close action.
01Unknown reason, should never be used.
40001The server was unable to decode the incoming websocket message.
40021A data field is required but missing from the payload.
40031A data field’s value type is invalid.
40041A data field’s value is invalid.
40051The specified op was invalid or missing.
40061The client sent a websocket message without first sending Identify message.
40071The client sent an Identify message while already identified.
Note: Once a client has identified, only Reidentify may be used to change session parameters.
40081The authentication attempt (via Identify) failed.
40091The server detected the usage of an old version of the obs-websocket RPC protocol.
40101The websocket session has been invalidated by the obs-websocket server.
Note: This is the code used by the Kick button in the UI Session List. If you receive this code, you must not automatically reconnect.
40111A requested feature is not supported due to hardware/software limitations.
40121Not a request batch.
-11A request batch which processes all requests serially, as fast as possible.
Note: To introduce artificial delay, use the Sleep request and the sleepMillis request field.
01A request batch type which processes all requests serially, in sync with the graphics thread. Designed to provide high accuracy for animations.
Note: To introduce artificial delay, use the Sleep request and the sleepFrames request field.
11A request batch type which processes all requests using all available threads in the thread pool.
Note: This is mainly experimental, and only really shows its colors during requests which require lots of
active processing, like GetSourceScreenshot.
21Unknown status, should never be used.
01For internal use to signify a successful field check.
101The request has succeeded.
1001The requestType field is missing from the request data.
2031The request type is invalid or does not exist.
2041Generic error code.
Note: A comment is required to be provided by obs-websocket.
2051The request batch execution type is not supported.
2061The server is not ready to handle the request.
Note: This usually occurs during OBS scene collection change or exit. Requests may be tried again after a delay if this code is given.
2071A required request field is missing.
3001The request does not have a valid requestData object.
3011Generic invalid request field message.
Note: A comment is required to be provided by obs-websocket.
4001A request field has the wrong data type.
4011A request field (number) is outside of the allowed range.
4021A request field (string or array) is empty and cannot be.
4031There are too many request fields (eg. a request takes two optionals, where only one is allowed at a time).
4041An output is running and cannot be in order to perform the request.
5001An output is not running and should be.
5011An output is paused and should not be.
5021An output is not paused and should be.
5031An output is disabled and should not be.
5041Studio mode is active and cannot be.
5051Studio mode is not active and should be.
5061The resource was not found.
Note: Resources are any kind of object in obs-websocket, like inputs, profiles, outputs, etc.
6001The resource already exists.
6011The type of resource found is invalid.
6021There are not enough instances of the resource in order to perform the request.
6031The state of the resource is invalid. For example, if the resource is blocked from being accessed.
6041The specified input (obs_source_t-OBS_SOURCE_TYPE_INPUT) had the wrong kind.
6051The resource does not support being configured.
This is particularly relevant to transitions, where they do not always have changeable settings.
6061The specified filter (obs_source_t-OBS_SOURCE_TYPE_FILTER) had the wrong kind.
6071Creating the resource failed.
7001Performing an action on the resource failed.
7011Processing the request failed unexpectedly.
Note: A comment is required to be provided by obs-websocket.
7021The combination of request fields cannot be used to perform an action.
7031Subcription value used to disable all events.
01Subscription value to receive events in the General category.
(1 << 0)1Subscription value to receive events in the Config category.
(1 << 1)1Subscription value to receive events in the Scenes category.
(1 << 2)1Subscription value to receive events in the Inputs category.
(1 << 3)1Subscription value to receive events in the Transitions category.
(1 << 4)1Subscription value to receive events in the Filters category.
(1 << 5)1Subscription value to receive events in the Outputs category.
(1 << 6)1Subscription value to receive events in the SceneItems category.
(1 << 7)1Subscription value to receive events in the MediaInputs category.
(1 << 8)1Subscription value to receive the VendorEvent event.
(1 << 9)1Subscription value to receive events in the Ui category.
(1 << 10)1Helper to receive all non-high-volume events.
(General | Config | Scenes | Inputs | Transitions | Filters | Outputs | SceneItems | MediaInputs | Vendors | Ui)1Subscription value to receive the InputVolumeMeters high-volume event.
(1 << 16)1Subscription value to receive the InputActiveStateChanged high-volume event.
(1 << 17)1Subscription value to receive the InputShowStateChanged high-volume event.
(1 << 18)1Subscription value to receive the SceneItemTransformChanged high-volume event.
(1 << 19)1No action.
OBS_WEBSOCKET_MEDIA_INPUT_ACTION_NONE1Play the media input.
OBS_WEBSOCKET_MEDIA_INPUT_ACTION_PLAY1Pause the media input.
OBS_WEBSOCKET_MEDIA_INPUT_ACTION_PAUSE1Stop the media input.
OBS_WEBSOCKET_MEDIA_INPUT_ACTION_STOP1Restart the media input.
OBS_WEBSOCKET_MEDIA_INPUT_ACTION_RESTART1Go to the next playlist item.
OBS_WEBSOCKET_MEDIA_INPUT_ACTION_NEXT1Go to the previous playlist item.
OBS_WEBSOCKET_MEDIA_INPUT_ACTION_PREVIOUS1Unknown state.
OBS_WEBSOCKET_OUTPUT_UNKNOWN1The output is starting.
OBS_WEBSOCKET_OUTPUT_STARTING1The input has started.
OBS_WEBSOCKET_OUTPUT_STARTED1The output is stopping.
OBS_WEBSOCKET_OUTPUT_STOPPING1The output has stopped.
OBS_WEBSOCKET_OUTPUT_STOPPED1The output has disconnected and is reconnecting.
OBS_WEBSOCKET_OUTPUT_RECONNECTING1The output has reconnected successfully.
OBS_WEBSOCKET_OUTPUT_RECONNECTED1The output is now paused.
OBS_WEBSOCKET_OUTPUT_PAUSED1The output has been resumed (unpaused).
OBS_WEBSOCKET_OUTPUT_RESUMED1OBS has begun the shutdown process.
1/51An event has been emitted from a vendor.
A vendor is a unique name registered by a third-party plugin or script, which allows for custom requests and events to be added to obs-websocket. If a plugin or script implements vendor requests or events, documentation is expected to be provided with them.
3/51Data Fields:
| Name | Type | Description |
|---|---|---|
| vendorName | String | Name of the vendor emitting the event |
| eventType | String | Vendor-provided event typedef |
| eventData | Object | Vendor-provided event data. {} if event does not provide any data |
Custom event emitted by BroadcastCustomEvent.
1/51Data Fields:
| Name | Type | Description |
|---|---|---|
| eventData | Object | Custom event data |
The current scene collection has begun changing.
Note: We recommend using this event to trigger a pause of all polling requests, as performing any requests during a scene collection change is considered undefined behavior and can cause crashes!
1/51Data Fields:
| Name | Type | Description |
|---|---|---|
| sceneCollectionName | String | Name of the current scene collection |
The current scene collection has changed.
Note: If polling has been paused during CurrentSceneCollectionChanging, this is the que to restart polling.
1/51Data Fields:
| Name | Type | Description |
|---|---|---|
| sceneCollectionName | String | Name of the new scene collection |
The scene collection list has changed.
1/51Data Fields:
| Name | Type | Description |
|---|---|---|
| sceneCollections | Array<String> | Updated list of scene collections |
The current profile has begun changing.
1/51Data Fields:
| Name | Type | Description |
|---|---|---|
| profileName | String | Name of the current profile |
The current profile has changed.
1/51Data Fields:
| Name | Type | Description |
|---|---|---|
| profileName | String | Name of the new profile |
The profile list has changed.
1/51Data Fields:
| Name | Type | Description |
|---|---|---|
| profiles | Array<String> | Updated list of profiles |
A new scene has been created.
2/51Data Fields:
| Name | Type | Description |
|---|---|---|
| sceneName | String | Name of the new scene |
| isGroup | Boolean | Whether the new scene is a group |
A scene has been removed.
2/51Data Fields:
| Name | Type | Description |
|---|---|---|
| sceneName | String | Name of the removed scene |
| isGroup | Boolean | Whether the scene was a group |
The name of a scene has changed.
2/51Data Fields:
| Name | Type | Description |
|---|---|---|
| oldSceneName | String | Old name of the scene |
| sceneName | String | New name of the scene |
The current program scene has changed.
1/51Data Fields:
| Name | Type | Description |
|---|---|---|
| sceneName | String | Name of the scene that was switched to |
The current preview scene has changed.
1/51Data Fields:
| Name | Type | Description |
|---|---|---|
| sceneName | String | Name of the scene that was switched to |
The list of scenes has changed.
TODO: Make OBS fire this event when scenes are reordered.
2/51Data Fields:
| Name | Type | Description |
|---|---|---|
| scenes | Array<Object> | Updated array of scenes |
An input has been created.
2/51Data Fields:
| Name | Type | Description |
|---|---|---|
| inputName | String | Name of the input |
| inputKind | String | The kind of the input |
| unversionedInputKind | String | The unversioned kind of input (aka no _v2 stuff) |
| inputSettings | Object | The settings configured to the input when it was created |
| defaultInputSettings | Object | The default settings for the input |
An input has been removed.
2/51Data Fields:
| Name | Type | Description |
|---|---|---|
| inputName | String | Name of the input |
The name of an input has changed.
2/51Data Fields:
| Name | Type | Description |
|---|---|---|
| oldInputName | String | Old name of the input |
| inputName | String | New name of the input |
An input’s active state has changed.
When an input is active, it means it’s being shown by the program feed.
3/51Data Fields:
| Name | Type | Description |
|---|---|---|
| inputName | String | Name of the input |
| videoActive | Boolean | Whether the input is active |
An input’s show state has changed.
When an input is showing, it means it’s being shown by the preview or a dialog.
3/51Data Fields:
| Name | Type | Description |
|---|---|---|
| inputName | String | Name of the input |
| videoShowing | Boolean | Whether the input is showing |
An input’s mute state has changed.
2/51Data Fields:
| Name | Type | Description |
|---|---|---|
| inputName | String | Name of the input |
| inputMuted | Boolean | Whether the input is muted |
An input’s volume level has changed.
3/51Data Fields:
| Name | Type | Description |
|---|---|---|
| inputName | String | Name of the input |
| inputVolumeMul | Number | New volume level multiplier |
| inputVolumeDb | Number | New volume level in dB |
The audio balance value of an input has changed.
2/51Data Fields:
| Name | Type | Description |
|---|---|---|
| inputName | String | Name of the affected input |
| inputAudioBalance | Number | New audio balance value of the input |
The sync offset of an input has changed.
3/51Data Fields:
| Name | Type | Description |
|---|---|---|
| inputName | String | Name of the input |
| inputAudioSyncOffset | Number | New sync offset in milliseconds |
The audio tracks of an input have changed.
3/51Data Fields:
| Name | Type | Description |
|---|---|---|
| inputName | String | Name of the input |
| inputAudioTracks | Object | Object of audio tracks along with their associated enable states |
The monitor type of an input has changed.
Available types are:
OBS_MONITORING_TYPE_NONEOBS_MONITORING_TYPE_MONITOR_ONLYOBS_MONITORING_TYPE_MONITOR_AND_OUTPUT
Complexity Rating: 2/5
1Data Fields:
| Name | Type | Description |
|---|---|---|
| inputName | String | Name of the input |
| monitorType | String | New monitor type of the input |
A high-volume event providing volume levels of all active inputs every 50 milliseconds.
4/51Data Fields:
| Name | Type | Description |
|---|---|---|
| inputs | Array<Object> | Array of active inputs with their associated volume levels |
The current scene transition has changed.
2/51Data Fields:
| Name | Type | Description |
|---|---|---|
| transitionName | String | Name of the new transition |
The current scene transition duration has changed.
2/51Data Fields:
| Name | Type | Description |
|---|---|---|
| transitionDuration | Number | Transition duration in milliseconds |
A scene transition has started.
2/51Data Fields:
| Name | Type | Description |
|---|---|---|
| transitionName | String | Scene transition name |
A scene transition has completed fully.
Note: Does not appear to trigger when the transition is interrupted by the user.
2/51Data Fields:
| Name | Type | Description |
|---|---|---|
| transitionName | String | Scene transition name |
A scene transition’s video has completed fully.
Useful for stinger transitions to tell when the video actually ends.
SceneTransitionEnded only signifies the cut point, not the completion of transition playback.
Note: Appears to be called by every transition, regardless of relevance.
2/51Data Fields:
| Name | Type | Description |
|---|---|---|
| transitionName | String | Scene transition name |
A source’s filter list has been reindexed.
3/51Data Fields:
| Name | Type | Description |
|---|---|---|
| sourceName | String | Name of the source |
| filters | Array<Object> | Array of filter objects |
A filter has been added to a source.
2/51Data Fields:
| Name | Type | Description |
|---|---|---|
| sourceName | String | Name of the source the filter was added to |
| filterName | String | Name of the filter |
| filterKind | String | The kind of the filter |
| filterIndex | Number | Index position of the filter |
| filterSettings | Object | The settings configured to the filter when it was created |
| defaultFilterSettings | Object | The default settings for the filter |
A filter has been removed from a source.
2/51Data Fields:
| Name | Type | Description |
|---|---|---|
| sourceName | String | Name of the source the filter was on |
| filterName | String | Name of the filter |
The name of a source filter has changed.
2/51Data Fields:
| Name | Type | Description |
|---|---|---|
| sourceName | String | The source the filter is on |
| oldFilterName | String | Old name of the filter |
| filterName | String | New name of the filter |
A source filter’s enable state has changed.
3/51Data Fields:
| Name | Type | Description |
|---|---|---|
| sourceName | String | Name of the source the filter is on |
| filterName | String | Name of the filter |
| filterEnabled | Boolean | Whether the filter is enabled |
A scene item has been created.
3/51Data Fields:
| Name | Type | Description |
|---|---|---|
| sceneName | String | Name of the scene the item was added to |
| sourceName | String | Name of the underlying source (input/scene) |
| sceneItemId | Number | Numeric ID of the scene item |
| sceneItemIndex | Number | Index position of the item |
A scene item has been removed.
This event is not emitted when the scene the item is in is removed.
3/51Data Fields:
| Name | Type | Description |
|---|---|---|
| sceneName | String | Name of the scene the item was removed from |
| sourceName | String | Name of the underlying source (input/scene) |
| sceneItemId | Number | Numeric ID of the scene item |
A scene’s item list has been reindexed.
3/51Data Fields:
| Name | Type | Description |
|---|---|---|
| sceneName | String | Name of the scene |
| sceneItems | Array<Object> | Array of scene item objects |
A scene item’s enable state has changed.
3/51Data Fields:
| Name | Type | Description |
|---|---|---|
| sceneName | String | Name of the scene the item is in |
| sceneItemId | Number | Numeric ID of the scene item |
| sceneItemEnabled | Boolean | Whether the scene item is enabled (visible) |
A scene item’s lock state has changed.
3/51Data Fields:
| Name | Type | Description |
|---|---|---|
| sceneName | String | Name of the scene the item is in |
| sceneItemId | Number | Numeric ID of the scene item |
| sceneItemLocked | Boolean | Whether the scene item is locked |
A scene item has been selected in the Ui.
2/51Data Fields:
| Name | Type | Description |
|---|---|---|
| sceneName | String | Name of the scene the item is in |
| sceneItemId | Number | Numeric ID of the scene item |
The transform/crop of a scene item has changed.
4/51Data Fields:
| Name | Type | Description |
|---|---|---|
| sceneName | String | The name of the scene the item is in |
| sceneItemId | Number | Numeric ID of the scene item |
| sceneItemTransform | Object | New transform/crop info of the scene item |
The state of the stream output has changed.
2/51Data Fields:
| Name | Type | Description |
|---|---|---|
| outputActive | Boolean | Whether the output is active |
| outputState | String | The specific state of the output |
The state of the record output has changed.
2/51Data Fields:
| Name | Type | Description |
|---|---|---|
| outputActive | Boolean | Whether the output is active |
| outputState | String | The specific state of the output |
| outputPath | String | File name for the saved recording, if record stopped. null otherwise |
The state of the replay buffer output has changed.
2/51Data Fields:
| Name | Type | Description |
|---|---|---|
| outputActive | Boolean | Whether the output is active |
| outputState | String | The specific state of the output |
The state of the virtualcam output has changed.
2/51Data Fields:
| Name | Type | Description |
|---|---|---|
| outputActive | Boolean | Whether the output is active |
| outputState | String | The specific state of the output |
The replay buffer has been saved.
2/51Data Fields:
| Name | Type | Description |
|---|---|---|
| savedReplayPath | String | Path of the saved replay file |
A media input has started playing.
2/51Data Fields:
| Name | Type | Description |
|---|---|---|
| inputName | String | Name of the input |
A media input has finished playing.
2/51Data Fields:
| Name | Type | Description |
|---|---|---|
| inputName | String | Name of the input |
An action has been performed on an input.
2/51Data Fields:
| Name | Type | Description |
|---|---|---|
| inputName | String | Name of the input |
| mediaAction | String | Action performed on the input. See ObsMediaInputAction enum |
Studio mode has been enabled or disabled.
1/51Data Fields:
| Name | Type | Description |
|---|---|---|
| studioModeEnabled | Boolean | True == Enabled, False == Disabled |
A screenshot has been saved.
Note: Triggered for the screenshot feature available in Settings -> Hotkeys -> Screenshot Output ONLY.
Applications using Get/SaveSourceScreenshot should implement a CustomEvent if this kind of inter-client
communication is desired.
2/51Data Fields:
| Name | Type | Description |
|---|---|---|
| savedScreenshotPath | String | Path of the saved image file |
Gets data about the current plugin and RPC version.
1/51Response Fields:
| Name | Type | Description |
|---|---|---|
| obsVersion | String | Current OBS Studio version |
| obsWebSocketVersion | String | Current obs-websocket version |
| rpcVersion | Number | Current latest obs-websocket RPC version |
| availableRequests | Array<String> | Array of available RPC requests for the currently negotiated RPC version |
| supportedImageFormats | Array<String> | Image formats available in GetSourceScreenshot and SaveSourceScreenshot requests. |
| platform | String | Name of the platform. Usually windows, macos, or ubuntu (linux flavor). Not guaranteed to be any of those |
| platformDescription | String | Description of the platform, like Windows 10 (10.0) |
Gets statistics about OBS, obs-websocket, and the current session.
2/51Response Fields:
| Name | Type | Description |
|---|---|---|
| cpuUsage | Number | Current CPU usage in percent |
| memoryUsage | Number | Amount of memory in MB currently being used by OBS |
| availableDiskSpace | Number | Available disk space on the device being used for recording storage |
| activeFps | Number | Current FPS being rendered |
| averageFrameRenderTime | Number | Average time in milliseconds that OBS is taking to render a frame |
| renderSkippedFrames | Number | Number of frames skipped by OBS in the render thread |
| renderTotalFrames | Number | Total number of frames outputted by the render thread |
| outputSkippedFrames | Number | Number of frames skipped by OBS in the output thread |
| outputTotalFrames | Number | Total number of frames outputted by the output thread |
| webSocketSessionIncomingMessages | Number | Total number of messages received by obs-websocket from the client |
| webSocketSessionOutgoingMessages | Number | Total number of messages sent by obs-websocket to the client |
Broadcasts a CustomEvent to all WebSocket clients. Receivers are clients which are identified and subscribed.
1/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| eventData | Object | Data payload to emit to all receivers | None | N/A |
Call a request registered to a vendor.
A vendor is a unique name registered by a third-party plugin or script, which allows for custom requests and events to be added to obs-websocket. If a plugin or script implements vendor requests or events, documentation is expected to be provided with them.
3/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| vendorName | String | Name of the vendor to use | None | N/A |
| requestType | String | The request type to call | None | N/A |
| ?requestData | Object | Object containing appropriate request data | None | {} |
Response Fields:
| Name | Type | Description |
|---|---|---|
| vendorName | String | Echoed of vendorName |
| requestType | String | Echoed of requestType |
| responseData | Object | Object containing appropriate response data. {} if request does not provide any response data |
Gets an array of all hotkey names in OBS
3/51Response Fields:
| Name | Type | Description |
|---|---|---|
| hotkeys | Array<String> | Array of hotkey names |
Triggers a hotkey using its name. See GetHotkeyList
3/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| hotkeyName | String | Name of the hotkey to trigger | None | N/A |
Triggers a hotkey using a sequence of keys.
4/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| ?keyId | String | The OBS key ID to use. See https://github.com/obsproject/obs-studio/blob/master/libobs/obs-hotkeys.h | None | Not pressed |
| ?keyModifiers | Object | Object containing key modifiers to apply | None | Ignored |
| ?keyModifiers.shift | Boolean | Press Shift | None | Not pressed |
| ?keyModifiers.control | Boolean | Press CTRL | None | Not pressed |
| ?keyModifiers.alt | Boolean | Press ALT | None | Not pressed |
| ?keyModifiers.command | Boolean | Press CMD (Mac) | None | Not pressed |
Sleeps for a time duration or number of frames. Only available in request batches with types SERIAL_REALTIME or SERIAL_FRAME.
2/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| ?sleepMillis | Number | Number of milliseconds to sleep for (if SERIAL_REALTIME mode) |
>= 0, <= 50000 | Unknown |
| ?sleepFrames | Number | Number of frames to sleep for (if SERIAL_FRAME mode) |
>= 0, <= 10000 | Unknown |
Gets the value of a “slot” from the selected persistent data realm.
2/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| realm | String | The data realm to select. OBS_WEBSOCKET_DATA_REALM_GLOBAL or OBS_WEBSOCKET_DATA_REALM_PROFILE |
None | N/A |
| slotName | String | The name of the slot to retrieve data from | None | N/A |
Response Fields:
| Name | Type | Description |
|---|---|---|
| slotValue | Any | Value associated with the slot. null if not set |
Sets the value of a “slot” from the selected persistent data realm.
2/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| realm | String | The data realm to select. OBS_WEBSOCKET_DATA_REALM_GLOBAL or OBS_WEBSOCKET_DATA_REALM_PROFILE |
None | N/A |
| slotName | String | The name of the slot to retrieve data from | None | N/A |
| slotValue | Any | The value to apply to the slot | None | N/A |
Gets an array of all scene collections
1/51Response Fields:
| Name | Type | Description |
|---|---|---|
| currentSceneCollectionName | String | The name of the current scene collection |
| sceneCollections | Array<String> | Array of all available scene collections |
Switches to a scene collection.
Note: This will block until the collection has finished changing.
1/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| sceneCollectionName | String | Name of the scene collection to switch to | None | N/A |
Creates a new scene collection, switching to it in the process.
Note: This will block until the collection has finished changing.
1/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| sceneCollectionName | String | Name for the new scene collection | None | N/A |
Gets an array of all profiles
1/51Response Fields:
| Name | Type | Description |
|---|---|---|
| currentProfileName | String | The name of the current profile |
| profiles | Array<String> | Array of all available profiles |
Switches to a profile.
1/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| profileName | String | Name of the profile to switch to | None | N/A |
Creates a new profile, switching to it in the process
1/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| profileName | String | Name for the new profile | None | N/A |
Removes a profile. If the current profile is chosen, it will change to a different profile first.
1/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| profileName | String | Name of the profile to remove | None | N/A |
Gets a parameter from the current profile’s configuration.
4/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| parameterCategory | String | Category of the parameter to get | None | N/A |
| parameterName | String | Name of the parameter to get | None | N/A |
Response Fields:
| Name | Type | Description |
|---|---|---|
| parameterValue | String | Value associated with the parameter. null if not set and no default |
| defaultParameterValue | String | Default value associated with the parameter. null if no default |
Sets the value of a parameter in the current profile’s configuration.
4/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| parameterCategory | String | Category of the parameter to set | None | N/A |
| parameterName | String | Name of the parameter to set | None | N/A |
| parameterValue | String | Value of the parameter to set. Use null to delete |
None | N/A |
Gets the current video settings.
Note: To get the true FPS value, divide the FPS numerator by the FPS denominator. Example: 60000/1001
2/51Response Fields:
| Name | Type | Description |
|---|---|---|
| fpsNumerator | Number | Numerator of the fractional FPS value |
| fpsDenominator | Number | Denominator of the fractional FPS value |
| baseWidth | Number | Width of the base (canvas) resolution in pixels |
| baseHeight | Number | Height of the base (canvas) resolution in pixels |
| outputWidth | Number | Width of the output resolution in pixels |
| outputHeight | Number | Height of the output resolution in pixels |
Sets the current video settings.
Note: Fields must be specified in pairs. For example, you cannot set only baseWidth without needing to specify baseHeight.
2/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| ?fpsNumerator | Number | Numerator of the fractional FPS value | >= 1 | Not changed |
| ?fpsDenominator | Number | Denominator of the fractional FPS value | >= 1 | Not changed |
| ?baseWidth | Number | Width of the base (canvas) resolution in pixels | >= 1, <= 4096 | Not changed |
| ?baseHeight | Number | Height of the base (canvas) resolution in pixels | >= 1, <= 4096 | Not changed |
| ?outputWidth | Number | Width of the output resolution in pixels | >= 1, <= 4096 | Not changed |
| ?outputHeight | Number | Height of the output resolution in pixels | >= 1, <= 4096 | Not changed |
Gets the current stream service settings (stream destination).
4/51Response Fields:
| Name | Type | Description |
|---|---|---|
| streamServiceType | String | Stream service type, like rtmp_custom or rtmp_common |
| streamServiceSettings | Object | Stream service settings |
Sets the current stream service settings (stream destination).
Note: Simple RTMP settings can be set with type rtmp_custom and the settings fields server and key.
4/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| streamServiceType | String | Type of stream service to apply. Example: rtmp_common or rtmp_custom |
None | N/A |
| streamServiceSettings | Object | Settings to apply to the service | None | N/A |
Gets the current directory that the record output is set to.
2/51Response Fields:
| Name | Type | Description |
|---|---|---|
| recordDirectory | String | Output directory |
Sets the current directory that the record output writes files to.
2/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| recordDirectory | String | Output directory | None | N/A |
Gets the active and show state of a source.
Compatible with inputs and scenes.
2/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| sourceName | String | Name of the source to get the active state of | None | N/A |
Response Fields:
| Name | Type | Description |
|---|---|---|
| videoActive | Boolean | Whether the source is showing in Program |
| videoShowing | Boolean | Whether the source is showing in the UI (Preview, Projector, Properties) |
Gets a Base64-encoded screenshot of a source.
The imageWidth and imageHeight parameters are treated as “scale to inner”, meaning the smallest ratio will be used and the aspect ratio of the original resolution is kept.
If imageWidth and imageHeight are not specified, the compressed image will use the full resolution of the source.
Compatible with inputs and scenes.
4/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| sourceName | String | Name of the source to take a screenshot of | None | N/A |
| imageFormat | String | Image compression format to use. Use GetVersion to get compatible image formats |
None | N/A |
| ?imageWidth | Number | Width to scale the screenshot to | >= 8, <= 4096 | Source value is used |
| ?imageHeight | Number | Height to scale the screenshot to | >= 8, <= 4096 | Source value is used |
| ?imageCompressionQuality | Number | Compression quality to use. 0 for high compression, 100 for uncompressed. -1 to use “default” (whatever that means, idk) | >= -1, <= 100 | -1 |
Response Fields:
| Name | Type | Description |
|---|---|---|
| imageData | String | Base64-encoded screenshot |
Saves a screenshot of a source to the filesystem.
The imageWidth and imageHeight parameters are treated as “scale to inner”, meaning the smallest ratio will be used and the aspect ratio of the original resolution is kept.
If imageWidth and imageHeight are not specified, the compressed image will use the full resolution of the source.
Compatible with inputs and scenes.
3/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| sourceName | String | Name of the source to take a screenshot of | None | N/A |
| imageFormat | String | Image compression format to use. Use GetVersion to get compatible image formats |
None | N/A |
| imageFilePath | String | Path to save the screenshot file to. Eg. C:\Users\user\Desktop\screenshot.png |
None | N/A |
| ?imageWidth | Number | Width to scale the screenshot to | >= 8, <= 4096 | Source value is used |
| ?imageHeight | Number | Height to scale the screenshot to | >= 8, <= 4096 | Source value is used |
| ?imageCompressionQuality | Number | Compression quality to use. 0 for high compression, 100 for uncompressed. -1 to use “default” (whatever that means, idk) | >= -1, <= 100 | -1 |
Response Fields:
| Name | Type | Description |
|---|---|---|
| imageData | String | Base64-encoded screenshot |
Gets an array of all scenes in OBS.
2/51Response Fields:
| Name | Type | Description |
|---|---|---|
| currentProgramSceneName | String | Current program scene |
| currentPreviewSceneName | String | Current preview scene. null if not in studio mode |
| scenes | Array<Object> | Array of scenes |
Gets an array of all groups in OBS.
Groups in OBS are actually scenes, but renamed and modified. In obs-websocket, we treat them as scenes where we can.
2/51Response Fields:
| Name | Type | Description |
|---|---|---|
| groups | Array<String> | Array of group names |
Gets the current program scene.
1/51Response Fields:
| Name | Type | Description |
|---|---|---|
| currentProgramSceneName | String | Current program scene |
Sets the current program scene.
1/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| sceneName | String | Scene to set as the current program scene | None | N/A |
Gets the current preview scene.
Only available when studio mode is enabled.
1/51Response Fields:
| Name | Type | Description |
|---|---|---|
| currentPreviewSceneName | String | Current preview scene |
Sets the current preview scene.
Only available when studio mode is enabled.
1/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| sceneName | String | Scene to set as the current preview scene | None | N/A |
Creates a new scene in OBS.
2/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| sceneName | String | Name for the new scene | None | N/A |
Removes a scene from OBS.
2/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| sceneName | String | Name of the scene to remove | None | N/A |
Sets the name of a scene (rename).
2/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| sceneName | String | Name of the scene to be renamed | None | N/A |
| newSceneName | String | New name for the scene | None | N/A |
Gets the scene transition overridden for a scene.
2/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| sceneName | String | Name of the scene | None | N/A |
Response Fields:
| Name | Type | Description |
|---|---|---|
| transitionName | String | Name of the overridden scene transition, else null |
| transitionDuration | Number | Duration of the overridden scene transition, else null |
Sets the scene transition overridden for a scene.
2/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| sceneName | String | Name of the scene | None | N/A |
| ?transitionName | String | Name of the scene transition to use as override. Specify null to remove |
None | Unchanged |
| ?transitionDuration | Number | Duration to use for any overridden transition. Specify null to remove |
>= 50, <= 20000 | Unchanged |
Gets an array of all inputs in OBS.
2/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| ?inputKind | String | Restrict the array to only inputs of the specified kind | None | All kinds included |
Response Fields:
| Name | Type | Description |
|---|---|---|
| inputs | Array<Object> | Array of inputs |
Gets an array of all available input kinds in OBS.
2/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| ?unversioned | Boolean | True == Return all kinds as unversioned, False == Return with version suffixes (if available) | None | false |
Response Fields:
| Name | Type | Description |
|---|---|---|
| inputKinds | Array<String> | Array of input kinds |
Gets the names of all special inputs.
2/51Response Fields:
| Name | Type | Description |
|---|---|---|
| desktop1 | String | Name of the Desktop Audio input |
| desktop2 | String | Name of the Desktop Audio 2 input |
| mic1 | String | Name of the Mic/Auxiliary Audio input |
| mic2 | String | Name of the Mic/Auxiliary Audio 2 input |
| mic3 | String | Name of the Mic/Auxiliary Audio 3 input |
| mic4 | String | Name of the Mic/Auxiliary Audio 4 input |
Creates a new input, adding it as a scene item to the specified scene.
3/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| sceneName | String | Name of the scene to add the input to as a scene item | None | N/A |
| inputName | String | Name of the new input to created | None | N/A |
| inputKind | String | The kind of input to be created | None | N/A |
| ?inputSettings | Object | Settings object to initialize the input with | None | Default settings used |
| ?sceneItemEnabled | Boolean | Whether to set the created scene item to enabled or disabled | None | True |
Response Fields:
| Name | Type | Description |
|---|---|---|
| sceneItemId | Number | ID of the newly created scene item |
Removes an existing input.
Note: Will immediately remove all associated scene items.
2/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| inputName | String | Name of the input to remove | None | N/A |
Sets the name of an input (rename).
2/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| inputName | String | Current input name | None | N/A |
| newInputName | String | New name for the input | None | N/A |
Gets the default settings for an input kind.
3/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| inputKind | String | Input kind to get the default settings for | None | N/A |
Response Fields:
| Name | Type | Description |
|---|---|---|
| defaultInputSettings | Object | Object of default settings for the input kind |
Gets the settings of an input.
Note: Does not include defaults. To create the entire settings object, overlay inputSettings over the defaultInputSettings provided by GetInputDefaultSettings.
3/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| inputName | String | Name of the input to get the settings of | None | N/A |
Response Fields:
| Name | Type | Description |
|---|---|---|
| inputSettings | Object | Object of settings for the input |
| inputKind | String | The kind of the input |
Sets the settings of an input.
3/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| inputName | String | Name of the input to set the settings of | None | N/A |
| inputSettings | Object | Object of settings to apply | None | N/A |
| ?overlay | Boolean | True == apply the settings on top of existing ones, False == reset the input to its defaults, then apply settings. | None | true |
Gets the audio mute state of an input.
2/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| inputName | String | Name of input to get the mute state of | None | N/A |
Response Fields:
| Name | Type | Description |
|---|---|---|
| inputMuted | Boolean | Whether the input is muted |
Sets the audio mute state of an input.
2/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| inputName | String | Name of the input to set the mute state of | None | N/A |
| inputMuted | Boolean | Whether to mute the input or not | None | N/A |
Toggles the audio mute state of an input.
2/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| inputName | String | Name of the input to toggle the mute state of | None | N/A |
Response Fields:
| Name | Type | Description |
|---|---|---|
| inputMuted | Boolean | Whether the input has been muted or unmuted |
Gets the current volume setting of an input.
3/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| inputName | String | Name of the input to get the volume of | None | N/A |
Response Fields:
| Name | Type | Description |
|---|---|---|
| inputVolumeMul | Number | Volume setting in mul |
| inputVolumeDb | Number | Volume setting in dB |
Sets the volume setting of an input.
3/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| inputName | String | Name of the input to set the volume of | None | N/A |
| ?inputVolumeMul | Number | Volume setting in mul | >= 0, <= 20 | inputVolumeDb should be specified |
| ?inputVolumeDb | Number | Volume setting in dB | >= -100, <= 26 | inputVolumeMul should be specified |
Gets the audio balance of an input.
2/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| inputName | String | Name of the input to get the audio balance of | None | N/A |
Response Fields:
| Name | Type | Description |
|---|---|---|
| inputAudioBalance | Number | Audio balance value from 0.0-1.0 |
Sets the audio balance of an input.
2/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| inputName | String | Name of the input to set the audio balance of | None | N/A |
| inputAudioBalance | Number | New audio balance value | >= 0.0, <= 1.0 | N/A |
Gets the audio sync offset of an input.
Note: The audio sync offset can be negative too!
3/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| inputName | String | Name of the input to get the audio sync offset of | None | N/A |
Response Fields:
| Name | Type | Description |
|---|---|---|
| inputAudioSyncOffset | Number | Audio sync offset in milliseconds |
Sets the audio sync offset of an input.
3/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| inputName | String | Name of the input to set the audio sync offset of | None | N/A |
| inputAudioSyncOffset | Number | New audio sync offset in milliseconds | >= -950, <= 20000 | N/A |
Gets the audio monitor type of an input.
The available audio monitor types are:
OBS_MONITORING_TYPE_NONEOBS_MONITORING_TYPE_MONITOR_ONLYOBS_MONITORING_TYPE_MONITOR_AND_OUTPUT
Complexity Rating: 2/5
1Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| inputName | String | Name of the input to get the audio monitor type of | None | N/A |
Response Fields:
| Name | Type | Description |
|---|---|---|
| monitorType | String | Audio monitor type |
Sets the audio monitor type of an input.
2/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| inputName | String | Name of the input to set the audio monitor type of | None | N/A |
| monitorType | String | Audio monitor type | None | N/A |
Gets the enable state of all audio tracks of an input.
2/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| inputName | String | Name of the input | None | N/A |
Response Fields:
| Name | Type | Description |
|---|---|---|
| inputAudioTracks | Object | Object of audio tracks and associated enable states |
Sets the enable state of audio tracks of an input.
2/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| inputName | String | Name of the input | None | N/A |
| inputAudioTracks | Object | Track settings to apply | None | N/A |
Gets the items of a list property from an input’s properties.
Note: Use this in cases where an input provides a dynamic, selectable list of items. For example, display capture, where it provides a list of available displays.
4/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| inputName | String | Name of the input | None | N/A |
| propertyName | String | Name of the list property to get the items of | None | N/A |
Response Fields:
| Name | Type | Description |
|---|---|---|
| propertyItems | Array<Object> | Array of items in the list property |
Presses a button in the properties of an input.
Some known propertyName values are:
refreshnocache - Browser source reload buttonNote: Use this in cases where there is a button in the properties of an input that cannot be accessed in any other way. For example, browser sources, where there is a refresh button.
4/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| inputName | String | Name of the input | None | N/A |
| propertyName | String | Name of the button property to press | None | N/A |
Gets an array of all available transition kinds.
Similar to GetInputKindList
2/51Response Fields:
| Name | Type | Description |
|---|---|---|
| transitionKinds | Array<String> | Array of transition kinds |
Gets an array of all scene transitions in OBS.
3/51Response Fields:
| Name | Type | Description |
|---|---|---|
| currentSceneTransitionName | String | Name of the current scene transition. Can be null |
| currentSceneTransitionKind | String | Kind of the current scene transition. Can be null |
| transitions | Array<Object> | Array of transitions |
Gets information about the current scene transition.
2/51Response Fields:
| Name | Type | Description |
|---|---|---|
| transitionName | String | Name of the transition |
| transitionKind | String | Kind of the transition |
| transitionFixed | Boolean | Whether the transition uses a fixed (unconfigurable) duration |
| transitionDuration | Number | Configured transition duration in milliseconds. null if transition is fixed |
| transitionConfigurable | Boolean | Whether the transition supports being configured |
| transitionSettings | Object | Object of settings for the transition. null if transition is not configurable |
Sets the current scene transition.
Small note: While the namespace of scene transitions is generally unique, that uniqueness is not a guarantee as it is with other resources like inputs.
2/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| transitionName | String | Name of the transition to make active | None | N/A |
Sets the duration of the current scene transition, if it is not fixed.
2/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| transitionDuration | Number | Duration in milliseconds | >= 50, <= 20000 | N/A |
Sets the settings of the current scene transition.
3/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| transitionSettings | Object | Settings object to apply to the transition. Can be {} |
None | N/A |
| ?overlay | Boolean | Whether to overlay over the current settings or replace them | None | true |
Gets the cursor position of the current scene transition.
Note: transitionCursor will return 1.0 when the transition is inactive.
2/51Response Fields:
| Name | Type | Description |
|---|---|---|
| transitionCursor | Number | Cursor position, between 0.0 and 1.0 |
Triggers the current scene transition. Same functionality as the Transition button in studio mode.
1/51Sets the position of the TBar.
Very important note: This will be deprecated and replaced in a future version of obs-websocket.
3/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| position | Number | New position | >= 0.0, <= 1.0 | N/A |
| ?release | Boolean | Whether to release the TBar. Only set false if you know that you will be sending another position update |
None | true |
Gets an array of all of a source’s filters.
2/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| sourceName | String | Name of the source | None | N/A |
Response Fields:
| Name | Type | Description |
|---|---|---|
| filters | Array<Object> | Array of filters |
Gets the default settings for a filter kind.
3/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| filterKind | String | Filter kind to get the default settings for | None | N/A |
Response Fields:
| Name | Type | Description |
|---|---|---|
| defaultFilterSettings | Object | Object of default settings for the filter kind |
Creates a new filter, adding it to the specified source.
3/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| sourceName | String | Name of the source to add the filter to | None | N/A |
| filterName | String | Name of the new filter to be created | None | N/A |
| filterKind | String | The kind of filter to be created | None | N/A |
| ?filterSettings | Object | Settings object to initialize the filter with | None | Default settings used |
Removes a filter from a source.
2/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| sourceName | String | Name of the source the filter is on | None | N/A |
| filterName | String | Name of the filter to remove | None | N/A |
Sets the name of a source filter (rename).
2/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| sourceName | String | Name of the source the filter is on | None | N/A |
| filterName | String | Current name of the filter | None | N/A |
| newFilterName | String | New name for the filter | None | N/A |
Gets the info for a specific source filter.
2/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| sourceName | String | Name of the source | None | N/A |
| filterName | String | Name of the filter | None | N/A |
Response Fields:
| Name | Type | Description |
|---|---|---|
| filterEnabled | Boolean | Whether the filter is enabled |
| filterIndex | Number | Index of the filter in the list, beginning at 0 |
| filterKind | String | The kind of filter |
| filterSettings | Object | Settings object associated with the filter |
Sets the index position of a filter on a source.
3/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| sourceName | String | Name of the source the filter is on | None | N/A |
| filterName | String | Name of the filter | None | N/A |
| filterIndex | Number | New index position of the filter | >= 0 | N/A |
Sets the settings of a source filter.
3/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| sourceName | String | Name of the source the filter is on | None | N/A |
| filterName | String | Name of the filter to set the settings of | None | N/A |
| filterSettings | Object | Object of settings to apply | None | N/A |
| ?overlay | Boolean | True == apply the settings on top of existing ones, False == reset the input to its defaults, then apply settings. | None | true |
Sets the enable state of a source filter.
3/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| sourceName | String | Name of the source the filter is on | None | N/A |
| filterName | String | Name of the filter | None | N/A |
| filterEnabled | Boolean | New enable state of the filter | None | N/A |
Gets a list of all scene items in a scene.
Scenes only
3/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| sceneName | String | Name of the scene to get the items of | None | N/A |
Response Fields:
| Name | Type | Description |
|---|---|---|
| sceneItems | Array<Object> | Array of scene items in the scene |
Basically GetSceneItemList, but for groups.
Using groups at all in OBS is discouraged, as they are very broken under the hood. Please use nested scenes instead.
Groups only
3/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| sceneName | String | Name of the group to get the items of | None | N/A |
Response Fields:
| Name | Type | Description |
|---|---|---|
| sceneItems | Array<Object> | Array of scene items in the group |
Searches a scene for a source, and returns its id.
Scenes and Groups
3/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| sceneName | String | Name of the scene or group to search in | None | N/A |
| sourceName | String | Name of the source to find | None | N/A |
| ?searchOffset | Number | Number of matches to skip during search. >= 0 means first forward. -1 means last (top) item | >= -1 | 0 |
Response Fields:
| Name | Type | Description |
|---|---|---|
| sceneItemId | Number | Numeric ID of the scene item |
Creates a new scene item using a source.
Scenes only
3/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| sceneName | String | Name of the scene to create the new item in | None | N/A |
| sourceName | String | Name of the source to add to the scene | None | N/A |
| ?sceneItemEnabled | Boolean | Enable state to apply to the scene item on creation | None | True |
Response Fields:
| Name | Type | Description |
|---|---|---|
| sceneItemId | Number | Numeric ID of the scene item |
Removes a scene item from a scene.
Scenes only
3/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| sceneName | String | Name of the scene the item is in | None | N/A |
| sceneItemId | Number | Numeric ID of the scene item | >= 0 | N/A |
Duplicates a scene item, copying all transform and crop info.
Scenes only
3/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| sceneName | String | Name of the scene the item is in | None | N/A |
| sceneItemId | Number | Numeric ID of the scene item | >= 0 | N/A |
| ?destinationSceneName | String | Name of the scene to create the duplicated item in | None | sceneName is assumed |
Response Fields:
| Name | Type | Description |
|---|---|---|
| sceneItemId | Number | Numeric ID of the duplicated scene item |
Gets the transform and crop info of a scene item.
Scenes and Groups
3/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| sceneName | String | Name of the scene the item is in | None | N/A |
| sceneItemId | Number | Numeric ID of the scene item | >= 0 | N/A |
Response Fields:
| Name | Type | Description |
|---|---|---|
| sceneItemTransform | Object | Object containing scene item transform info |
Sets the transform and crop info of a scene item.
3/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| sceneName | String | Name of the scene the item is in | None | N/A |
| sceneItemId | Number | Numeric ID of the scene item | >= 0 | N/A |
| sceneItemTransform | Object | Object containing scene item transform info to update | None | N/A |
Gets the enable state of a scene item.
Scenes and Groups
3/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| sceneName | String | Name of the scene the item is in | None | N/A |
| sceneItemId | Number | Numeric ID of the scene item | >= 0 | N/A |
Response Fields:
| Name | Type | Description |
|---|---|---|
| sceneItemEnabled | Boolean | Whether the scene item is enabled. true for enabled, false for disabled |
Sets the enable state of a scene item.
Scenes and Groups
3/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| sceneName | String | Name of the scene the item is in | None | N/A |
| sceneItemId | Number | Numeric ID of the scene item | >= 0 | N/A |
| sceneItemEnabled | Boolean | New enable state of the scene item | None | N/A |
Gets the lock state of a scene item.
Scenes and Groups
3/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| sceneName | String | Name of the scene the item is in | None | N/A |
| sceneItemId | Number | Numeric ID of the scene item | >= 0 | N/A |
Response Fields:
| Name | Type | Description |
|---|---|---|
| sceneItemLocked | Boolean | Whether the scene item is locked. true for locked, false for unlocked |
Sets the lock state of a scene item.
Scenes and Group
3/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| sceneName | String | Name of the scene the item is in | None | N/A |
| sceneItemId | Number | Numeric ID of the scene item | >= 0 | N/A |
| sceneItemLocked | Boolean | New lock state of the scene item | None | N/A |
Gets the index position of a scene item in a scene.
An index of 0 is at the bottom of the source list in the UI.
Scenes and Groups
3/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| sceneName | String | Name of the scene the item is in | None | N/A |
| sceneItemId | Number | Numeric ID of the scene item | >= 0 | N/A |
Response Fields:
| Name | Type | Description |
|---|---|---|
| sceneItemIndex | Number | Index position of the scene item |
Sets the index position of a scene item in a scene.
Scenes and Groups
3/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| sceneName | String | Name of the scene the item is in | None | N/A |
| sceneItemId | Number | Numeric ID of the scene item | >= 0 | N/A |
| sceneItemIndex | Number | New index position of the scene item | >= 0 | N/A |
Gets the blend mode of a scene item.
Blend modes:
OBS_BLEND_NORMALOBS_BLEND_ADDITIVEOBS_BLEND_SUBTRACTOBS_BLEND_SCREENOBS_BLEND_MULTIPLYOBS_BLEND_LIGHTENOBS_BLEND_DARKENScenes and Groups
2/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| sceneName | String | Name of the scene the item is in | None | N/A |
| sceneItemId | Number | Numeric ID of the scene item | >= 0 | N/A |
Response Fields:
| Name | Type | Description |
|---|---|---|
| sceneItemBlendMode | String | Current blend mode |
Sets the blend mode of a scene item.
Scenes and Groups
2/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| sceneName | String | Name of the scene the item is in | None | N/A |
| sceneItemId | Number | Numeric ID of the scene item | >= 0 | N/A |
| sceneItemBlendMode | String | New blend mode | None | N/A |
Gets the status of the virtualcam output.
1/51Response Fields:
| Name | Type | Description |
|---|---|---|
| outputActive | Boolean | Whether the output is active |
Toggles the state of the virtualcam output.
1/51Response Fields:
| Name | Type | Description |
|---|---|---|
| outputActive | Boolean | Whether the output is active |
Starts the virtualcam output.
1/51Stops the virtualcam output.
1/51Gets the status of the replay buffer output.
1/51Response Fields:
| Name | Type | Description |
|---|---|---|
| outputActive | Boolean | Whether the output is active |
Toggles the state of the replay buffer output.
1/51Response Fields:
| Name | Type | Description |
|---|---|---|
| outputActive | Boolean | Whether the output is active |
Starts the replay buffer output.
1/51Stops the replay buffer output.
1/51Saves the contents of the replay buffer output.
1/51Gets the filename of the last replay buffer save file.
2/51Response Fields:
| Name | Type | Description |
|---|---|---|
| savedReplayPath | String | File path |
Gets the list of available outputs.
4/51Response Fields:
| Name | Type | Description |
|---|---|---|
| outputs | Array<Object> | Array of outputs |
Gets the status of an output.
4/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| outputName | String | Output name | None | N/A |
Response Fields:
| Name | Type | Description |
|---|---|---|
| outputActive | Boolean | Whether the output is active |
| outputReconnecting | Boolean | Whether the output is reconnecting |
| outputTimecode | String | Current formatted timecode string for the output |
| outputDuration | Number | Current duration in milliseconds for the output |
| outputCongestion | Number | Congestion of the output |
| outputBytes | Number | Number of bytes sent by the output |
| outputSkippedFrames | Number | Number of frames skipped by the output’s process |
| outputTotalFrames | Number | Total number of frames delivered by the output’s process |
Toggles the status of an output.
4/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| outputName | String | Output name | None | N/A |
Response Fields:
| Name | Type | Description |
|---|---|---|
| outputActive | Boolean | Whether the output is active |
Starts an output.
4/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| outputName | String | Output name | None | N/A |
Stops an output.
4/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| outputName | String | Output name | None | N/A |
Gets the settings of an output.
4/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| outputName | String | Output name | None | N/A |
Response Fields:
| Name | Type | Description |
|---|---|---|
| outputSettings | Object | Output settings |
Sets the settings of an output.
4/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| outputName | String | Output name | None | N/A |
| outputSettings | Object | Output settings | None | N/A |
Gets the status of the stream output.
2/51Response Fields:
| Name | Type | Description |
|---|---|---|
| outputActive | Boolean | Whether the output is active |
| outputReconnecting | Boolean | Whether the output is currently reconnecting |
| outputTimecode | String | Current formatted timecode string for the output |
| outputDuration | Number | Current duration in milliseconds for the output |
| outputCongestion | Number | Congestion of the output |
| outputBytes | Number | Number of bytes sent by the output |
| outputSkippedFrames | Number | Number of frames skipped by the output’s process |
| outputTotalFrames | Number | Total number of frames delivered by the output’s process |
Toggles the status of the stream output.
1/51Response Fields:
| Name | Type | Description |
|---|---|---|
| outputActive | Boolean | New state of the stream output |
Starts the stream output.
1/51Stops the stream output.
1/51Sends CEA-608 caption text over the stream output.
2/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| captionText | String | Caption text | None | N/A |
Gets the status of the record output.
2/51Response Fields:
| Name | Type | Description |
|---|---|---|
| outputActive | Boolean | Whether the output is active |
| outputPaused | Boolean | Whether the output is paused |
| outputTimecode | String | Current formatted timecode string for the output |
| outputDuration | Number | Current duration in milliseconds for the output |
| outputBytes | Number | Number of bytes sent by the output |
Toggles the status of the record output.
1/51Starts the record output.
1/51Stops the record output.
1/51Response Fields:
| Name | Type | Description |
|---|---|---|
| outputPath | String | File name for the saved recording |
Toggles pause on the record output.
1/51Pauses the record output.
1/51Resumes the record output.
1/51Gets the status of a media input.
Media States:
OBS_MEDIA_STATE_NONEOBS_MEDIA_STATE_PLAYINGOBS_MEDIA_STATE_OPENINGOBS_MEDIA_STATE_BUFFERINGOBS_MEDIA_STATE_PAUSEDOBS_MEDIA_STATE_STOPPEDOBS_MEDIA_STATE_ENDEDOBS_MEDIA_STATE_ERROR
Complexity Rating: 2/5
1Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| inputName | String | Name of the media input | None | N/A |
Response Fields:
| Name | Type | Description |
|---|---|---|
| mediaState | String | State of the media input |
| mediaDuration | Number | Total duration of the playing media in milliseconds. null if not playing |
| mediaCursor | Number | Position of the cursor in milliseconds. null if not playing |
Sets the cursor position of a media input.
This request does not perform bounds checking of the cursor position.
2/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| inputName | String | Name of the media input | None | N/A |
| mediaCursor | Number | New cursor position to set | >= 0 | N/A |
Offsets the current cursor position of a media input by the specified value.
This request does not perform bounds checking of the cursor position.
2/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| inputName | String | Name of the media input | None | N/A |
| mediaCursorOffset | Number | Value to offset the current cursor position by | None | N/A |
Triggers an action on a media input.
2/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| inputName | String | Name of the media input | None | N/A |
| mediaAction | String | Identifier of the ObsMediaInputAction enum |
None | N/A |
Gets whether studio is enabled.
1/51Response Fields:
| Name | Type | Description |
|---|---|---|
| studioModeEnabled | Boolean | Whether studio mode is enabled |
Enables or disables studio mode
1/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| studioModeEnabled | Boolean | True == Enabled, False == Disabled | None | N/A |
Opens the properties dialog of an input.
1/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| inputName | String | Name of the input to open the dialog of | None | N/A |
Opens the filters dialog of an input.
1/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| inputName | String | Name of the input to open the dialog of | None | N/A |
Opens the interact dialog of an input.
1/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| inputName | String | Name of the input to open the dialog of | None | N/A |
Gets a list of connected monitors and information about them.
2/51Response Fields:
| Name | Type | Description |
|---|---|---|
| monitors | Array<Object> | a list of detected monitors with some information |
Opens a projector for a specific output video mix.
Mix types:
OBS_WEBSOCKET_VIDEO_MIX_TYPE_PREVIEWOBS_WEBSOCKET_VIDEO_MIX_TYPE_PROGRAMOBS_WEBSOCKET_VIDEO_MIX_TYPE_MULTIVIEWNote: This request serves to provide feature parity with 4.x. It is very likely to be changed/deprecated in a future release.
3/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| videoMixType | String | Type of mix to open | None | N/A |
| ?monitorIndex | Number | Monitor index, use GetMonitorList to obtain index |
None | -1: Opens projector in windowed mode |
| ?projectorGeometry | String | Size/Position data for a windowed projector, in Qt Base64 encoded format. Mutually exclusive with monitorIndex |
None | N/A |
Opens a projector for a source.
Note: This request serves to provide feature parity with 4.x. It is very likely to be changed/deprecated in a future release.
3/51Request Fields:
| Name | Type | Description | Value Restrictions | ?Default Behavior |
|---|---|---|---|---|
| sourceName | String | Name of the source to open a projector for | None | N/A |
| ?monitorIndex | Number | Monitor index, use GetMonitorList to obtain index |
None | -1: Opens projector in windowed mode |
| ?projectorGeometry | String | Size/Position data for a windowed projector, in Qt Base64 encoded format. Mutually exclusive with monitorIndex |
None | N/A |