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

Erroneous choise for bestvideo [youtube] #17251

Closed
rend3r opened this issue Aug 16, 2018 · 3 comments
Closed

Erroneous choise for bestvideo [youtube] #17251

rend3r opened this issue Aug 16, 2018 · 3 comments
Labels

Comments

@rend3r
Copy link

@rend3r rend3r commented Aug 16, 2018

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v']
[debug] Encodings: locale cp1251, fs mbcs, out cp866, pref cp1251
[debug] youtube-dl version 2018.08.04
[debug] Python version 3.4.4 (CPython) - Windows-7-6.1.7601-SP1
[debug] exe versions: ffmpeg N-90346-g86c7d8df95
[debug] Proxy map: {}
Usage: youtube-dl.exe [OPTIONS] URL [URL...]
youtube-dl -F 5Y12meOdJ4M
[youtube] 5Y12meOdJ4M: Downloading webpage
[youtube] 5Y12meOdJ4M: Downloading video info webpage
[youtube] 5Y12meOdJ4M: Downloading MPD manifest
[youtube] 5Y12meOdJ4M: Downloading MPD manifest
[info] Available formats for 5Y12meOdJ4M:
format code  extension  resolution note
139          m4a        audio only DASH audio   54k , m4a_dash container, mp4a.40.5@ 48k (22050Hz), 28.38MiB
140          m4a        audio only DASH audio  134k , m4a_dash container, mp4a.40.2@128k (44100Hz), 75.32MiB
160          mp4        256x138    DASH video  108k , mp4_dash container, avc1.4d400b, 24fps, video only
133          mp4        426x228    DASH video  242k , mp4_dash container, avc1.4d400c, 24fps, video only
134          mp4        640x344    DASH video  285k , mp4_dash container, avc1.4d401e, 24fps, video only, 34.61MiB
135          mp4        854x458    DASH video 1155k , mp4_dash container, avc1.4d4014, 24fps, video only
**137**          mp4        1920x1032  DASH video **2221k** , mp4_dash container, avc1.640028, 24fps, video only, 207.67MiB
**136**          mp4        1280x688   DASH video **2310k** , mp4_dash container, avc1.4d4016, 24fps, video only
17           3gp        176x144    small , mp4v.20.3, mp4a.40.2@ 24k, 28.03MiB
36           3gp        320x172    small , mp4v.20.3, mp4a.40.2, 66.00MiB
43           webm       640x360    medium , vp8.0, vorbis@128k, 90.99MiB
18           mp4        640x344    medium , avc1.42001E, mp4a.40.2@ 96k, 164.13MiB
22           mp4        1280x688   hd720 , avc1.64001F, mp4a.40.2@192k (best)

Resulting videos:

137
Duration : 1h 21mn
Bit rate : 355 Kbps
File size : 208 MiB
136
Duration : 1h 21mn
Bit rate : 270 Kbps
File size : 159 MiB

But yt-dl chooses 136 format insteed 137.
youtube-dl -f bestvideo+bestaudio/best 5Y12meOdJ4M
or
youtube-dl --no-mtime -f "bestvideo[vcodec^=avc]+bestaudio[acodec^=mp4a]" 5Y12meOdJ4M

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Aug 16, 2018

This is expected behavior. Bitrate takes priority over resolution.

@dstftw dstftw closed this Aug 16, 2018
@dstftw dstftw added the duplicate label Aug 16, 2018
@rend3r
Copy link
Author

@rend3r rend3r commented Aug 16, 2018

Ok, but how does yt-dl define bitrate? First dash chunk, from dash manifest? Anyway, it's naive to rely on bitrate, especially when it is wrong calculated.

@rend3r
Copy link
Author

@rend3r rend3r commented Aug 17, 2018

Why did you close the issue? In current state yt-dl wrongly determine bitrate.
1920x1032 video bitrate is 355 Kbps, for 1280x688 - 270 Kbps only.
Could you add option, something --prefer-resolution-over-bitrate? Or extend bestvideo format option, for example: bestvideo[prio=res,vcodec,fps,br], so yt-dl will choose video with max available resolution->with selected vcodec (if available)->with max available fps->with max available bitrate.
More cases for filtering video: bestvideo[prio=br,fps,height], bestvideo[prio=fps,br] and so on.

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
2 participants
You can’t perform that action at this time.