{"action":"created","issue":{"url":"https://api.github.com/repos/rg3/youtube-dl/issues/6796","labels_url":"https://api.github.com/repos/rg3/youtube-dl/issues/6796/labels{/name}","comments_url":"https://api.github.com/repos/rg3/youtube-dl/issues/6796/comments","events_url":"https://api.github.com/repos/rg3/youtube-dl/issues/6796/events","html_url":"https://github.com/rg3/youtube-dl/issues/6796","id":105285867,"number":6796,"title":"Youtube VP9 format found with incorrect bitrate, causes 'bestvideo' choice to be wrong","user":{"login":"wmwdld","id":5938292,"avatar_url":"https://avatars.githubusercontent.com/u/5938292?v=3","gravatar_id":"","url":"https://api.github.com/users/wmwdld","html_url":"https://github.com/wmwdld","followers_url":"https://api.github.com/users/wmwdld/followers","following_url":"https://api.github.com/users/wmwdld/following{/other_user}","gists_url":"https://api.github.com/users/wmwdld/gists{/gist_id}","starred_url":"https://api.github.com/users/wmwdld/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wmwdld/subscriptions","organizations_url":"https://api.github.com/users/wmwdld/orgs","repos_url":"https://api.github.com/users/wmwdld/repos","events_url":"https://api.github.com/users/wmwdld/events{/privacy}","received_events_url":"https://api.github.com/users/wmwdld/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-08T01:56:59Z","updated_at":"2015-09-08T02:33:34Z","closed_at":"2015-09-08T02:33:34Z","body":"Given:\r\n\r\n    $ youtube-dl -vF https://www.youtube.com/watch?v=wRjEBYuSg8o\r\n    [debug] System config: []\r\n    [debug] User config: []\r\n    [debug] Command-line args: ['-vF', 'https://www.youtube.com/watch?v=wRjEBYuSg8o']\r\n    [debug] Encodings: locale cp1252, fs mbcs, out cp1252, pref cp1252\r\n    [debug] youtube-dl version 2015.09.03\r\n    [debug] Python version 3.4.3 - Windows-7-6.1.7601-SP1\r\n    [debug] exe versions: ffmpeg N-70767-gd24af70, ffprobe N-70767-gd24af70, rtmpdump 2.4\r\n    [debug] Proxy map: {}\r\n    [youtube] wRjEBYuSg8o: Downloading webpage\r\n    [youtube] wRjEBYuSg8o: Downloading video info webpage\r\n    [youtube] wRjEBYuSg8o: Extracting video information\r\n    [youtube] wRjEBYuSg8o: Downloading DASH manifest\r\n    [youtube] wRjEBYuSg8o: Downloading DASH manifest\r\n    [info] Available formats for wRjEBYuSg8o:\r\n    format code  extension  resolution note\r\n    140          m4a        audio only DASH audio  129k , m4a_dash container, aac  @128k (44100Hz), 23.17MiB\r\n    171          webm       audio only DASH audio  135k , vorbis@128k (44100Hz), 16.51MiB\r\n    141          m4a        audio only DASH audio  257k , m4a_dash container, aac  @256k (44100Hz), 46.52MiB\r\n    160          mp4        256x144    DASH video  126k , avc1.4d400c, 15fps, video only, 20.46MiB\r\n    278          webm       256x144    DASH video  132k , webm container, vp9, 1fps, video only, 14.28MiB\r\n    242          webm       426x240    DASH video  287k , vp9, 1fps, video only, 28.23MiB\r\n    133          mp4        426x240    DASH video  341k , avc1.4d4015, 30fps, video only, 44.81MiB\r\n    243          webm       640x360    DASH video  569k , vp9, 1fps, video only, 53.93MiB\r\n    134          mp4        640x360    DASH video  619k , avc1.4d401e, 30fps, video only, 70.07MiB\r\n    244          webm       854x480    DASH video  936k , vp9, 1fps, video only, 99.39MiB\r\n    135          mp4        854x480    DASH video 1149k , avc1.4d401f, 30fps, video only, 136.68MiB\r\n    136          mp4        1280x720   DASH video 2293k , avc1.4d401f, 30fps, video only, 279.76MiB\r\n    247          webm       1280x720   DASH video 3630k , vp9, 1fps, video only, 209.67MiB\r\n    13           3gp        unknown    small\r\n    17           3gp        176x144    small ,  mp4a.40.2, mp4v.20.3\r\n    36           3gp        320x240    small ,  mp4a.40.2, mp4v.20.3\r\n    5            flv        400x240    small\r\n    43           webm       640x360    medium ,  vorbis, vp8.0\r\n    18           mp4        640x360    medium ,  mp4a.40.2, avc1.42001E\r\n    22           mp4        1280x720   hd720 ,  mp4a.40.2, avc1.64001F (best)\r\n\r\nYoutube-dl thinks that format 247 is the highest quality format and will choose to download it over formnat 136 (given that ffmpeg is in the path and it's looking to satisfy `bestvideo+bestaudio`), but this is incorrect as the format 136 stream has a higher bitrate.  And in fact both bitrates are wrong; this video has a duration of 1530 seconds, so the fmt 247 stream has a bitrate of 1149 kbit/s and the fmt 136 stream has a bitrate of 1533 kbit/s.  I notice that it lists the bitrate of the fmt 135 stream as 1149 kbit/s, so I suspect there could be a parsing error somewhere.\r\n\r\nThis seems random and unpredictable.  The above video was the first in a series.  Here is the second video of the series, uploaded by the same user (presumably with the same settings, resolution, bitrate, etc.) just two days later:\r\n\r\n    $ youtube-dl -vF https://www.youtube.com/watch?v=9TUsPJpTna8\r\n    [debug] System config: []\r\n    [debug] User config: []\r\n    [debug] Command-line args: ['-vF', 'https://www.youtube.com/watch?v=9TUsPJpTna8']\r\n    [debug] Encodings: locale cp1252, fs mbcs, out cp1252, pref cp1252\r\n    [debug] youtube-dl version 2015.09.03\r\n    [debug] Python version 3.4.3 - Windows-7-6.1.7601-SP1\r\n    [debug] exe versions: ffmpeg N-70767-gd24af70, ffprobe N-70767-gd24af70, rtmpdump 2.4\r\n    [debug] Proxy map: {}\r\n    [youtube] 9TUsPJpTna8: Downloading webpage\r\n    [youtube] 9TUsPJpTna8: Downloading video info webpage\r\n    [youtube] 9TUsPJpTna8: Extracting video information\r\n    [youtube] 9TUsPJpTna8: Downloading DASH manifest\r\n    [youtube] 9TUsPJpTna8: Downloading DASH manifest\r\n    [info] Available formats for 9TUsPJpTna8:\r\n    format code  extension  resolution note\r\n    140          m4a        audio only DASH audio  129k , m4a_dash container, aac  @128k (44100Hz), 27.66MiB\r\n    171          webm       audio only DASH audio  134k , vorbis@128k (44100Hz), 19.62MiB\r\n    141          m4a        audio only DASH audio  257k , m4a_dash container, aac  @256k (44100Hz), 55.53MiB\r\n    160          mp4        256x144    DASH video  121k , avc1.4d400c, 15fps, video only, 24.39MiB\r\n    278          webm       256x144    DASH video  166k , webm container, vp9, 1fps, video only, 17.10MiB\r\n    242          webm       426x240    DASH video  237k , vp9, 1fps, video only, 33.46MiB\r\n    133          mp4        426x240    DASH video  269k , avc1.4d4015, 30fps, video only, 53.41MiB\r\n    243          webm       640x360    DASH video  459k , vp9, 1fps, video only, 63.60MiB\r\n    134          mp4        640x360    DASH video  628k , avc1.4d401e, 30fps, video only, 70.32MiB\r\n    244          webm       854x480    DASH video  805k , vp9, 1fps, video only, 116.96MiB\r\n    135          mp4        854x480    DASH video 1149k , avc1.4d401f, 30fps, video only, 138.19MiB\r\n    247          webm       1280x720   DASH video 1917k , vp9, 1fps, video only, 239.89MiB\r\n    136          mp4        1280x720   DASH video 2220k , avc1.4d401f, 30fps, video only, 289.14MiB\r\n    13           3gp        unknown    small\r\n    17           3gp        176x144    small ,  mp4a.40.2, mp4v.20.3\r\n    36           3gp        320x240    small ,  mp4a.40.2, mp4v.20.3\r\n    5            flv        400x240    small\r\n    43           webm       640x360    medium ,  vorbis, vp8.0\r\n    18           mp4        640x360    medium ,  mp4a.40.2, avc1.42001E\r\n    22           mp4        1280x720   hd720 ,  mp4a.40.2, avc1.64001F (best)\r\n\r\nThis time youtube-dl will correctly choose fmt 136 over fmt 247, but only by accident, because the fmt 136 stream really has a bitrate of 1328 kbit/s, not 2220 kbit/s as reported.\r\n\r\nThe fps values are also consistently wrong for the VP9 formats.\r\n"},"comment":{"url":"https://api.github.com/repos/rg3/youtube-dl/issues/comments/138412632","html_url":"https://github.com/rg3/youtube-dl/issues/6796#issuecomment-138412632","issue_url":"https://api.github.com/repos/rg3/youtube-dl/issues/6796","id":138412632,"user":{"login":"dstftw","id":1908898,"avatar_url":"https://avatars.githubusercontent.com/u/1908898?v=3","gravatar_id":"","url":"https://api.github.com/users/dstftw","html_url":"https://github.com/dstftw","followers_url":"https://api.github.com/users/dstftw/followers","following_url":"https://api.github.com/users/dstftw/following{/other_user}","gists_url":"https://api.github.com/users/dstftw/gists{/gist_id}","starred_url":"https://api.github.com/users/dstftw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dstftw/subscriptions","organizations_url":"https://api.github.com/users/dstftw/orgs","repos_url":"https://api.github.com/users/dstftw/repos","events_url":"https://api.github.com/users/dstftw/events{/privacy}","received_events_url":"https://api.github.com/users/dstftw/received_events","type":"User","site_admin":false},"created_at":"2015-09-08T02:33:34Z","updated_at":"2015-09-08T02:33:34Z","body":"Bitrate is taken from DASH manifest that is wrong most of the time."}}