Update join video postprocessor due to API change
This commit is contained in:
parent
3bbd930bcb
commit
f18e093d94
@ -403,7 +403,7 @@ class FFmpegJoinVideosPP(FFmpegPostProcessor):
|
|||||||
filename = information['filepath']
|
filename = information['filepath']
|
||||||
parts = information.get('parts')
|
parts = information.get('parts')
|
||||||
if parts is None or len(parts) == 1:
|
if parts is None or len(parts) == 1:
|
||||||
return (True, information)
|
return [], information
|
||||||
parts_files = [build_part_filename(filename, i) for (i, _) in enumerate(parts)]
|
parts_files = [build_part_filename(filename, i) for (i, _) in enumerate(parts)]
|
||||||
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:
|
||||||
@ -413,13 +413,11 @@ class FFmpegJoinVideosPP(FFmpegPostProcessor):
|
|||||||
try:
|
try:
|
||||||
self.run_ffmpeg(files_file, filename, ['-c', 'copy'], ['-f', 'concat'])
|
self.run_ffmpeg(files_file, filename, ['-c', 'copy'], ['-f', 'concat'])
|
||||||
except FFmpegPostProcessorError:
|
except FFmpegPostProcessorError:
|
||||||
return False, information
|
return [filename], information
|
||||||
os.remove(encodeFilename(files_file))
|
os.remove(encodeFilename(files_file))
|
||||||
# We have to manually remove the parts if requested
|
|
||||||
if not self._downloader.params.get('keepvideo', False):
|
if not self._downloader.params.get('keepvideo', False):
|
||||||
for part_file in parts_files:
|
return parts_files, information
|
||||||
os.remove(encodeFilename(part_file))
|
return [], information
|
||||||
return (True, information)
|
|
||||||
|
|
||||||
|
|
||||||
class FFmpegMergerPP(FFmpegPostProcessor):
|
class FFmpegMergerPP(FFmpegPostProcessor):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user