aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2022-02-14 14:36:22 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2022-02-14 14:40:19 +0530
commite8969bda9412b8dc9f76da25ee7e5d9c46de8355 (patch)
tree90b2acaeda1c66708c25a3fd1596cb9319911599
parentc82f051dbbe6ba6a6c56ccdbaa079cbf83912fe1 (diff)
downloadhypervideo-pre-e8969bda9412b8dc9f76da25ee7e5d9c46de8355.tar.lz
hypervideo-pre-e8969bda9412b8dc9f76da25ee7e5d9c46de8355.tar.xz
hypervideo-pre-e8969bda9412b8dc9f76da25ee7e5d9c46de8355.zip
Obey `--abort-on-error` for "ffmpeg not installed"
Closes #1840
-rw-r--r--yt_dlp/YoutubeDL.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py
index 67ef2ffa5..1c3f9ba1e 100644
--- a/yt_dlp/YoutubeDL.py
+++ b/yt_dlp/YoutubeDL.py
@@ -3051,9 +3051,11 @@ class YoutubeDL(object):
'while also allowing unplayable formats to be downloaded. '
'The formats won\'t be merged to prevent data corruption.')
elif not merger.available:
- self.report_warning(
- 'You have requested merging of multiple formats but ffmpeg is not installed. '
- 'The formats won\'t be merged.')
+ msg = 'You have requested merging of multiple formats but ffmpeg is not installed'
+ if not self.params.get('ignoreerrors'):
+ self.report_error(f'{msg}. Aborting due to --abort-on-error')
+ return
+ self.report_warning(f'{msg}. The formats won\'t be merged')
if temp_filename == '-':
reason = ('using a downloader other than ffmpeg' if FFmpegFD.can_merge_formats(info_dict, self.params)