From 3defc240da1eb9a096c2ded5436700f920b3c49f Mon Sep 17 00:00:00 2001 From: AGSPhoenix Date: Sat, 19 Apr 2014 05:23:07 -0400 Subject: [PATCH] Escape single quotes in filename There are probably other special characters that will need to be replaced. --- youtube_dl/postprocessor/ffmpeg.py | 1 + 1 file changed, 1 insertion(+) diff --git a/youtube_dl/postprocessor/ffmpeg.py b/youtube_dl/postprocessor/ffmpeg.py index 96189f669..49f8a973c 100644 --- a/youtube_dl/postprocessor/ffmpeg.py +++ b/youtube_dl/postprocessor/ffmpeg.py @@ -506,6 +506,7 @@ class FFmpegConcatPP(FFmpegPostProcessor): #No method using solely the command line is listed. And I'm like "really?". with open(filename + '.list.txt', 'wb') as f: for file in info['__files_to_append']: + file = file.replace("'", "\\'") f.write("file '" + file + "'\n") self.run_ffmpeg_multiple_files([filename + '.list.txt'], filename, args, preopts=concatargs) os.unlink(filename + '.list.txt')