Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

youtube-dl extracting incorrect video stream with -f bestvideo #23639

Closed
avatar-zero opened this issue Jan 5, 2020 · 2 comments
Closed

youtube-dl extracting incorrect video stream with -f bestvideo #23639

avatar-zero opened this issue Jan 5, 2020 · 2 comments

Comments

@avatar-zero
Copy link

@avatar-zero avatar-zero commented Jan 5, 2020

Checklist

  • I'm reporting a broken site support issue
  • I've verified that I'm running youtube-dl version 2020.01.01
  • I've checked that all provided URLs are alive and playable in a browser
  • I've checked that all URLs and arguments with special characters are properly quoted or escaped
  • I've searched the bugtracker for similar bug reports including closed ones
  • I've read bugs section in FAQ

Verbose log

youtube-dl -v -F https://www.youtube.com/watch?v=PElArDnvIxU
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', '-F', 'https://www.youtube.com/watch?v=PElArDnvIxU']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2020.01.01
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.17763
[debug] exe versions: ffmpeg git-2019-11-10-3a84081
[debug] Proxy map: {}
[youtube] PElArDnvIxU: Downloading webpage
[youtube] PElArDnvIxU: Downloading video info webpage
[youtube] {18} signature length 104, html5 player vflLL20EX
[youtube] {137} signature length 104, html5 player vflLL20EX
[youtube] {248} signature length 104, html5 player vflLL20EX
[youtube] {136} signature length 104, html5 player vflLL20EX
[youtube] {247} signature length 100, html5 player vflLL20EX
[youtube] {135} signature length 104, html5 player vflLL20EX
[youtube] {244} signature length 104, html5 player vflLL20EX
[youtube] {134} signature length 104, html5 player vflLL20EX
[youtube] {243} signature length 104, html5 player vflLL20EX
[youtube] {133} signature length 104, html5 player vflLL20EX
[youtube] {242} signature length 104, html5 player vflLL20EX
[youtube] {160} signature length 104, html5 player vflLL20EX
[youtube] {278} signature length 104, html5 player vflLL20EX
[youtube] {140} signature length 104, html5 player vflLL20EX
[youtube] {251} signature length 104, html5 player vflLL20EX
[youtube] PElArDnvIxU: Downloading MPD manifest
[info] Available formats for PElArDnvIxU:
format code  extension  resolution note
139          m4a        audio only DASH audio   52k , m4a_dash container, mp4a.40.5@ 48k (22050Hz)
140          m4a        audio only DASH audio  132k , m4a_dash container, mp4a.40.2@128k (44100Hz)
251          webm       audio only DASH audio  167k , webm_dash container, opus @160k (48000Hz)
278          webm       256x144    DASH video   95k , webm_dash container, vp9, 25fps, video only
160          mp4        256x144    DASH video  108k , mp4_dash container, avc1.4d400b, 25fps, video only
134          mp4        640x360    DASH video  160k , mp4_dash container, avc1.4d401e, 25fps, video only
242          webm       426x240    DASH video  220k , webm_dash container, vp9, 25fps, video only
133          mp4        426x240    DASH video  242k , mp4_dash container, avc1.4d400c, 25fps, video only
243          webm       640x360    DASH video  405k , webm_dash container, vp9, 25fps, video only
244          webm       854x480    DASH video  752k , webm_dash container, vp9, 25fps, video only
135          mp4        854x480    DASH video 1155k , mp4_dash container, avc1.4d4014, 25fps, video only
247          webm       1280x720   DASH video 1505k , webm_dash container, vp9, 25fps, video only
137          mp4        1920x1080  DASH video 1516k , mp4_dash container, avc1.640028, 25fps, video only
136          mp4        1280x720   DASH video 2310k , mp4_dash container, avc1.4d4016, 25fps, video only
248          webm       1920x1080  DASH video 2646k , webm_dash container, vp9, 25fps, video only
18           mp4        640x360    360p  340k , avc1.42001E, mp4a.40.2@ 96k (44100Hz), 114.78MiB (best)

Description

When selecting '-f bestvideo' as a format option, youtube-dl is extracting the wrong stream. When trying to grab the video in the example above, and specifying 'bestvideo[ext=mp4]', yt-dl has been grabbing stream ID 136, whereas the best video option in this case is actually stream ID 137.

I also just now noticed that the bitrates are being erroneously reported as ID 136 being higher than ID 137, which is definitely not true.

Video plays with correct streams (137+140) automatically selected in browser, according to 'Stats For Nerds'.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jan 5, 2020

136 has higher reported bitrate.

@megapro17
Copy link

@megapro17 megapro17 commented Apr 6, 2020

And what? Video with higher resolution have better quality. This is not invalid bug. This is clearly wrong logic in program. Comparing bitrates is must be last thing to do. Also, why YouTube-dl is not selecting 248? YouTube is encoding VP9 better than h264.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.