Commit 12cc6fff authored by Andreas Valder's avatar Andreas Valder

added config options

parent 64e29a3d
[MAIN]
VIDEOS_RAW=/mnt/raw
VIDEOS_RELEASED=/mnt/released
[API]
KEY=
BASE=http://localhost:5000
[JOBS]
TYPES=thumbnail
[thumbnail]
width=640
height=-1
folder=thumbnail
......@@ -21,8 +21,8 @@ data = json.loads(sys.argv[4])
print(sys.argv)
if (jobtype == 'thumbnail'):
inputfile = '/mnt/sshfs/video-main/'+data['path']
outputfile = '/tmp/l_'+str(data['lectureid'])+'.png'
inputfile = config['MAIN']['VIDEOS_RELEASED']+'/'+data['path']
outputfile = config['MAIN']['VIDEOS_RELEASED']+'/'+config['thumbnail']['folder']+'/'+'l_'+str(data['lectureid'])+'.jpg'
api.job_ping(id=id)
duration = float(subprocess.run(["ffprobe", "-v", "error", "-show_entries", "format=duration", "-of", "default=noprint_wrappers=1:nokey=1", inputfile], stdout=subprocess.PIPE).stdout)
api.job_ping(id=id)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment