mirror of
https://github.com/soimort/you-get.git
synced 2025-03-13 03:17:44 +03:00
escape filenames for ffmpeg concatenating
This commit is contained in:
parent
66053b0788
commit
e6581b99aa
@ -100,7 +100,9 @@ def ffmpeg_concat_flv_to_mp4(files, output='output.mp4'):
|
||||
concat_list = open(output + '.txt', 'w', encoding="utf-8")
|
||||
for file in files:
|
||||
if os.path.isfile(file):
|
||||
concat_list.write("file '%s'\n" % file)
|
||||
# for escaping rules, see:
|
||||
# https://www.ffmpeg.org/ffmpeg-utils.html#Quoting-and-escaping
|
||||
concat_list.write("file '%s'\n" % file.replace("'", r"'\''"))
|
||||
concat_list.close()
|
||||
|
||||
params = [FFMPEG, '-f', 'concat', '-y', '-i']
|
||||
|
Loading…
x
Reference in New Issue
Block a user