1
0
mirror of https://github.com/ytdl-org/youtube-dl synced 2024-12-17 23:16:39 +00:00

[hbo] extract m3u8 formats

This commit is contained in:
Remita Amine 2017-04-13 12:28:00 +01:00
parent b2fff30817
commit 3f7409f745

View File

@ -92,12 +92,14 @@ class HBOBaseIE(InfoExtractor):
video_url.replace('.tar', '/base_index_w8.m3u8'), video_url.replace('.tar', '/base_index_w8.m3u8'),
video_id, 'mp4', 'm3u8_native', m3u8_id='hls', fatal=False)) video_id, 'mp4', 'm3u8_native', m3u8_id='hls', fatal=False))
elif source.tag == 'hls': elif source.tag == 'hls':
# #EXT-X-BYTERANGE is not supported by native hls downloader m3u8_formats = self._extract_m3u8_formats(
# and ffmpeg (#10955) video_url.replace('.tar', '/base_index.m3u8'),
# formats.extend(self._extract_m3u8_formats( video_id, 'mp4', 'm3u8_native', m3u8_id='hls', fatal=False)
# video_url.replace('.tar', '/base_index.m3u8'), for f in m3u8_formats:
# video_id, 'mp4', 'm3u8_native', m3u8_id='hls', fatal=False)) if f.get('vcodec') == 'none' and not f.get('tbr'):
continue f['tbr'] = int_or_none(self._search_regex(
r'-(\d+)k/', f['url'], 'tbr', default=None))
formats.extend(m3u8_formats)
elif source.tag == 'dash': elif source.tag == 'dash':
formats.extend(self._extract_mpd_formats( formats.extend(self._extract_mpd_formats(
video_url.replace('.tar', '/manifest.mpd'), video_url.replace('.tar', '/manifest.mpd'),
@ -110,7 +112,7 @@ class HBOBaseIE(InfoExtractor):
'width': format_info.get('width'), 'width': format_info.get('width'),
'height': format_info.get('height'), 'height': format_info.get('height'),
}) })
self._sort_formats(formats, ('width', 'height', 'tbr', 'format_id')) self._sort_formats(formats)
thumbnails = [] thumbnails = []
card_sizes = xpath_element(video_data, 'titleCardSizes') card_sizes = xpath_element(video_data, 'titleCardSizes')