obs_websocket library

Messages are exchanged between the client and the server as JSON objects. The protocol is based on the original OBS Remote protocol created by Bill Hamilton, with new commands specific to OBS Studio.

Classes

Authentication
BooleanResponse
Maps to a boolean response form the websocket. bool? fields are added to the class for each Response type needed.
CallVendorRequestResponse
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.
Canvas
Represents a canvas in OBS.
CanvasFlags
These flags indicate the properties and capabilities of a canvas.
CanvasListResponse
Response for GetCanvasList request.
CanvasVideoSettings
Contains resolution and frame rate configuration.
CreateInputResponse
Event
EventOpcode
FromJsonSingleton
Hello
HelloOpcode
Identified
Identify
IdentifyOpcode
Input
InputAudioBalanceResponse
Response for GetInputAudioBalance request
InputAudioMonitorTypeResponse
Response for GetInputAudioMonitorType request
InputAudioSyncOffsetResponse
Response for GetInputAudioSyncOffset request
InputAudioTracksResponse
Response for GetInputAudioTracks request
InputDefaultSettingsResponse
InputDeinterlaceFieldOrderResponse
InputDeinterlaceModeResponse
InputKindResponse
InputPropertiesListPropertyItemsResponse
Response for GetInputPropertiesListPropertyItems request
InputSettingsResponse
InputVolumeResponse
IntegerResponse
Maps to a integer response form the websocket. int? fields are added to the class for each Response type needed.
KeyModifiers
MediaInputStatusResponse
Monitor
MonitorListResponse
ObsUtil
ObsWebSocket
Opcode
ProfileListResponse
ProfileParameterResponse
Gets the current directory that the record output is set to.
PropertyItem
A single property item in a list
RecordDirectoryResponse
RecordStatusResponse
ReIdentify
ReIdentifyOpcode
Request
RequestBatch
RequestBatchOpcode
RequestBatchResponse
RequestBatchResponseOpcode
RequestData
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.
RequestOpcode
RequestResponse
RequestResponseOpcode
RequestStatus
Scene
SceneCollectionListResponse
SceneItem
SceneItemDetail
SceneItemListResponse
SceneItemTransform
Strongly-typed, partial-update friendly model of an OBS scene-item transform.
SceneListResponse
SceneSceneTransitionOverrideResponse
SourceActiveResponse
videoActive Whether the source is showing in Program videoShowing Whether the source is showing in the UI (Preview, Projector, Properties)
SourceScreenshot
SourceScreenshotResponse
imageData Base64-encoded screenshot
SpecialInputsResponse
StatsResponse
StreamServiceSettingsResponse
StreamStatusResponse
StringListResponse
StringResponse
Maps to a string response form the websocket. string? fields are added to the class for each Response type needed.
Transform
Validate
VersionResponse
VideoSettings
VideoSettingsResponse

Enums

EventSubscription
ObsAlignment
OBS scene-item alignment values.
ObsBoundsType
Bounds type values for an OBS scene item.
ObsConnectionState
Connection lifecycle states emitted by ObsWebSocket.onConnectionStateChanged.
ObsDeinterlaceFieldOrder
Deinterlace field order for an input
ObsDeinterlaceMode
Deinterlace mode for an input
ObsMediaInputAction
ObsMediaState
ObsMonitoringType
Audio monitor type for an input
RequestBatchExecutionType
RequestStatusCode
WebSocketOpCode

Extensions

BoolParsing on String

Exceptions / Errors

ObsArgumentException
Invalid argument supplied to the obs_websocket API surface (e.g. malformed URL, wrong event subscription type).
ObsAuthenticationException
The Identify / Identified handshake failed (wrong password, unsupported RPC version, missing Hello, etc).
ObsConnectionException
The WebSocket connection could not be opened, was closed unexpectedly, or the handshake failed for a non-auth reason.
ObsException
Base class for all obs_websocket errors.
ObsRequestException
An OBS Request returned a non-success RequestStatus.