[~] Refactor
This commit is contained in:
parent
c7cd18cdcf
commit
91a1bc91a7
@ -1683,13 +1683,16 @@ def kernel_27():
|
|||||||
t2 = os.path.join(t3, 'slice-%d' % i)
|
t2 = os.path.join(t3, 'slice-%d' % i)
|
||||||
os.makedirs(t2, exist_ok=True)
|
os.makedirs(t2, exist_ok=True)
|
||||||
t4 = os.path.join(t2, 'output.mp4')
|
t4 = os.path.join(t2, 'output.mp4')
|
||||||
with subprocess.Popen('''
|
with subprocess.Popen([
|
||||||
ffmpeg \
|
'ffmpeg',
|
||||||
-i %s \
|
'-i',
|
||||||
-ss %d \
|
'%s' % t5,
|
||||||
-t %d \
|
'-ss',
|
||||||
%s
|
'%d' % t1[0],
|
||||||
''' % (t5, t1[0], t1[1] - t1[0], t4), shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) as p:
|
'-t',
|
||||||
|
'%d' % t1[1] - t1[0],
|
||||||
|
'%s' % t4,
|
||||||
|
], stdout=subprocess.PIPE, stderr=subprocess.PIPE) as p:
|
||||||
pprint.pprint(p.communicate())
|
pprint.pprint(p.communicate())
|
||||||
p.wait()
|
p.wait()
|
||||||
assert p.returncode == 0
|
assert p.returncode == 0
|
||||||
|
Loading…
Reference in New Issue
Block a user