Browse Source

[brightcove] Extract all the available formats

rtmp_test
Jaime Marquínez Ferrándiz 11 years ago
parent
commit
b0759f0c19
1 changed files with 5 additions and 4 deletions
  1. +5
    -4
      youtube_dl/extractor/brightcove.py

+ 5
- 4
youtube_dl/extractor/brightcove.py View File

@ -146,10 +146,11 @@ class BrightcoveIE(InfoExtractor):
renditions = video_info.get('renditions') renditions = video_info.get('renditions')
if renditions: if renditions:
renditions = sorted(renditions, key=lambda r: r['size']) renditions = sorted(renditions, key=lambda r: r['size'])
best_format = renditions[-1]
info.update({
'url': best_format['defaultURL'],
})
info['formats'] = [{
'url': rend['defaultURL'],
'height': rend.get('frameHeight'),
'width': rend.get('frameWidth'),
} for rend in renditions]
elif video_info.get('FLVFullLengthURL') is not None: elif video_info.get('FLVFullLengthURL') is not None:
info.update({ info.update({
'url': video_info['FLVFullLengthURL'], 'url': video_info['FLVFullLengthURL'],


Loading…
Cancel
Save