Inconsistent quality behavior?
See original GitHub issueMake sure you are using the latest version: run youtube-dl --version
and ensure your version is 2016.07.11. If it’s not read this FAQ entry and update. Issues with outdated version will be rejected.
- I’ve verified and I assure that I’m running youtube-dl 2016.07.11
Before submitting an issue make sure you have:
- At least skimmed through README and most notably FAQ and BUGS sections
- Searched the bugtracker for similar issues including closed ones
What is the purpose of your issue?
- Bug report (encountered problems with youtube-dl)
- Site support request (request for adding support for a new site)
- Feature request (request for a new functionality)
- Question
- Other
Hello, I have a little question about what seems to be inconsistent behavior regarding format/quality selection. Or perhaps my expectations about said options are inaccurate? I hope someone can help clarify if that is the case.
I’ll explain/show my actions and results below.
Video used as example: https://www.youtube.com/watch?v=f25R9Gl6FWc
Download without any parameters(for reference): http://imgur.com/GS4fSku
Media info: http://imgur.com/kT0uW9R
Now for the interesting part, download with parameters taken from the “Format selection examples” section. (https://github.com/rg3/youtube-dl#format-selection-examples)
Download best mp4 format available or any other best if no mp4 available
$ youtube-dl -f ‘bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best’
Media info: http://imgur.com/LnjUqHl
Now for the final result using -f best http://imgur.com/LVQP4QI
Media info: http://imgur.com/BDuaDNx
Note the significantly larger file size and higher bit rates for both audio and video.
Why does “# Download best mp4 format available or any other best if no mp4 available” not actually return the best quality mp4 available but -f best does? Am I misunderstanding things? Am I doing something wrong? Are my expectations off?
Please explain if you can, thanks in advance.
Issue Analytics
- State:
- Created 7 years ago
- Comments:7
It’s a limitation of youtube-dl: sometimes the actual quality is unknown until the file is downloaded. In this example,
bestvideo
is:And
best
is:As both formats have the same dimension, the only factor is their bitrates. Unfortunately, YouTube does not provide the bitrate information for format 22 of this video. In most cases,
bestvideo
is better thanbest
, so we make it the default. This video is a good counterexample, but we can do nothing without sufficient information. If you know how to determine video qualities without actual downloading, please propose it. There are already lots of related feature requests. For example, a not-so-good idea was proposed at #6055. (It downloads some portion of the video, which slows down the extraction step.)Not always true. Comparing bitrates among different codecs is meaningless. See https://github.com/rg3/youtube-dl/issues/6018#issuecomment-114008839 and https://en.wikipedia.org/wiki/Video_quality. You need some mathematical metrics, such as SSIM, PSNR, etc.