From: Yen Chi Hsuan Date: Sun, 29 Nov 2015 04:44:24 +0000 (+0800) Subject: [youtube] Disable compression for live streams X-Git-Url: http://git.oshgnacknak.de/?a=commitdiff_plain;h=ac5a69af45307b583a9a6088abe5939bec18d562;p=youtube-dl [youtube] Disable compression for live streams --- diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py index 1c2420a33..52f4fe36d 100644 --- a/youtube_dl/extractor/youtube.py +++ b/youtube_dl/extractor/youtube.py @@ -1475,6 +1475,11 @@ class YoutubeIE(YoutubeBaseInfoExtractor): manifest_url = video_info['hlsvp'][0] url_map = self._extract_from_m3u8(manifest_url, video_id) formats = _map_to_format_list(url_map) + # Accept-Encoding header causes failures in live streams on Youtube and Youtube Gaming + for a_format in formats: + if 'http_headers' not in a_format: + a_format['http_headers'] = {} + a_format['http_headers']['Youtubedl-no-compression'] = True else: raise ExtractorError('no conn, hlsvp or url_encoded_fmt_stream_map information found in video info')