]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[YoutubeDL] Make `bestvideo+bestaudio/best` default format when merger is available
authorSergey M․ <dstftw@gmail.com>
Fri, 17 Apr 2015 19:14:10 +0000 (01:14 +0600)
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Sun, 19 Apr 2015 15:51:56 +0000 (17:51 +0200)
youtube_dl/YoutubeDL.py

index 28cf1662ebcacbb307666e5be2b1b11cb27aa425..e5d497b3f2ff64964cca844141f605cdb9b653b2 100755 (executable)
@@ -1091,7 +1091,11 @@ class YoutubeDL(object):
 
         req_format = self.params.get('format')
         if req_format is None:
-            req_format = 'best'
+            req_format_list = []
+            if info_dict['extractor'] == 'youtube' and FFmpegMergerPP(self).available:
+                req_format_list.append('bestvideo+bestaudio')
+            req_format_list.append('best')
+            req_format = '/'.join(req_format_list)
         formats_to_download = []
         if req_format == 'all':
             formats_to_download = formats