Browse Source

[youtube] Enforce using chunked HTTP downloading for DASH formats

Sergey M․ 7 years ago
parent
commit
e4a60912b8
1 changed files with 5 additions and 0 deletions
  1. 5 0
      youtube_dl/extractor/youtube.py

+ 5 - 0
youtube_dl/extractor/youtube.py

@@ -1944,6 +1944,11 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
                                     break
                             if codecs:
                                 dct.update(parse_codecs(codecs))
+                if dct.get('acodec') == 'none' or dct.get('vcodec') == 'none':
+                    dct['downloader_options'] = {
+                        # Youtube throttles chunks >~10M
+                        'http_chunk_size': 10485760,
+                    }
                 formats.append(dct)
         elif video_info.get('hlsvp'):
             manifest_url = video_info['hlsvp'][0]