about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRogério Brito <rbrito@ime.usp.br>2013-10-19 14:04:44 -0300
committerRogério Brito <rbrito@ime.usp.br>2013-10-19 14:04:44 -0300
commitd5a9bb4ea97287e633e891ddd1a416619c9aada9 (patch)
treeb5a5c0a33ce8654d6cd5592001314ac26ab78947
parent8e590a117f61bfb034ba6d181f5752b6977b4262 (diff)
downloadyoutube-dl-d5a9bb4ea97287e633e891ddd1a416619c9aada9.tar.gz
youtube-dl-d5a9bb4ea97287e633e891ddd1a416619c9aada9.tar.xz
youtube-dl-d5a9bb4ea97287e633e891ddd1a416619c9aada9.zip
extractor: youtube: Swap video dimensions to match standard practice.
While working on this, I thought about simplifying things like changing
480x854 to 480p, and that seemed like a good option, until I realized that
people (me included) usually link the concept of some number followed by a p
with the video being 16:9.

So, we would be losing some information and, as we all know,
[explicit is better than implicit][*].

[*]: http://www.python.org/dev/peps/pep-0020/

This closes #1446.

Signed-off-by: Rogério Brito <rbrito@ime.usp.br>
-rw-r--r--youtube_dl/extractor/youtube.py26
1 files changed, 13 insertions, 13 deletions
diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py
index fb7c42830..143fac98a 100644
--- a/youtube_dl/extractor/youtube.py
+++ b/youtube_dl/extractor/youtube.py
@@ -253,21 +253,21 @@ class YoutubeIE(YoutubeBaseInfoExtractor, SubtitlesInfoExtractor):
         '248': 'webm',
     }
     _video_dimensions = {
-        '5': '240x400',
+        '5': '400x240',
         '6': '???',
         '13': '???',
-        '17': '144x176',
-        '18': '360x640',
-        '22': '720x1280',
-        '34': '360x640',
-        '35': '480x854',
-        '36': '240x320',
-        '37': '1080x1920',
-        '38': '3072x4096',
-        '43': '360x640',
-        '44': '480x854',
-        '45': '720x1280',
-        '46': '1080x1920',
+        '17': '176x144',
+        '18': '640x360',
+        '22': '1280x720',
+        '34': '640x360',
+        '35': '854x480',
+        '36': '320x240',
+        '37': '1920x1080',
+        '38': '4096x3072',
+        '43': '640x360',
+        '44': '854x480',
+        '45': '1280x720',
+        '46': '1920x1080',
         '82': '360p',
         '83': '480p',
         '84': '720p',