aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2014-11-09 10:59:56 +0100
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2014-11-09 10:59:56 +0100
commitf866e474f313d262b2c9696f84aee4432d75f7a9 (patch)
treeabe4b8c51e24cc32a0f3d4942a9451f989264a46
parent8bb9b97c97d7114dbbc3f7b602130e82d2cfd16f (diff)
downloadyoutube-dl-f866e474f313d262b2c9696f84aee4432d75f7a9.tar.xz
[YoutubeDL] Don't dowload formats for merging if the first doesn't contain the video (#4132)
-rwxr-xr-xyoutube_dl/YoutubeDL.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py
index 8732f3db4..172180d14 100755
--- a/youtube_dl/YoutubeDL.py
+++ b/youtube_dl/YoutubeDL.py
@@ -835,6 +835,13 @@ class YoutubeDL(object):
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,