-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
record.py
executable file
·33 lines (26 loc) · 857 Bytes
/
record.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
28
29
30
31
32
33
#!/usr/bin/env python3
#
# This file is part of Mediary's Caspar Client.
# Copyright (C) 2018 Mediary Limited. All rights reserved.
#
import sys
import amcp
import config
if len(sys.argv)==1:
raise Exception('Usage: %s verb [filename]'%sys.argv[0])
verb = sys.argv[1]
if len(sys.argv)>2:
filename = sys.argv[2]
#key_name = '%s_key.mov'%fn
#fill_name= '%s_fill.mov'%fn
configfile = 'config.ini'
config = config.config(configfile)
server = amcp.Connection(config, None)
if verb == 'start':
#server.transact('ADD %d-600 FILE %s' % (config.channel(), fill_name))
server.transact('ADD %d FILE %s SEPARATE_KEY' % (config.channel(), filename))
elif verb == 'stop':
#server.transact('REMOVE %d-600' % (config.channel()))
server.transact('REMOVE %d FILE' % (config.channel()))
else:
raise Exception('Unknown verb %s'%verb)