mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-11-25 19:52:11 +00:00
[brightcove] Extract more formats (#8862)
This commit is contained in:
parent
5964b598ff
commit
d6c340cae5
1 changed files with 13 additions and 3 deletions
|
@ -297,7 +297,7 @@ class BrightcoveLegacyIE(InfoExtractor):
|
||||||
'uploader': video_info.get('publisherName'),
|
'uploader': video_info.get('publisherName'),
|
||||||
}
|
}
|
||||||
|
|
||||||
renditions = video_info.get('renditions')
|
renditions = video_info.get('renditions', []) + video_info.get('IOSRenditions', [])
|
||||||
if renditions:
|
if renditions:
|
||||||
formats = []
|
formats = []
|
||||||
for rend in renditions:
|
for rend in renditions:
|
||||||
|
@ -319,13 +319,23 @@ class BrightcoveLegacyIE(InfoExtractor):
|
||||||
if ext is None:
|
if ext is None:
|
||||||
ext = determine_ext(url)
|
ext = determine_ext(url)
|
||||||
size = rend.get('size')
|
size = rend.get('size')
|
||||||
formats.append({
|
a_format = {
|
||||||
'url': url,
|
'url': url,
|
||||||
'ext': ext,
|
'ext': ext,
|
||||||
'height': rend.get('frameHeight'),
|
'height': rend.get('frameHeight'),
|
||||||
'width': rend.get('frameWidth'),
|
'width': rend.get('frameWidth'),
|
||||||
'filesize': size if size != 0 else None,
|
'filesize': size if size != 0 else None,
|
||||||
})
|
}
|
||||||
|
|
||||||
|
# m3u8 manifests with remote == false are media playlists
|
||||||
|
# Not calling _extract_m3u8_formats here to save network traffic
|
||||||
|
if ext == 'm3u8':
|
||||||
|
a_format.update({
|
||||||
|
'ext': 'mp4',
|
||||||
|
'protocol': 'm3u8',
|
||||||
|
})
|
||||||
|
|
||||||
|
formats.append(a_format)
|
||||||
self._sort_formats(formats)
|
self._sort_formats(formats)
|
||||||
info['formats'] = formats
|
info['formats'] = formats
|
||||||
elif video_info.get('FLVFullLengthURL') is not None:
|
elif video_info.get('FLVFullLengthURL') is not None:
|
||||||
|
|
Loading…
Reference in a new issue