A command line interface for controlling OBS with cli commands
- Easy OBS WebSocket CLI
- Installation
- Quick start
- Available Commands
- authorize
- config
- filters
- filters get-source-filter-kind-list
- filters get-source-filter-list
- filters get-source-filter-default-settings
- filters create-source-filter
- filters get-source-filter
- filters set-source-filter-settings
- filters remove-source-filter
- filters set-source-filter-name
- filters set-source-filter-index
- filters set-source-filter-enabled
- general
- inputs
- inputs get-input-kind-list
- inputs get-input-list
- inputs get-input-mute
- inputs get-input-volume
- inputs set-input-volume
- inputs get-input-deinterlace-mode
- inputs set-input-deinterlace-mode
- inputs get-input-deinterlace-field-order
- inputs set-input-deinterlace-field-order
- inputs get-input-audio-balance
- inputs set-input-audio-balance
- inputs get-input-audio-sync-offset
- inputs set-input-audio-sync-offset
- inputs get-input-audio-monitor-type
- inputs set-input-audio-monitor-type
- inputs get-input-audio-tracks
- inputs set-input-audio-tracks
- inputs get-input-properties-list-property-items
- inputs press-input-properties-button
- inputs remove-input
- inputs set-input-mute
- inputs set-input-name
- inputs toggle-input-mute
- listen
- outputs
- outputs get-virtual-cam-status
- outputs toggle-virtual-cam
- outputs start-virtual-cam
- outputs stop-virtual-cam
- outputs get-replay-buffer-status
- outputs toggle-replay-buffer
- outputs start-replay-buffer
- outputs stop-replay-buffer
- outputs save-replay-buffer
- outputs get-output-list
- outputs get-output-status
- outputs toggle-output
- outputs start-output
- outputs stop-output
- outputs get-output-settings
- outputs set-output-settings
- record
- scene-items
- scenes
- send
- sources
- stream
- transitions
- transitions get-transition-kind-list
- transitions get-scene-transition-list
- transitions get-current-scene-transition
- transitions set-current-scene-transition
- transitions set-current-scene-transition-duration
- transitions get-current-scene-transition-cursor
- transitions trigger-studio-mode-transition
- transitions set-t-bar-position
- ui
- version
- Advanced Usage
Install using dart pub:
For more information about dart and how to install it, check out dart.dev
dart pub global activate obs_cliInstall using brew:
For more information about the brew package manager and how to install it, check out brew.sh
brew tap cdavis-code/obs-websocket
brew install obs-cliInstall using choco (Windows):
For more information about the choco package manager and how to install it, check out chocolatey.org
choco install obs-cliThen check the install with,
obs --helpResult,
A command line interface for controlling OBS.
Usage: obs <command> [arguments]
Global options:
-h, --help Print this usage information.
-u, --uri=<ws://[host]:[port]> The url and port for OBS websocket
-t, --timeout=<int> The timeout in seconds for the web socket connection.
-l, --log-level [all, debug, info, warning, error, off (default)]
-p, --passwd=<string> The OBS websocket password, only required if enabled in OBS
Available commands:
authorize Generate an authentication file for an OBS connection
config Config Requests
general General commands
inputs Inputs Requests
listen Generate OBS events to stdout
scene-items Scene Items Requests
scenes Scenes Requests
send Send a low-level websocket request to OBS
sources Commands that manipulate OBS sources
stream Commands that manipulate OBS streams
ui Commands that manipulate the OBS user interface.
version Display the package name and version
| command | description |
|---|---|
| authorize | Generate an authentication file for an Onvif device |
| config | Config Requests - documentation |
| general | General commands - documentation |
| inputs | Inputs Requests - documentation |
| listen | Generate OBS events to stdout - documentation |
| scene-items | Scene Items Requests - documentation |
| scenes | Scenes Requests - documentation |
| send | Send a low-level websocket request to OBS - commands |
| sources | Commands that manipulate OBS sources - documentation |
| ui | Commands that manipulate the OBS user interface - documentation |
| stream | Commands that manipulate OBS streams - documentation |
| version | The current package and version for this tool. |
Just like the main dart library, any responses provided through the above commands will be given in JSON format. So ideally, you will want to use a command line json parser to interpret the results. The recommended json parser for this purpose is jq.
For comprehensive examples and real-world usage patterns, see the example/README.md file.
# step 1 - Configure your OBS credentials in bin/.env
# Edit bin/.env with your OBS WebSocket URL and password
# OBS_WEBSOCKET_URL=ws://localhost:4455
# OBS_WEBSOCKET_PASSWORD=your_password# step 2 - Generate the authentication file
obs authorize# step 3 - Test the connection
obs stream get-stream-statusGives result,
{"outputActive":false,"outputReconnecting":false,"outputTimecode":"00:00:00.000","outputDuration":0,"outputCongestion":0.0,"outputBytes":0,"outputSkippedFrames":0,"outputTotalFrames":0}
# or using the jq utility
obs stream get-stream-status | jq -r '.outputActive'Result is,
false
# or alternatively use the low-level send command
obs send --command GetStreamStatus | jq -r '.responseData.outputActive'
# same output as before: falseobs authorize --helpValidate OBS WebSocket credentials from bin/.env file by testing the connection
Usage: obs authorize [arguments]
-h, --help Print this usage information.
The authorize command validates your OBS WebSocket credentials by attempting to connect to OBS using the configuration in bin/.env. This verifies that your credentials are correct and OBS is accessible.
Required .env file format:
OBS_WEBSOCKET_URL=ws://[ip address or hostname]:[port]
OBS_WEBSOCKET_PASSWORD=[password]Setup instructions:
- Create or edit the
bin/.envfile in the obs_cli package directory - Add your OBS WebSocket URL and password
- Run
obs authorizeto validate the connection
Example output:
Validating OBS WebSocket credentials from bin/.env...
✓ Successfully connected to OBS v30.1.2
✓ Credentials are valid
Authorization completed successfully.
Your OBS WebSocket credentials are working correctly.
If the connection fails, the command will display an error message with troubleshooting tips.
In general, this command is useful for verifying your OBS connection settings before running other commands.
obs config --helpConfig Requests
Usage: obs config <subcommand> [arguments]
-h, --help Print this usage information.
Available subcommands:
get-record-directory Gets the current directory that the record output is set to.
get-stream-service-settings Gets the current stream service settings (stream destination).
get-video-settings Gets the current video settings.
set-stream-service-settings Sets the current stream service settings (stream destination).
set-video-settings Sets the current video settings.
obs config get-record-directory --helpGets the current directory that the record output is set to.
Usage: obs config get-record-directory [arguments]
-h, --help Print this usage information.
obs config get-stream-service-settings --helpGets the current stream service settings (stream destination).
Usage: obs config get-stream-service-settings [arguments]
-h, --help Print this usage information.
obs config get-video-settings --helpGets the current video settings.
Usage: obs config get-video-settings [arguments]
-h, --help Print this usage information.
obs config set-stream-service-settings --helpSets the current stream service settings (stream destination).
Usage: obs config set-stream-service-settings [arguments]
-h, --help Print this usage information.
--stream-service-type=<string> (mandatory) Type of stream service to apply. Example: rtmp_common or rtmp_custom
--stream-service-settings=<json> (mandatory) Settings to apply to the service
obs config set-video-settings --helpSets the current video settings.
Usage: obs config set-video-settings [arguments]
-h, --help Print this usage information.
--fps-numerator=<int (greater than 0)> Numerator of the fractional FPS value
--fps-denominator=<int (greater than 0)> Denominator of the fractional FPS value
--base-width=<int (between 1 and 4096)> Width of the base (canvas) resolution in pixels
--base-height=<int (between 1 and 4096)> Height of the base (canvas) resolution in pixels
--output-width=<int (between 1 and 4096)> Width of the output resolution in pixels
--output-height=<int (between 1 and 4096)> Height of the output resolution in pixels
obs filters --helpManage source filters.
Usage: obs filters <subcommand> [arguments]
-h, --help Print this usage information.
Available subcommands:
get-source-filter-kind-list Gets an array of all available source filter kinds.
get-source-filter-list Gets an array of all of a source's filters.
get-source-filter-default-settings Gets the default settings for a filter kind.
create-source-filter Creates a new filter, adding it to a source.
get-source-filter Gets the info for a specific source filter.
set-source-filter-settings Sets the settings of a source filter.
remove-source-filter Removes a filter from a source.
set-source-filter-name Sets the name of a source filter (rename).
set-source-filter-index Sets the index position of a filter on a source.
set-source-filter-enabled Sets the enable state of a source filter.
obs filters get-source-filter-kind-list --helpGets an array of all available source filter kinds.
Usage: obs filters get-source-filter-kind-list [arguments]
-h, --help Print this usage information.
obs filters get-source-filter-list --helpGets an array of all of a source's filters.
Usage: obs filters get-source-filter-list [arguments]
-h, --help Print this usage information.
--sourceName Name of the source
Example:
obs filters get-source-filter-list --sourceName "Video Capture Device" | jqobs filters get-source-filter-default-settings --helpGets the default settings for a filter kind.
Usage: obs filters get-source-filter-default-settings [arguments]
-h, --help Print this usage information.
--filterKind The kind of filter
Example:
obs filters get-source-filter-default-settings --filterKind "color_correction_v2" | jqobs filters create-source-filter --helpCreates a new filter, adding it to a source.
Usage: obs filters create-source-filter [arguments]
-h, --help Print this usage information.
--sourceName Name of the source
--filterName Name of the new filter
--filterKind The kind of filter to create
--filterSettings JSON object of filter settings
Notes:
sourceName,filterName, andfilterKindare requiredfilterSettingsis optional and should be a JSON string
Example:
obs filters create-source-filter \
--sourceName "Video Capture Device" \
--filterName "My Color Correction" \
--filterKind "color_correction_v2" \
--filterSettings '{"gamma": 1.5}'obs filters get-source-filter --helpGets the info for a specific source filter.
Usage: obs filters get-source-filter [arguments]
-h, --help Print this usage information.
--sourceName Name of the source
--filterName Name of the filter
Example:
obs filters get-source-filter \
--sourceName "Video Capture Device" \
--filterName "My Color Correction" | jqobs filters set-source-filter-settings --helpSets the settings of a source filter.
Usage: obs filters set-source-filter-settings [arguments]
-h, --help Print this usage information.
--sourceName Name of the source
--filterName Name of the filter
--filterSettings JSON object of filter settings
--overlay Whether to overlay settings instead of replacing
Notes:
sourceName,filterName, andfilterSettingsare requiredfilterSettingsmust be a valid JSON string- Use
--overlayto merge settings instead of replacing them
Example:
obs filters set-source-filter-settings \
--sourceName "Video Capture Device" \
--filterName "My Color Correction" \
--filterSettings '{"gamma": 2.0}'obs filters remove-source-filter --helpRemoves a filter from a source.
Usage: obs filters remove-source-filter [arguments]
-h, --help Print this usage information.
--sourceName Name of the source
--filterName Name of the filter to remove
Example:
obs filters remove-source-filter \
--sourceName "Video Capture Device" \
--filterName "My Color Correction"obs filters set-source-filter-name --helpSets the name of a source filter (rename).
Usage: obs filters set-source-filter-name [arguments]
-h, --help Print this usage information.
--sourceName Name of the source
--filterName Current name of the filter
--newFilterName New name for the filter
Example:
obs filters set-source-filter-name \
--sourceName "Video Capture Device" \
--filterName "My Color Correction" \
--newFilterName "Better Color Correction"obs filters set-source-filter-index --helpSets the index position of a filter on a source.
Usage: obs filters set-source-filter-index [arguments]
-h, --help Print this usage information.
--sourceName Name of the source
--filterName Name of the filter
--filterIndex New index position of the filter
Notes:
- Filter index starts at 0 (top of the filter list)
Example:
obs filters set-source-filter-index \
--sourceName "Video Capture Device" \
--filterName "My Color Correction" \
--filterIndex 0obs filters set-source-filter-enabled --helpSets the enable state of a source filter.
Usage: obs filters set-source-filter-enabled [arguments]
-h, --help Print this usage information.
--sourceName Name of the source
--filterName Name of the filter
--[no-]filterEnabled Whether the filter is enabled (defaults to on)
Example:
# Enable filter
obs filters set-source-filter-enabled \
--sourceName "Video Capture Device" \
--filterName "My Color Correction"
# Disable filter
obs filters set-source-filter-enabled \
--sourceName "Video Capture Device" \
--filterName "My Color Correction" \
--no-filterEnabledobs general --helpGeneral commands
Usage: obs general <subcommand> [arguments]
-h, --help Print this usage information.
Available subcommands:
get-stats Gets statistics about OBS, obs-websocket, and the current session.
get-version Gets data about the current plugin and RPC version.
obs general get-stats --helpGets statistics about OBS, obs-websocket, and the current session.
Usage: obs general get-stats [arguments]
-h, --help Print this usage information.
obs general get-version --helpGets data about the current plugin and RPC version.
Usage: obs general get-version [arguments]
-h, --help Print this usage information.
obs inputs --helpInputs Requests
Usage: obs inputs <subcommand> [arguments]
-h, --help Print this usage information.
Available subcommands:
get-input-kind-list Gets an array of all available input kinds in OBS.
get-input-list Gets an array of all inputs in OBS.
get-input-mute Gets the mute status of an input.
get-input-volume Gets the current volume setting of an input.
set-input-volume Sets the volume setting of an input.
get-input-deinterlace-mode Gets the deinterlace mode of an input.
set-input-deinterlace-mode Sets the deinterlace mode of an input.
get-input-deinterlace-field-order Gets the deinterlace field order of an input.
set-input-deinterlace-field-order Sets the deinterlace field order of an input.
get-input-audio-balance Gets the audio balance of an input.
set-input-audio-balance Sets the audio balance of an input.
get-input-audio-sync-offset Gets the audio sync offset of an input.
set-input-audio-sync-offset Sets the audio sync offset of an input.
get-input-audio-monitor-type Gets the audio monitor type of an input.
set-input-audio-monitor-type Sets the audio monitor type of an input.
get-input-audio-tracks Gets the audio tracks of an input.
set-input-audio-tracks Sets the audio tracks of an input.
get-input-properties-list-property-items Gets the items of a list property of an input.
press-input-properties-button Presses a button property of an input.
remove-input Removes an existing input.
set-input-mute Sets the mute status of an input.
set-input-name Sets the name of an input (rename).
toggle-input-mute Toggles the mute status of an input.
obs inputs get-input-kind-list --helpGets an array of all available input kinds in OBS.
Usage: obs inputs get-input-kind-list [arguments]
-h, --help Print this usage information.
--[no-]unversioned Whether to get unversioned input kinds.
obs inputs get-input-list --helpGets an array of all inputs in OBS.
Usage: obs inputs get-input-list [arguments]
-h, --help Print this usage information.
--inputKind The kind of input to get.
obs inputs get-input-mute --helpGets the mute status of an input.
Usage: obs inputs get-input-mute [arguments]
-h, --help Print this usage information.
--inputName The name of the input to get the mute status of.
obs inputs remove-input --helpRemoves an existing input.
Usage: obs inputs remove-input [arguments]
-h, --help Print this usage information.
--inputName The name of the input to remove.
obs inputs set-input-mute --helpSets the mute status of an input.
Usage: obs inputs set-input-mute [arguments]
-h, --help Print this usage information.
--inputName The name of the input to set the mute status of.
--[no-]mute Whether to mute the input.
obs inputs set-input-name --helpSets the name of an input (rename).
Usage: obs inputs set-input-name [arguments]
-h, --help Print this usage information.
--inputName The name of the input to rename.
--newInputName The new name of the input.
obs inputs toggle-input-mute --helpToggles the mute status of an input.
Usage: obs inputs toggle-input-mute [arguments]
-h, --help Print this usage information.
--inputName The name of the input to toggle the mute status of.
obs inputs get-input-volume --helpGets the current volume setting of an input.
Usage: obs inputs get-input-volume [arguments]
-h, --help Print this usage information.
--inputName Name of the input
--inputUuid UUID of the input
Notes:
- Either
inputNameorinputUuidmust be provided
Example:
obs inputs get-input-volume --inputName "Audio Capture Device" | jqobs inputs set-input-volume --helpSets the volume setting of an input.
Usage: obs inputs set-input-volume [arguments]
-h, --help Print this usage information.
--inputName Name of the input
--inputUuid UUID of the input
--inputVolumeMul=<float> Volume multiplier (0.0 to 20.0)
--inputVolumeDb=<float> Volume in dB (-100.0 to 26.0)
Notes:
- Either
inputNameorinputUuidmust be provided - Either
inputVolumeMulorinputVolumeDbmust be provided
Example:
obs inputs set-input-volume --inputName "Audio Capture Device" --inputVolumeDb -10.0obs inputs get-input-deinterlace-mode --helpGets the deinterlace mode of an input.
Usage: obs inputs get-input-deinterlace-mode [arguments]
-h, --help Print this usage information.
--inputName Name of the input
--inputUuid UUID of the input
obs inputs set-input-deinterlace-mode --helpSets the deinterlace mode of an input.
Usage: obs inputs set-input-deinterlace-mode [arguments]
-h, --help Print this usage information.
--inputName Name of the input
--inputUuid UUID of the input
--deinterlaceMode=<mode> Deinterlace mode
Allowed modes:
disable, discard, retain, retain_top, retain_bottom
obs inputs get-input-deinterlace-field-order --helpGets the deinterlace field order of an input.
Usage: obs inputs get-input-deinterlace-field-order [arguments]
-h, --help Print this usage information.
--inputName Name of the input
--inputUuid UUID of the input
obs inputs set-input-deinterlace-field-order --helpSets the deinterlace field order of an input.
Usage: obs inputs set-input-deinterlace-field-order [arguments]
-h, --help Print this usage information.
--inputName Name of the input
--inputUuid UUID of the input
--deinterlaceFieldOrder=<order> Field order
Allowed orders:
top, bottom
obs inputs get-input-audio-balance --helpGets the audio balance of an input.
Usage: obs inputs get-input-audio-balance [arguments]
-h, --help Print this usage information.
--inputName Name of the input
--inputUuid UUID of the input
obs inputs set-input-audio-balance --helpSets the audio balance of an input.
Usage: obs inputs set-input-audio-balance [arguments]
-h, --help Print this usage information.
--inputName Name of the input
--inputUuid UUID of the input
--inputAudioBalance=<float> Audio balance (0.0 to 1.0)
obs inputs get-input-audio-sync-offset --helpGets the audio sync offset of an input.
Usage: obs inputs get-input-audio-sync-offset [arguments]
-h, --help Print this usage information.
--inputName Name of the input
--inputUuid UUID of the input
obs inputs set-input-audio-sync-offset --helpSets the audio sync offset of an input.
Usage: obs inputs set-input-audio-sync-offset [arguments]
-h, --help Print this usage information.
--inputName Name of the input
--inputUuid UUID of the input
--inputAudioSyncOffset=<int> Sync offset in milliseconds
obs inputs get-input-audio-monitor-type --helpGets the audio monitor type of an input.
Usage: obs inputs get-input-audio-monitor-type [arguments]
-h, --help Print this usage information.
--inputName Name of the input
--inputUuid UUID of the input
obs inputs set-input-audio-monitor-type --helpSets the audio monitor type of an input.
Usage: obs inputs set-input-audio-monitor-type [arguments]
-h, --help Print this usage information.
--inputName Name of the input
--inputUuid UUID of the input
--monitorType=<type> Monitor type
Allowed types:
none, monitor only, monitor and output
obs inputs get-input-audio-tracks --helpGets the audio tracks of an input.
Usage: obs inputs get-input-audio-tracks [arguments]
-h, --help Print this usage information.
--inputName Name of the input
--inputUuid UUID of the input
obs inputs set-input-audio-tracks --helpSets the audio tracks of an input.
Usage: obs inputs set-input-audio-tracks [arguments]
-h, --help Print this usage information.
--inputName Name of the input
--inputUuid UUID of the input
--inputAudioTracks=<tracks> Audio tracks (1-6)
obs inputs get-input-properties-list-property-items --helpGets the items of a list property of an input.
Usage: obs inputs get-input-properties-list-property-items [arguments]
-h, --help Print this usage information.
--inputName Name of the input
--inputUuid UUID of the input
--propertyName Name of the list property
obs inputs press-input-properties-button --helpPresses a button property of an input.
Usage: obs inputs press-input-properties-button [arguments]
-h, --help Print this usage information.
--inputName Name of the input
--inputUuid UUID of the input
--propertyName Name of the button property
obs listen --helpGenerate OBS events to stdout
Usage: obs listen [arguments]
-h, --help Print this usage information.
--event-subscriptions=<Supply one more more values comma separated.
See https://github.com/obsproject/obs-websocket/blob/master/docs/generated/protocol.md#eventsubscription>
Name of the source to get the active state of.
[all] (default) Helper to receive all non-high-volume events.
[config] Subscription value to receive events in the Config category.
[filters] Subscription value to receive events in the Filters category.
[general] Subscription value to receive events in the General category.
[inputActiveStateChanged] Subscription value to receive the InputActiveStateChanged high-volume event.
[inputShowStateChanged] Subscription value to receive the InputShowStateChanged high-volume event.
[inputVolumeMeters] Subscription value to receive the InputVolumeMeters high-volume event.
[inputs] Subscription value to receive events in the Inputs category.
[mediaInputs] Subscription value to receive events in the MediaInputs category.
[none] Subscription value used to disable all events.
[outputs] Subscription value to receive events in the Outputs category.
[sceneItemTransformChanged] Subscription value to receive the SceneItemTransformChanged high-volume event.
[sceneItems] Subscription value to receive events in the SceneItems category.
[scenes] Subscription value to receive events in the Scenes category.
[transitions] Subscription value to receive events in the Transitions category.
[ui] Subscription value to receive events in the Ui category.
[vendors] Subscription value to receive the VendorEvent event.
obs outputs --helpManage OBS outputs (virtual cam, replay buffer, generic outputs).
Usage: obs outputs <subcommand> [arguments]
-h, --help Print this usage information.
Available subcommands:
get-virtual-cam-status Gets the status of the virtual cam output.
toggle-virtual-cam Toggles the state of the virtual cam output.
start-virtual-cam Starts the virtual cam output.
stop-virtual-cam Stops the virtual cam output.
get-replay-buffer-status Gets the status of the replay buffer output.
toggle-replay-buffer Toggles the state of the replay buffer output.
start-replay-buffer Starts the replay buffer output.
stop-replay-buffer Stops the replay buffer output.
save-replay-buffer Saves the replay buffer output to disk.
get-output-list Gets the list of available outputs.
get-output-status Gets the status of a specific output.
toggle-output Toggles the status of a specific output.
start-output Starts a specific output.
stop-output Stops a specific output.
get-output-settings Gets the settings of a specific output.
set-output-settings Sets the settings of a specific output.
obs outputs get-virtual-cam-status --helpGets the status of the virtual cam output.
Usage: obs outputs get-virtual-cam-status [arguments]
-h, --help Print this usage information.
obs outputs toggle-virtual-cam --helpToggles the state of the virtual cam output.
Usage: obs outputs toggle-virtual-cam [arguments]
-h, --help Print this usage information.
obs outputs start-virtual-cam --helpStarts the virtual cam output.
Usage: obs outputs start-virtual-cam [arguments]
-h, --help Print this usage information.
obs outputs stop-virtual-cam --helpStops the virtual cam output.
Usage: obs outputs stop-virtual-cam [arguments]
-h, --help Print this usage information.
obs outputs get-replay-buffer-status --helpGets the status of the replay buffer output.
Usage: obs outputs get-replay-buffer-status [arguments]
-h, --help Print this usage information.
obs outputs toggle-replay-buffer --helpToggles the state of the replay buffer output.
Usage: obs outputs toggle-replay-buffer [arguments]
-h, --help Print this usage information.
obs outputs start-replay-buffer --helpStarts the replay buffer output.
Usage: obs outputs start-replay-buffer [arguments]
-h, --help Print this usage information.
obs outputs stop-replay-buffer --helpStops the replay buffer output.
Usage: obs outputs stop-replay-buffer [arguments]
-h, --help Print this usage information.
obs outputs save-replay-buffer --helpSaves the replay buffer output to disk.
Usage: obs outputs save-replay-buffer [arguments]
-h, --help Print this usage information.
obs outputs get-output-list --helpGets the list of available outputs.
Usage: obs outputs get-output-list [arguments]
-h, --help Print this usage information.
obs outputs get-output-status --helpGets the status of a specific output.
Usage: obs outputs get-output-status [arguments]
-h, --help Print this usage information.
--outputName Name of the output
obs outputs toggle-output --helpToggles the status of a specific output.
Usage: obs outputs toggle-output [arguments]
-h, --help Print this usage information.
--outputName Name of the output
obs outputs start-output --helpStarts a specific output.
Usage: obs outputs start-output [arguments]
-h, --help Print this usage information.
--outputName Name of the output
obs outputs stop-output --helpStops a specific output.
Usage: obs outputs stop-output [arguments]
-h, --help Print this usage information.
--outputName Name of the output
obs outputs get-output-settings --helpGets the settings of a specific output.
Usage: obs outputs get-output-settings [arguments]
-h, --help Print this usage information.
--outputName Name of the output
obs outputs set-output-settings --helpSets the settings of a specific output.
Usage: obs outputs set-output-settings [arguments]
-h, --help Print this usage information.
--outputName Name of the output
--outputSettings JSON object of output settings
Notes:
outputSettingsmust be a valid JSON string
Example:
obs outputs set-output-settings \
--outputName "virtualcam_output" \
--outputSettings '{"key": "value"}'obs record --helpManage OBS recording.
Usage: obs record <subcommand> [arguments]
-h, --help Print this usage information.
Available subcommands:
get-record-status Gets the status of the record output.
toggle-record Toggles the status of the record output.
start-record Starts the record output.
stop-record Stops the record output.
toggle-record-pause Toggles pause on the record output.
pause-record Pauses the record output.
resume-record Resumes the record output.
split-record-file Splits the current recording file.
create-record-chapter Creates a new chapter in the recording.
obs record get-record-status --helpGets the status of the record output.
Usage: obs record get-record-status [arguments]
-h, --help Print this usage information.
obs record toggle-record --helpToggles the status of the record output.
Usage: obs record toggle-record [arguments]
-h, --help Print this usage information.
obs record start-record --helpStarts the record output.
Usage: obs record start-record [arguments]
-h, --help Print this usage information.
obs record stop-record --helpStops the record output.
Usage: obs record stop-record [arguments]
-h, --help Print this usage information.
obs record toggle-record-pause --helpToggles pause on the record output.
Usage: obs record toggle-record-pause [arguments]
-h, --help Print this usage information.
obs record pause-record --helpPauses the record output.
Usage: obs record pause-record [arguments]
-h, --help Print this usage information.
obs record resume-record --helpResumes the record output.
Usage: obs record resume-record [arguments]
-h, --help Print this usage information.
obs record split-record-file --helpSplits the current recording file.
Usage: obs record split-record-file [arguments]
-h, --help Print this usage information.
Notes:
- This feature requires recording format to support chapters (e.g., MKV)
obs record create-record-chapter --helpCreates a new chapter in the recording.
Usage: obs record create-record-chapter [arguments]
-h, --help Print this usage information.
--chapterName Name of the chapter
Notes:
chapterNameis optional- This feature requires recording format to support chapters (e.g., MKV)
obs scene-items --helpScene Items Requests
Usage: obs scene-items <subcommand> [arguments]
-h, --help Print this usage information.
Available subcommands:
get-scene-item-list Gets the lock state of a scene item.
get-scene-item-locked Gets the lock state of a scene item.
set-scene-item-locked Sets the lock state of a scene item.
obs scene-items get-scene-item-list --helpGets a list of all scene items in a scene.
Usage: obs scene-items get-scene-item-list [arguments]
-h, --help Print this usage information.
-n, --scene-name=<string> (mandatory) Name of the scene to get the items of
obs scene-items get-scene-item-locked --helpGets the lock state of a scene item.
Usage: obs scene-items get-scene-item-locked [arguments]
-h, --help Print this usage information.
-n, --scene-name=<string> (mandatory) Name of the scene the item is in
-i, --scene-item-id=<int> (mandatory) Numeric ID of the scene item
obs scene-items set-scene-item-locked --helpSets the lock state of a scene item.
Usage: obs scene-items set-scene-item-locked [arguments]
-h, --help Print this usage information.
-n, --scene-name=<string> (mandatory) Name of the scene the item is in
-i, --scene-item-id=<int> (mandatory) Numeric ID of the scene item
-l, --[no-]scene-item-locked New lock state of the scene item
obs scenes --helpScenes Requests
Usage: obs scenes <subcommand> [arguments]
-h, --help Print this usage information.
Available subcommands:
get-current-program-scene Gets the current program scene.
get-group-list Gets an array of all groups in OBS.
get-scenes-list Gets an array of all scenes in OBS.
obs scenes get-current-program-scene --helpGets the current program scene.
Usage: obs scenes get-current-program-scene [arguments]
-h, --help Print this usage information.
obs scenes get-group-list --helpGets an array of all groups in OBS.
Usage: obs scenes get-group-list [arguments]
-h, --help Print this usage information.
obs scenes get-scenes-list --helpGets an array of all scenes in OBS.
Usage: obs scenes get-scenes-list [arguments]
-h, --help Print this usage information.
obs send --helpOption command is mandatory.
Usage: obs send [arguments]
-h, --help Print this usage information.
-c, --command=<string> (mandatory) One of the OBS web socket supported requests - https://github.com/obsproject/obs-websocket/blob/master/docs/generated/protocol.md#requests-table-of-contents
-a, --args=<json string> The json representing the arguments necessary for the supplied command.
obs sources --helpCommands that manipulate OBS sources
Usage: obs sources <subcommand> [arguments]
-h, --help Print this usage information.
Available subcommands:
get-source-active Gets the active and show state of a source.
get-source-screenshot Gets a Base64-encoded screenshot of a source.
save-source-screenshot Saves a screenshot of a source to the filesystem.
obs sources get-source-active --helpGets the active and show state of a source.
Usage: obs sources get-source-active [arguments]
-h, --help Print this usage information.
--source-name=<string> (mandatory) Name of the source to get the active state of
obs sources get-source-screenshot --helpGets a Base64-encoded screenshot of a source.
Usage: obs sources get-source-screenshot [arguments]
-h, --help Print this usage information.
--source-name=<string> (mandatory) Name of the source to take a screenshot of
--image-format=<string> (mandatory) Image compression format to use. Use GetVersion to get compatible image formats
obs sources save-source-screenshot --helpSaves a screenshot of a source to the filesystem.
Usage: obs sources save-source-screenshot [arguments]
-h, --help Print this usage information.
--source-name=<string> (mandatory) Name of the source to take a screenshot of
--image-format=<string> (mandatory) Image compression format to use. Use GetVersion to get compatible image formats
--image-file-path=<string> (mandatory) Path to save the screenshot file to.
obs stream --helpCommands that manipulate OBS streams
Usage: obs stream <subcommand> [arguments]
-h, --help Print this usage information.
Available subcommands:
get-stream-status Gets the status of the stream output.
send-stream-caption Sends CEA-608 caption text over the stream output.
start-streaming Starts the stream output.
stop-streaming Stops the stream output.
toggle-stream Toggles the status of the stream output.
obs stream get-stream-status --helpGets the status of the stream output.
Usage: obs stream get-stream-status [arguments]
-h, --help Print this usage information.
obs stream send-stream-caption --helpSends CEA-608 caption text over the stream output.
Usage: obs stream send-stream-caption [arguments]
-h, --help Print this usage information.
--caption-Text=<string> (mandatory) Caption text
obs stream start-streaming --helpStarts the stream output.
Usage: obs stream start-streaming [arguments]
-h, --help Print this usage information.
obs stream stop-streaming --helpStops the stream output.
Usage: obs stream stop-streaming [arguments]
-h, --help Print this usage information.
obs stream toggle-stream --helpToggles the status of the stream output.
Usage: obs stream toggle-stream [arguments]
-h, --help Print this usage information.
obs transitions --helpManage OBS scene transitions.
Usage: obs transitions <subcommand> [arguments]
-h, --help Print this usage information.
Available subcommands:
get-transition-kind-list Gets an array of all available transition kinds.
get-scene-transition-list Gets an array of all scene transitions.
get-current-scene-transition Gets the current scene transition.
set-current-scene-transition Sets the current scene transition.
set-current-scene-transition-duration Sets the duration of the current scene transition.
get-current-scene-transition-cursor Gets the cursor position of the current scene transition.
trigger-studio-mode-transition Triggers a transition in studio mode.
set-t-bar-position Sets the position of the T-Bar.
obs transitions get-transition-kind-list --helpGets an array of all available transition kinds.
Usage: obs transitions get-transition-kind-list [arguments]
-h, --help Print this usage information.
obs transitions get-scene-transition-list --helpGets an array of all scene transitions.
Usage: obs transitions get-scene-transition-list [arguments]
-h, --help Print this usage information.
obs transitions get-current-scene-transition --helpGets the current scene transition.
Usage: obs transitions get-current-scene-transition [arguments]
-h, --help Print this usage information.
obs transitions set-current-scene-transition --helpSets the current scene transition.
Usage: obs transitions set-current-scene-transition [arguments]
-h, --help Print this usage information.
--transitionName Name of the transition to set as current
obs transitions set-current-scene-transition-duration --helpSets the duration of the current scene transition.
Usage: obs transitions set-current-scene-transition-duration [arguments]
-h, --help Print this usage information.
--transitionDuration Duration of the transition in milliseconds
obs transitions get-current-scene-transition-cursor --helpGets the cursor position of the current scene transition.
Usage: obs transitions get-current-scene-transition-cursor [arguments]
-h, --help Print this usage information.
Notes:
- Returns the current position of the transition cursor (0.0 to 1.0)
- Only applicable when a transition is in progress
obs transitions trigger-studio-mode-transition --helpTriggers a transition in studio mode.
Usage: obs transitions trigger-studio-mode-transition [arguments]
-h, --help Print this usage information.
Notes:
- Studio mode must be enabled for this command to work
obs transitions set-t-bar-position --helpSets the position of the T-Bar.
Usage: obs transitions set-t-bar-position [arguments]
-h, --help Print this usage information.
--position Position of the T-Bar (0.0 to 1.0)
Notes:
- The T-Bar is used for manual transition control
- Position 0.0 is the start, 1.0 is the end
obs ui --helpCommands that manipulate the OBS user interface.
Usage: obs ui <subcommand> [arguments]
-h, --help Print this usage information.
Available subcommands:
get-monitor-list Gets a list of connected monitors and information about them.
get-studio-mode-enabled Gets whether studio is enabled.
set-studio-mode-enabled Enables or disables studio mode.
obs ui get-monitor-list --helpGets a list of connected monitors and information about them.
Usage: obs ui get-monitor-list [arguments]
-h, --help Print this usage information.
obs ui get-studio-mode-enabled --helpGets whether studio is enabled.
Usage: obs ui get-studio-mode-enabled [arguments]
-h, --help Print this usage information.
obs ui set-studio-mode-enabled --helpEnables or disables studio mode.
Usage: obs ui set-studio-mode-enabled [arguments]
-h, --help Print this usage information.
-m, --[no-]studio-mode
obs version --helpDisplay the package name and version
Usage: obs version [arguments]
-h, --help Print this usage information.
# will output json for any "scene" related event
obs listen --event-subscriptions scenesGives the following result,
{"eventType":"CurrentProgramSceneChanged","eventIntent":4,"eventData":{"sceneName":"Scene 2"}}
{"eventType":"CurrentProgramSceneChanged","eventIntent":4,"eventData":{"sceneName":"MY Scene"}}
{"eventType":"CurrentProgramSceneChanged","eventIntent":4,"eventData":{"sceneName":"Scene 2"}}
Now pipe the result through the jq command for each event
# jq will parse the json
obs listen --event-subscriptions scenes | jq -r '.eventType + "\t" + .eventData.sceneName'Gives this result,
CurrentProgramSceneChanged Scene 2
CurrentProgramSceneChanged MY Scene
CurrentProgramSceneChanged Scene 2
The listen command provides an optional --command argument that allows the user to specify the shell command that will be executed each time OBS fires one of the events that has been subscribed to. The example below will send a separate email containing the JSON payload of each event fired.
# send an email for every scene event
obs listen --event-subscriptions scenes --command 'mutt -s "OBS Scene Event" address@email.com'For additional examples including:
- Scene management workflows
- Input control scripts
- Stream and recording automation
- Filter management
- Event monitoring patterns
- Integration with Python, Bash, and other tools
See the comprehensive example/README.md documentation with real-world usage patterns and scripting examples.