diff options
| author | Philipp Hagemeister <phihag@phihag.de> | 2014-01-23 23:54:06 +0100 | 
|---|---|---|
| committer | Philipp Hagemeister <phihag@phihag.de> | 2014-01-23 23:54:06 +0100 | 
| commit | 1394ce65b4c25426cbb4dd1d97adc4cc7d0ba80b (patch) | |
| tree | 6bac903aadc46ba30bbd742d15f9a304b3be23e7 | |
| parent | 63ef36e8d8fb7846b344918a39a9d2df05dfac56 (diff) | |
[youtube] Add new formats (Fixes #2221)
| -rw-r--r-- | youtube_dl/YoutubeDL.py | 13 | ||||
| -rw-r--r-- | youtube_dl/extractor/common.py | 1 | ||||
| -rw-r--r-- | youtube_dl/extractor/youtube.py | 5 | 
3 files changed, 17 insertions, 2 deletions
| diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py index f202ba4f0..1e94d8ac6 100644 --- a/youtube_dl/YoutubeDL.py +++ b/youtube_dl/YoutubeDL.py @@ -1094,9 +1094,15 @@ class YoutubeDL(object):                  res += fdict['format_note'] + ' '              if fdict.get('tbr') is not None:                  res += '%4dk ' % fdict['tbr'] +            if fdict.get('container') is not None: +                if res: +                    res += ', ' +                res += '%s container' % fdict['container']              if (fdict.get('vcodec') is not None and                      fdict.get('vcodec') != 'none'): -                res += '%-5s' % fdict['vcodec'] +                if res: +                    res += ', ' +                res += fdict['vcodec']                  if fdict.get('vbr') is not None:                      res += '@'              elif fdict.get('vbr') is not None and fdict.get('abr') is not None: @@ -1106,7 +1112,10 @@ class YoutubeDL(object):              if fdict.get('acodec') is not None:                  if res:                      res += ', ' -                res += '%-5s' % fdict['acodec'] +                if fdict['acodec'] == 'none': +                    res += 'video only' +                else: +                    res += '%-5s' % fdict['acodec']              elif fdict.get('abr') is not None:                  if res:                      res += ', ' diff --git a/youtube_dl/extractor/common.py b/youtube_dl/extractor/common.py index 02a82dc57..aa48bd4e6 100644 --- a/youtube_dl/extractor/common.py +++ b/youtube_dl/extractor/common.py @@ -66,6 +66,7 @@ class InfoExtractor(object):                      * asr        Audio sampling rate in Hertz                      * vbr        Average video bitrate in KBit/s                      * vcodec     Name of the video codec in use +                    * container  Name of the container format                      * filesize   The number of bytes, if known in advance                      * player_url SWF Player URL (used for rtmpdump).                      * protocol   The protocol that will be used for the actual diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py index 8816f4f80..f70dca77c 100644 --- a/youtube_dl/extractor/youtube.py +++ b/youtube_dl/extractor/youtube.py @@ -207,6 +207,11 @@ class YoutubeIE(YoutubeBaseInfoExtractor, SubtitlesInfoExtractor):          '141': {'ext': 'm4a', 'format_note': 'DASH audio', 'vcodec': 'none', 'abr': 256, 'preference': -50},          # Dash webm +        '167': {'ext': 'webm', 'height': 360, 'width': 640, 'format_note': 'DASH video', 'container': 'webm', 'vcodec': 'VP8', 'acodec': 'none', 'preference': -40}, +        '168': {'ext': 'webm', 'height': 480, 'width': 854, 'format_note': 'DASH video', 'container': 'webm', 'vcodec': 'VP8', 'acodec': 'none', 'preference': -40}, +        '168': {'ext': 'webm', 'height': 1080, 'width': 1920, 'format_note': 'DASH video', 'container': 'webm', 'vcodec': 'VP8', 'acodec': 'none', 'preference': -40}, +        '218': {'ext': 'webm', 'height': 480, 'width': 854, 'format_note': 'DASH video', 'container': 'webm', 'vcodec': 'VP8', 'acodec': 'none', 'preference': -40}, +        '219': {'ext': 'webm', 'height': 480, 'width': 854, 'format_note': 'DASH video', 'container': 'webm', 'vcodec': 'VP8', 'acodec': 'none', 'preference': -40},          '242': {'ext': 'webm', 'height': 240, 'resolution': '240p', 'format_note': 'DASH webm', 'preference': -40},          '243': {'ext': 'webm', 'height': 360, 'resolution': '360p', 'format_note': 'DASH webm', 'preference': -40},          '244': {'ext': 'webm', 'height': 480, 'resolution': '480p', 'format_note': 'DASH webm', 'preference': -40}, | 
