-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstart_obs.py
27 lines (21 loc) · 1014 Bytes
/
start_obs.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import asyncio
import argparse
from obs import client
from misc import starter
def start():
asyncio.run(
client.start(args.host_middleware, args.port_middleware, args.host_obs, args.port_obs, args.cert),
debug=False)
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='Client to connect Middleware with OBS Studio')
parser.add_argument('--host_middleware', help='Middleware host address')
parser.add_argument('--port_middleware', type=int, help='Middleware port')
parser.add_argument('--host_obs', help='OBS Studio host address')
parser.add_argument('--port_obs', type=int, help='OBS Studio port')
parser.add_argument('--cert', help='Path to certificate file')
parser.add_argument('-s', '--signal', choices=['stop'], help='Shut down gracefully')
parser.add_argument('-d', '--debug', action='store_true', help='Debug mode')
args = parser.parse_args()
starter.run('obs', start, parser)