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

bestvideo by codec and bitrate #26633

Closed
suuuehgi opened this issue Sep 19, 2020 · 1 comment
Closed

bestvideo by codec and bitrate #26633

suuuehgi opened this issue Sep 19, 2020 · 1 comment

Comments

@suuuehgi
Copy link

@suuuehgi suuuehgi commented Sep 19, 2020

Checklist

  • I'm reporting a feature request
  • I've verified that I'm running youtube-dl version 2020.09.14
  • I've searched the bugtracker for similar feature requests including closed ones

Description

At the moment youtube-dl -f bestvideo results in the AVC / H.264 version being downloaded.

This is certainly the best possible video quality. But since YT (nearly always*) encodes with constant quality per resolution, we might as well take another format without loosing quaity.**

I would hence argue that bestvideo is the one with the smallest file size of the ones with the highest quality.

I would hence like to propose the following for bestvideo:

  1. Search for the highest resolution
  2. 2.1 Choose the first existing codec along this scheme: AV1 --> VP9 --> AVC
    2.2 If multiple qualities are available for the same codec, choose the one with the highest bitrate.*

This would also avoid verbose constructs like:

-f 'bestvideo[vcodec *= av01]+bestaudio/bestvideo[vcodec *= vp9]+bestaudio/bestvideo+bestaudio/best'

Thanks a lot!

MWE

youtube-dl -f bestvideo ibXKKllz4xQ

[...]
399          mp4        1920x1080  1080p 2450k , av01.0.08M.08, 30fps, video only, 187.14MiB
248          webm       1920x1080  1080p 2645k , vp9, 30fps, video only, 178.88MiB
137          mp4        1920x1080  1080p 3072k , avc1.640028, 30fps, video only, 140.01MiB
[...]

results in format 137.


* youtube-dl -F QPdWJeybMo8

[...]
402          mp4        7680x4320  4320p 22458k , av01.0.16M.08.0.110.01.06.06.0, 30fps, video only, 367.57MiB
571          mp4        7680x4320  4320p 36937k , av01.0.16M.08.0.110.01.06.06.0, 30fps, video only, 582.34MiB
[...]

** Since this is logically not bullet-proof, we might as well generally assume AV1 > VP9 > AVC.

@suuuehgi suuuehgi added the request label Sep 19, 2020
@dstftw dstftw closed this Sep 19, 2020
@dstftw dstftw added the duplicate label Sep 19, 2020
@suuuehgi
Copy link
Author

@suuuehgi suuuehgi commented Sep 19, 2020

Could you point me to the issue where this is a duplicate of? I now spent 5 min searching without a hit. Thank you!

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.