[brightcove] Extract all the available formats
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Wed, 6 Nov 2013 18:05:41 +0000 (19:05 +0100)
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Wed, 6 Nov 2013 18:05:41 +0000 (19:05 +0100)
youtube_dl/extractor/brightcove.py

index 0c6e13b9cbc33eb7ffecb95b9b84461c3bf5ec2c..f0b79898c0426610256f103bf49c94c60092d823 100644 (file)
@@ -146,10 +146,11 @@ class BrightcoveIE(InfoExtractor):
         renditions = video_info.get('renditions')
         if renditions:
             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:
             info.update({
                 'url': video_info['FLVFullLengthURL'],