Merge branch 'best-fallback-on-outdated-avconv' of https://github.com/dstftw/youtube...
[youtube-dl] / youtube_dl / YoutubeDL.py
index 84d50dab7646537f3707f550e43b4b9ea2ca7ddd..4c8196d082fa9cfffbb45a1c5f5684664ecc1a80 100755 (executable)
@@ -1086,9 +1086,10 @@ class YoutubeDL(object):
         if req_format is None:
             req_format_list = []
             if (self.params.get('outtmpl', DEFAULT_OUTTMPL) != '-' and
-                    info_dict['extractor'] in ['youtube', 'ted'] and
-                    FFmpegMergerPP(self).available):
-                req_format_list.append('bestvideo+bestaudio')
+                    info_dict['extractor'] in ['youtube', 'ted']):
+                merger = FFmpegMergerPP(self)
+                if merger.available and merger.can_merge():
+                    req_format_list.append('bestvideo+bestaudio')
             req_format_list.append('best')
             req_format = '/'.join(req_format_list)
         formats_to_download = []