From 33ec8268f90de8568a7c63a05af3d7bcbf5aaf0c Mon Sep 17 00:00:00 2001 From: Andreas Valder <andreasv@fsmpi.rwth-aachen.de> Date: Sat, 15 Apr 2017 19:24:38 +0200 Subject: [PATCH] debian ships python 3.4... --- worker.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/worker.py b/worker.py index b8dabfb..bd58d05 100755 --- a/worker.py +++ b/worker.py @@ -24,9 +24,9 @@ if (jobtype == 'thumbnail'): 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) + duration = float(subprocess.check_output(["ffprobe", "-v", "error", "-show_entries", "format=duration", "-of", "default=noprint_wrappers=1:nokey=1", inputfile])) api.job_ping(id=id) - if subprocess.run(["ffmpeg", "-loglevel", "error", "-y", "-ss", str(duration*0.4), "-i", inputfile, "-vf", "scale=640:-1", "-frames:v", "1", outputfile]).returncode == 0: + if subprocess.call(["ffmpeg", "-loglevel", "error", "-y", "-ss", str(duration*0.4), "-i", inputfile, "-vf", "scale=640:-1", "-frames:v", "1", outputfile]) == 0: api.job_ping(id=id,state='finished') else: api.job_ping(id=id,state='failed') -- GitLab