https://github.com/norihiro/obs-command-source
Dummy Source in OBS-Studio to Execute Command
https://github.com/norihiro/obs-command-source
dummy-source obs-studio obs-studio-plugin
Last synced: 2 months ago
JSON representation
Dummy Source in OBS-Studio to Execute Command
- Host: GitHub
- URL: https://github.com/norihiro/obs-command-source
- Owner: norihiro
- License: gpl-2.0
- Created: 2020-05-06T15:20:14.000Z (about 6 years ago)
- Default Branch: main
- Last Pushed: 2025-11-01T04:39:50.000Z (8 months ago)
- Last Synced: 2025-11-01T06:12:19.206Z (8 months ago)
- Topics: dummy-source, obs-studio, obs-studio-plugin
- Language: C
- Homepage:
- Size: 145 KB
- Stars: 24
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Dummy Source to Execute Command
===============================
This plugin provides a dummy source to execute arbitrary commands when a scene is switched.
## Current Features
* Start a command at the following events.
* Show (the source is shown in either preview or program)
* Hide (the source is hidden so that no longer shown in neither preview nor program)
* Activate (the source goes to the program)
* Deactivate (the source goes from the program)
* Show in preview (the source goes to the preview)
* Hide from preview (the source goes from the preview)
* Optionally, kill the created process at these conditions. This feature is not available for Windows as of now.
* When hiding, kill the process created at shown.
* When deactivating, kill the process created at activated.
* When hiding from the preview, kill the process created at preview.
## Possible Usage
* Implementing custom tally lights.
* Control PTZ cameras by switching the scene.
You may combine with CURL to send some commands.
* Start and stop a daemon program required for the scene.
* Trigger other operations through websocket at the event.
A helper script is available at `tools/request-websocket.py`.
- Start or stop your streaming and recording.
* Not limited to the above.
## Caution
Since this plugin executes arbitrary commands, users need to consider security concerns.
For example, when combining with `obs-websocket` plugin,
a remote user could change property through the websocket interface so that the arbitrary commands can be executed.
## Build
### Linux
```
git clone https://github.com/norihiro/obs-command-source.git
cd obs-command-source
mkdir build && cd build
cmake \
-DLIBOBS_INCLUDE_DIR="" \
-DCMAKE_INSTALL_PREFIX=/usr ..
make -j4
sudo make install
```
### macOS
```
git clone https://github.com/norihiro/obs-command-source.git
cd obs-command-source
mkdir build && cd build
cmake \
-DLIBOBS_INCLUDE_DIR= \
-DLIBOBS_LIB= \
-DOBS_FRONTEND_LIB= \
..
make -j4
# Copy obs-command-source.so to the obs-plugins folder
```