prefix path

This commit is contained in:
j 2017-09-06 14:48:37 +02:00
parent 609a1209ab
commit 8325174995
2 changed files with 5 additions and 2 deletions

View file

@ -117,7 +117,7 @@ if __name__ == '__main__':
info = get_info(api, clip['streams'][i])
videos.append({
'oshash': clip['streams'][i],
'path': info['path'],
'path': os.path.join(prefix, info['path']),
'resolution': info['resolution'],
'in': stream_in,
'out': stream_out,

View file

@ -1,4 +1,5 @@
#!/usr/bin/python3
import math
import json
import os
import subprocess
@ -71,13 +72,15 @@ for clip in edit:
'-ac', '2',
'-b:a', '192k',
]
clip_duration = math.ceil((clip['out'] - clip['in']) / (1/25)) * 1/25
cmd = [
'ffmpeg',
'-nostats', '-loglevel', 'error',
'-ss', str(clip['in']),
'-i', clip['path']
] + options + [
'-t', str(clip['out'] - clip['in']),
'-t', str(clip_duration),
out
]
run(cmd)