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

If you choose the best resolution instead of the best file size #26735

Closed
woainiyilin opened this issue Sep 28, 2020 · 3 comments
Closed

If you choose the best resolution instead of the best file size #26735

woainiyilin opened this issue Sep 28, 2020 · 3 comments

Comments

@woainiyilin
Copy link

@woainiyilin woainiyilin commented Sep 28, 2020

If you choose the best resolution instead of the best file size

@pukkandan
Copy link

@pukkandan pukkandan commented Oct 17, 2020

There is sadly no easy way to do this.

  1. You can either make a list of all format codes like this guy
    or
  2. You could use a large format selection with seperate check for each resolution. Something like:
    (bestvideo[height>2160]/bestvideo[height>1080]/.../bestvideo[height>144]/bestvideo)+bestaudio...
    or
  3. If you are willing to use #25959 , just use --format-sort height
@rautamiekka
Copy link

@rautamiekka rautamiekka commented Oct 17, 2020

Plus even if you could do that, you shouldn't simply try to correlate resolution to quality, nor simply filesize to quality cuz the file could have a massive resolution but still be all shit (OBS Studio's default settings make for very shit-quality vids, I learnt that in my 'Arma 3' gaming), and even a massive filesize could mean the quality is all shit, I've seen both happen at least twice.

A better way would be to correlate resolution, filesize, and the format to quality, it's more likely to work, but still not a guarantee.

@dstftw dstftw closed this Oct 17, 2020
@dstftw dstftw added the duplicate label Oct 17, 2020
@pukkandan
Copy link

@pukkandan pukkandan commented Oct 18, 2020

@rautamiekka You are correct in that there is no fool proof way to find the best quality automatically. This is why youtube-dl already provides a way for the extractors to override the default quality sorting. However, imo, this is not enough. There are many situations (like OP's question) where it is beneficial for the user to be able to specify the sorting method. My pull request is one way of doing that. I am sure there are superior ways for achieving the same, but until someone implements such a way, --format-sort is the easiest way to solve OP's issue.

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.

4 participants
You can’t perform that action at this time.