assume vban.toml in obs example

update README for obs example
This commit is contained in:
onyx-and-iris 2022-10-07 20:01:29 +01:00
parent d57269f147
commit 692acc8dd0
2 changed files with 21 additions and 14 deletions

View File

@ -8,8 +8,9 @@
Perhaps you have a streaming setup but you want to control OBS and Voicemeeter from a remote location with python installed.
With the vban-cmd and obsws-python packages you may sync a distant Voicemeeter with a distant OBS over LAN.
The script assumes you have OBS connection info saved in a config file named `config.toml` placed next to `__main__.py`.
It also assumes you have scenes named `START` `BRB` `END` and `LIVE`.
## Configure
This script assumes you have your OBS connection info saved in a config file named `config.toml`.
A valid `config.toml` file might look like this:
@ -20,13 +21,26 @@ port = 4455
password = "mystrongpass"
```
## Use
It also assumes you have your VBAN connection info saved in a config file named `vban.toml`.
Simply fill in the OBS websocket details into `config.toml` and your VBAN text request settings in the script (`ip`, `streamname` and `port`).
A valid `vban.toml` file might look like this:
```toml
[connection]
ip = "gamepc.local"
port = 6980
streamname = "Command1"
```
Both configs should be placed next to `__main__.py`.
The script also assumes four OBS scenes names "START", "BRB", "END" and "LIVE".
## Use
Make sure you have established a working connection to OBS and the remote Voicemeeter.
Change OBS scenes and watch Voicemeeter parameters change.
Run the script, change OBS scenes and watch Voicemeeter parameters change.
Pressing `<Enter>` will exit.
@ -34,6 +48,6 @@ Pressing `<Enter>` will exit.
This script can be run from a Linux host since the vban-cmd interface relies on UDP packets and obsws-python runs over websockets.
You could for exmaple, set this up to run in the background on a home server such as a Raspberry Pi.
You could for example, set this up to run in the background on a home server such as a Raspberry Pi.
It requires Python 3.10+.

View File

@ -52,15 +52,8 @@ if __name__ == "__main__":
logging.basicConfig(level=logging.INFO)
kind_id = "potato"
opts = {
"ip": "gamepc.local",
"streamname": "Command1",
"port": 6980,
"subs": {"pdirty": False},
"sync": True,
}
with vban_cmd.api(kind_id, **opts) as vban:
with vban_cmd.api(kind_id, sync=True) as vban:
cl = obs.EventClient()
cl.callback.register(on_current_program_scene_changed)