mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-21 20:46:36 -05:00
[youtube] Disable compression for live streams
This commit is contained in:
parent
94e8c80473
commit
ac5a69af45
1 changed files with 5 additions and 0 deletions
|
@ -1475,6 +1475,11 @@ def _map_to_format_list(urlmap):
|
|||
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')
|
||||
|
||||
|
|
Loading…
Reference in a new issue