aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/postprocessor/ffmpeg.py
diff options
context:
space:
mode:
authorJesús <heckyel@hyperbola.info>2022-02-18 16:58:38 -0500
committerJesús <heckyel@hyperbola.info>2022-02-18 16:58:38 -0500
commitc7a54bcfbd27dde89c6267b42da7de8ea5625be1 (patch)
tree671b2b7ffe3f976952836dbfe6ee53bf33971e3a /yt_dlp/postprocessor/ffmpeg.py
parentb6d1ccad21d790c38605be2966ad17e92f1186d7 (diff)
parented66a17ef0b18159dda901f0122520c25ea95d6b (diff)
downloadhypervideo-pre-c7a54bcfbd27dde89c6267b42da7de8ea5625be1.tar.lz
hypervideo-pre-c7a54bcfbd27dde89c6267b42da7de8ea5625be1.tar.xz
hypervideo-pre-c7a54bcfbd27dde89c6267b42da7de8ea5625be1.zip
updated from upstream | 18/02/2022 at 16:58
Diffstat (limited to 'yt_dlp/postprocessor/ffmpeg.py')
-rw-r--r--yt_dlp/postprocessor/ffmpeg.py17
1 files changed, 7 insertions, 10 deletions
diff --git a/yt_dlp/postprocessor/ffmpeg.py b/yt_dlp/postprocessor/ffmpeg.py
index 42e9d12a7..d4495b4a2 100644
--- a/yt_dlp/postprocessor/ffmpeg.py
+++ b/yt_dlp/postprocessor/ffmpeg.py
@@ -384,12 +384,10 @@ class FFmpegPostProcessor(PostProcessor):
out_flags = list(self.stream_copy_opts(ext=determine_ext(out_file)))
- try:
- self.real_run_ffmpeg(
- [(concat_file, ['-hide_banner', '-nostdin', '-f', 'concat', '-safe', '0'])],
- [(out_file, out_flags)])
- finally:
- os.remove(concat_file)
+ self.real_run_ffmpeg(
+ [(concat_file, ['-hide_banner', '-nostdin', '-f', 'concat', '-safe', '0'])],
+ [(out_file, out_flags)])
+ os.remove(concat_file)
@classmethod
def _concat_spec(cls, in_files, concat_opts=None):
@@ -1147,16 +1145,15 @@ class FFmpegConcatPP(FFmpegPostProcessor):
super().concat_files(in_files, out_file)
return in_files
- @PostProcessor._restrict_to(images=False)
+ @PostProcessor._restrict_to(images=False, simulated=False)
def run(self, info):
entries = info.get('entries') or []
- if (self.get_param('skip_download') or not any(entries)
- or self._only_multi_video and info['_type'] != 'multi_video'):
+ if not any(entries) or (self._only_multi_video and info['_type'] != 'multi_video'):
return [], info
elif any(len(entry) > 1 for entry in traverse_obj(entries, (..., 'requested_downloads')) or []):
raise PostProcessingError('Concatenation is not supported when downloading multiple separate formats')
- in_files = traverse_obj(entries, (..., 'requested_downloads', 0, 'filepath'))
+ in_files = traverse_obj(entries, (..., 'requested_downloads', 0, 'filepath')) or []
if len(in_files) < len(entries):
raise PostProcessingError('Aborting concatenation because some downloads failed')