prefix path
This commit is contained in:
parent
609a1209ab
commit
8325174995
2 changed files with 5 additions and 2 deletions
2
edit.py
2
edit.py
|
@ -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,
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue