Skip to content

pschmitt/obs-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎬🎥 OBS CLI

obs-cli is a command-line interface for OBS Studio.

It allows you to control OBS Studio from the command line, making it easier to automate scene switching, source toggling, and more.

This implementation of obs-cli is:

⚠️ Only the new OBS WebSocket API (v5) is supported!

💻 Installation

You can install obs-cli using pip(x):

# pipx
pipx install obs-cli

# pip
pip install --user obs-cli

🛠️ Usage

Here's the general usage of obs-cli:

obs-cli --help

This will show you the available commands and options.

🌟 Features

🎞️ Scene Management

You can manage scenes using the scene command:

obs-cli scene --help

For example, to switch to a scene named "Scene2":

obs-cli scene switch "Scene2"

To list all scenes:

obs-cli scene list

📦 Item Management

You can manage scene items using the item command:

obs-cli item --help

For example, to hide an item named "Item1" in a scene named "Scene2":

obs-cli item hide --scene "Scene2" "Item1"

And to show it:

obs-cli item show --scene "Scene2" "Item1"

To list all items in a scene:

obs-cli item list --scene "Scene2"

📂 Group Management

You can manage scene item groups using the group command:

obs-cli group --help

For example, to hide an group named "group1" in a scene named "Scene2":

obs-cli group hide --scene "Scene2" "group1"

And to show it:

obs-cli group show --scene "Scene2" "group1"

To list all groups in a scene:

obs-cli group list --scene "Scene2"

🎤 Input Management

You can manage inputs using the input command:

obs-cli input --help

For example, to get the settings of an input named "Mic/Aux":

obs-cli input get "Mic/Aux"

To set the device_id of a webcam input named "Webcam":

obs-cli input set "Webcam" device_id /dev/v4l/by-id/usb-Elgato_Elgato_Facecam_FW52K1A04919-video-index0

To list all inputs:

obs-cli input list

Mute/unmute or toggle the mute state of an input:

obs-cli input mute "Mic/Aux"
obs-cli input unmute "Mic/Aux"
obs-cli input toggle-mute "Mic/Aux"

🎨 Filter Management

You can manage filters using the filter command:

obs-cli filter --help

For example, to enable a filter named "Filter1" on an input named "Mic/Aux":

obs-cli filter enable "Mic/Aux" "Filter1"

And to disable it:

obs-cli filter disable "Mic/Aux" "Filter1"

To list all filters on an input:

obs-cli filter list "Mic/Aux"

⌨️ Hotkey Management

You can manage hotkeys using the hotkey command:

obs-cli hotkey --help

For example, to trigger a hotkey named "Hotkey1":

obs-cli hotkey trigger "Hotkey1"

To list all hotkeys:

obs-cli hotkey list

🎥 Virtual Camera Management

You can manage the virtual camera using the virtualcam command:

obs-cli virtualcam --help

For example, to start the virtual camera:

obs-cli virtualcam start

To stop the virtual camera:

obs-cli virtualcam stop

To toggle the virtual camera:

obs-cli virtualcam toggle

To get the status of the virtual camera:

obs-cli virtualcam status

📡 Stream Management

You can manage the stream using the stream command:

obs-cli stream --help

For example, to start streaming:

obs-cli stream start

To stop streaming:

obs-cli stream stop

To toggle streaming:

obs-cli stream toggle

To get the status of the stream:

obs-cli stream status

🎥 Record Management

You can manage recording using the record command:

obs-cli record --help

For example, to start recording:

obs-cli record start

To stop recording:

obs-cli record stop

To toggle recording:

obs-cli record toggle

To get the status of the recording:

obs-cli record status

📄 License

This project is licensed under the GPL-3.0 License.

See LICENSE for more information.