[multipart_video] fix handling video parts with single quotes in the filename

This commit is contained in:
Mark Lee 2015-03-15 21:20:44 -07:00
parent 3d89a7b54b
commit 7818cb23c9

View File

@ -595,7 +595,7 @@ class FFmpegJoinVideosPP(FFmpegPostProcessor):
files_file = u'%s.videos' % filename files_file = u'%s.videos' % filename
with io.open(encodeFilename(files_file), 'w', encoding='utf-8') as f: with io.open(encodeFilename(files_file), 'w', encoding='utf-8') as f:
for video in parts_files: 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) self._downloader.to_screen(u'[ffmpeg] Joining video parts, destination: %s' % filename)
try: try:
self.run_ffmpeg(files_file, filename, ['-c', 'copy'], ['-f', 'concat']) self.run_ffmpeg(files_file, filename, ['-c', 'copy'], ['-f', 'concat'])