mirror of
https://github.com/MichaByte/OnBoard-Live.git
synced 2026-01-29 13:32:12 -05:00
continued wip
This commit is contained in:
parent
af43bbc916
commit
263f91fc11
4 changed files with 21 additions and 17 deletions
22
obs/setup_obs.py
Normal file
22
obs/setup_obs.py
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
import obsws_python as obs
|
||||
import os
|
||||
|
||||
# pass conn info if not in config.toml
|
||||
client = obs.ReqClient(host='localhost', port=4455, password=None)
|
||||
|
||||
scene = client.get_scene_list().scenes[0]['sceneName']
|
||||
|
||||
inputs = client.get_scene_item_list(name=scene).scene_items
|
||||
|
||||
print(client.get_input_default_settings("browser_source").default_input_settings)
|
||||
|
||||
if inputs == []:
|
||||
client.create_input(sceneName=scene, inputName="Browser", inputKind="browser_source", inputSettings={'css': 'body { margin: 0px auto; overflow: hidden; }', 'fps': 30, 'fps_custom': True, 'height': 1080, 'is_local_file': True, 'local_file': '/home/micha/index.html', 'reroute_audio': True, 'restart_when_active': False, 'shutdown': False, 'webpage_control_level': 0, 'width': 1920}, sceneItemEnabled=True)
|
||||
|
||||
client.set_stream_service_settings("rtmp_common", {'bwtest': False, 'key': 'kdm0-hum4-31wg-79se-c6us', 'protocol': 'RTMPS', 'server': 'rtmps://a.rtmps.youtube.com:443/live2', 'service': 'YouTube - RTMPS'})
|
||||
|
||||
client.start_stream()
|
||||
|
||||
client.base_client.ws.close()
|
||||
|
||||
print("OBS has been set up")
|
||||
Loading…
Add table
Add a link
Reference in a new issue