Skip to content
Snippets Groups Projects
Commit 12cc6fff authored by Andreas Valder's avatar Andreas Valder
Browse files

added config options

parent 64e29a3d
No related branches found
No related tags found
No related merge requests found
[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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment