[~] Refactor

This commit is contained in:
Siarhei Siniak 2021-07-30 10:35:06 +03:00
parent 89d901a0db
commit 885ed767bf

@ -1497,17 +1497,18 @@ def kernel_25(images, delay=None):
t7 = os.path.join(t3, 'output.gif') t7 = os.path.join(t3, 'output.gif')
subprocess.check_call( if False:
[ subprocess.check_call(
'convert', [
'-delay', 'convert',
'%d' % delay, '-delay',
'-loop', '%d' % delay,
'0', '-loop',
*t6, '0',
t7, *t6,
] t7,
) ]
)
t8 = os.path.join( t8 = os.path.join(
t3, t3,
@ -1516,11 +1517,33 @@ def kernel_25(images, delay=None):
if os.path.exists(t8): if os.path.exists(t8):
os.unlink(t8) os.unlink(t8)
if False:
subprocess.check_call(
[
'ffmpeg',
'-i',
t7,
t8,
]
)
t9 = os.path.join(t3, 'input.txt')
with io.open(t9, 'w') as f:
f.write(
'\n'.join(
[
'file %s' % o
for o in t6
]
)
)
subprocess.check_call( subprocess.check_call(
[ [
'ffmpeg', 'ffmpeg',
'-f',
'concat',
'-i', '-i',
t7, '%s' % t9,
t8, t8,
] ]
) )