projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
5964b59
)
[brightcove] Extract more formats (#8862)
author
Yen Chi Hsuan
<yan12125@gmail.com>
Sat, 26 Mar 2016 10:21:07 +0000
(18:21 +0800)
committer
Yen Chi Hsuan
<yan12125@gmail.com>
Sat, 26 Mar 2016 10:21:07 +0000
(18:21 +0800)
youtube_dl/extractor/brightcove.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/brightcove.py
b/youtube_dl/extractor/brightcove.py
index afe081d82c93c100b6ccc45643d6f8b9afbc36c3..c9e43a2751f1f94a622895cd7dfbdabfa3d0355f 100644
(file)
--- a/
youtube_dl/extractor/brightcove.py
+++ b/
youtube_dl/extractor/brightcove.py
@@
-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:
formats = []
for rend in renditions:
if renditions:
formats = []
for rend in renditions:
@@
-319,13
+319,23
@@
class BrightcoveLegacyIE(InfoExtractor):
if ext is None:
ext = determine_ext(url)
size = rend.get('size')
if ext is None:
ext = determine_ext(url)
size = rend.get('size')
-
formats.append(
{
+
a_format =
{
'url': url,
'ext': ext,
'height': rend.get('frameHeight'),
'width': rend.get('frameWidth'),
'filesize': size if size != 0 else None,
'url': url,
'ext': ext,
'height': rend.get('frameHeight'),
'width': rend.get('frameWidth'),
'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)
info['formats'] = formats
elif video_info.get('FLVFullLengthURL') is not None:
self._sort_formats(formats)
info['formats'] = formats
elif video_info.get('FLVFullLengthURL') is not None: