From 7818cb23c9131fe647db31eab56fb214f811f013 Mon Sep 17 00:00:00 2001 From: Mark Lee Date: Sun, 15 Mar 2015 21:20:44 -0700 Subject: [PATCH] [multipart_video] fix handling video parts with single quotes in the filename --- youtube_dl/postprocessor/ffmpeg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dl/postprocessor/ffmpeg.py b/youtube_dl/postprocessor/ffmpeg.py index aeb2594dc..47146c71a 100644 --- a/youtube_dl/postprocessor/ffmpeg.py +++ b/youtube_dl/postprocessor/ffmpeg.py @@ -595,7 +595,7 @@ class FFmpegJoinVideosPP(FFmpegPostProcessor): files_file = u'%s.videos' % filename with io.open(encodeFilename(files_file), 'w', encoding='utf-8') as f: for video in parts_files: - f.write(u'file \'%s\'\n' % video) + f.write(u'file \'%s\'\n' % video.replace("'", r"'\''")) self._downloader.to_screen(u'[ffmpeg] Joining video parts, destination: %s' % filename) try: self.run_ffmpeg(files_file, filename, ['-c', 'copy'], ['-f', 'concat'])