mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-29 01:51:06 +00:00
[YoutubeDL] Don't dowload formats for merging if the first doesn't contain the video (#4132)
This commit is contained in:
parent
8bb9b97c97
commit
f866e474f3
1 changed files with 7 additions and 0 deletions
|
@ -835,6 +835,13 @@ def process_video_result(self, info_dict, download=True):
|
|||
format_1, format_2 = rf.split('+')
|
||||
formats_info = (self.select_format(format_1, formats),
|
||||
self.select_format(format_2, formats))
|
||||
# The first format must contain the video and the
|
||||
# second the audio
|
||||
if formats_info[0].get('vcodec') == 'none':
|
||||
self.report_error('The first format must contain '
|
||||
'the video, try using "-f %s+%s"' %
|
||||
(format_2, format_1))
|
||||
return
|
||||
if all(formats_info):
|
||||
selected_format = {
|
||||
'requested_formats': formats_info,
|
||||
|
|
Loading…
Reference in a new issue