[ffmpeg] more check_call replacing wrong 'raise's

This commit is contained in:
lilydjwg 2016-01-23 13:10:42 +08:00
parent 1c208f2a91
commit d470c8c29a

View File

@ -170,11 +170,9 @@ def ffmpeg_concat_mp4_to_mp4(files, output='output.mp4'):
params.append(output + '.txt') params.append(output + '.txt')
params += ['-c', 'copy', output] params += ['-c', 'copy', output]
if subprocess.call(params) == 0: subprocess.check_call(params)
os.remove(output + '.txt') os.remove(output + '.txt')
return True return True
else:
raise
for file in files: for file in files:
if os.path.isfile(file): if os.path.isfile(file):
@ -196,9 +194,7 @@ def ffmpeg_concat_mp4_to_mp4(files, output='output.mp4'):
else: else:
params += ['-c', 'copy', '-absf', 'aac_adtstoasc', output] params += ['-c', 'copy', '-absf', 'aac_adtstoasc', output]
if subprocess.call(params) == 0: subprocess.check_call(params)
for file in files: for file in files:
os.remove(file + '.ts') os.remove(file + '.ts')
return True return True
else:
raise