A command line tool for controlling OBS Studio via the OBS WebSockets API
Project description
Introduction
A command line tool for controlling OBS Studio [1] via the OBS WebSockets API, designed for use with tools such as the Elgato Stream Deck, or any hardware tool where you can assign a command to a single button press.
Features
Start/Stop streaming, including enabling/disabling chat safety features
Mute/Unmute Microphone and Desktop Audio sources, including supporting custom audio sources
Scene switching
Live Safety mode to combat the effects of hate raids.
Installation
OBS Streamdeck CTL is written in Python, and is planned to be published to PyPi
Requirements
Installing From Source
Obtaining Source code
Download the required release from the releases page or clone the git repository to obtain the main branch:
git clone https://github.com/djnrrd/obs_streamdeck_controls.git
Pre Installation
Register a new application on dev.twitch.com. Then edit the file obs_sd_controls/conf.py and update the CLIENT_ID variable with your own Client ID.
Installing
Windows users need more documentation, but this guide should help.
Change directory into the downloaded folder and install locally via pip. It is recommended that you use the --user flag to install in your user directory.:
cd obs_streamdeck_controls pip install --user --use-feature=in-tree-build .
Post Install
Linux
This will install the command line program obs-streamdeck-ctl to your $HOME/.local/bin folder. Add:
PATH=$PATH:$HOME/.local/bin
to your .bashrc file, if you haven’t already.
Windows
This will install obs-streamdeck-ctl.exe to your C:\Users\%USERNAME%\AppData\Roaming\Python\Python39\Scripts folder and you may see an error regarding this when you install.
You can add this to your path with the following command:
setx PATH "C:\Users\%USERNAME%\AppData\Roaming\Python\Python39\Scripts\;%PATH%"
Restart your computer to make sure that the %PATH% is loaded correctly
Using
Initial Setup
After installing OBS Streamdeck Controls you will need to provide information regarding your OBS WebSockets password, names of your Microphone, Desktop, and alert overlay sources, authorise the application with twitch, and set your safety options.
Run the following command on a terminal/command line to launch a setup wizard:
obs-streamdeck-ctl setup
Using the Scripts
All scripts are launched by the same command line program:
obs-streamdeck-ctl SCRIPT_NAME
Where SCRIPT_NAME is one of the following:
start_stop
Start or Stop live streaming, and if Twitch chat safety features are enabled, toggle these. Safety features may put chat into Subscriber or Follower only mode and optionally switch Emote only mode on.
Because the Subscriber, Follower, and Emote only modes function like a toggle switch, If you enable any of these modes when live and don’t disable them before using this function to stop the stream, it may disable that mode when you are offline.
mute_mic
Toggle the mute function on your Microphone input source. If you use a different Microphone source to the default you can select that with the setup wizard.
mute_desk
Toggle the mute function on your Desktop Audio input source. If you use a different Desktop Audio source to the default you can select that with the setup wizard.
mute_all
Toggle the mute function on both the Desktop and Microphone Audio sources
scene X
Switch to Scene X in OBS Studio. X is the number of the Scene in the Scene List, counting down from the top and starting with 1.
live_safety
Sadly, people have taken to “Hate Raids” on Twitch, where your chat can be overwhelmed with hateful messages from multiple bot accounts. These bot accounts will also mass follow the channel, to queue up repeated alerts from any sound/screen alert web overlay services.
Live Safety can enable and disable Subscriber or Follower only mode in chat and optionally enable and disable Emote only mode.
Live Safety can also enable and disable sound/screen alert web overlay services, as well as any other web overlay services that you may use, like chat.
Like the start_stop function, enabling and disabling the chat modes and web overlay services is like a toggle function. So ending a stream before running Live Safety again could leave your web overlay services disabled.
setup
Launch the setup wizard, see Initial Setup for details
Footnotes
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for obs_streamdeck_controls-0.2.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32e956f0cbc76b89f26b17c995173c487e99edb0d631c53e1fa810b80b9bdcb8 |
|
MD5 | ee014a891aa5da3778d89fc7d230ca8e |
|
BLAKE2b-256 | a7035cdc53e9cee97a0668809b11646bf24851b0be7508e15c7c5d53370d0e19 |
Hashes for obs_streamdeck_controls-0.2.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a6c8c835e04e51ccc57598d1c3aaa1f5a4e4a893dd739dd8bd154c1bf0ecd2f |
|
MD5 | 396a65784e9bb7525066927bd6cc1250 |
|
BLAKE2b-256 | 56083956894b0d5d29251fc49983b94f3f0b7f26d4f3d1376b2336f1d632433c |