mirror of
				https://github.com/onyx-and-iris/vban-cmd-python.git
				synced 2025-11-04 07:21:49 +00:00 
			
		
		
		
	assume vban.toml in obs example
update README for obs example
This commit is contained in:
		
							parent
							
								
									d57269f147
								
							
						
					
					
						commit
						692acc8dd0
					
				@ -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.
 | 
					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.
 | 
					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`.
 | 
					## Configure
 | 
				
			||||||
It also assumes you have scenes named `START` `BRB` `END` and `LIVE`.
 | 
					
 | 
				
			||||||
 | 
					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:
 | 
					A valid `config.toml` file might look like this:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -20,13 +21,26 @@ port = 4455
 | 
				
			|||||||
password = "mystrongpass"
 | 
					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.
 | 
					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.
 | 
					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.
 | 
					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+.
 | 
					It requires Python 3.10+.
 | 
				
			||||||
 | 
				
			|||||||
@ -52,15 +52,8 @@ if __name__ == "__main__":
 | 
				
			|||||||
    logging.basicConfig(level=logging.INFO)
 | 
					    logging.basicConfig(level=logging.INFO)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    kind_id = "potato"
 | 
					    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 = obs.EventClient()
 | 
				
			||||||
        cl.callback.register(on_current_program_scene_changed)
 | 
					        cl.callback.register(on_current_program_scene_changed)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user