0
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-26 02:55:17 +00:00

Obey --abort-on-error for "ffmpeg not installed"

Closes #1840
This commit is contained in:
pukkandan 2022-02-14 14:36:22 +05:30
parent c82f051dbb
commit e8969bda94
No known key found for this signature in database
GPG key ID: 7EEE9E1E817D0A39

View file

@ -3051,9 +3051,11 @@ def correct_ext(filename, ext=new_ext):
'while also allowing unplayable formats to be downloaded. ' 'while also allowing unplayable formats to be downloaded. '
'The formats won\'t be merged to prevent data corruption.') 'The formats won\'t be merged to prevent data corruption.')
elif not merger.available: elif not merger.available:
self.report_warning( msg = 'You have requested merging of multiple formats but ffmpeg is not installed'
'You have requested merging of multiple formats but ffmpeg is not installed. ' if not self.params.get('ignoreerrors'):
'The formats won\'t be merged.') 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 == '-': if temp_filename == '-':
reason = ('using a downloader other than ffmpeg' if FFmpegFD.can_merge_formats(info_dict, self.params) reason = ('using a downloader other than ffmpeg' if FFmpegFD.can_merge_formats(info_dict, self.params)