Provide a way to choose the best resolution #11686

Open
utack opened this Issue Jan 11, 2017 · 7 comments

Projects

None yet

4 participants

@utack
utack commented Jan 11, 2017 edited

Hi,
currently there seems to be no way of choosing the best resolution video.
Example: I'd like vp9 where possible from Youtube, but would take a 480p H264 stream over the 360p VP9 stream.
Is there a method to achieve this?
If not, it would be great if you could provide something to pick the best resolution video.

Thank you

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2017.01.10. 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 2017.01.10

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
@jdmoore0883

try running:
youtube-dl -f bestvideo "<YOUTUBE_URL>"

@utack
utack commented Jan 11, 2017

That works, but unfortunately it ignores the codec preference. For cases where 1080p H264 and VP9 are available it chooses H264

@shizeeg
Contributor
shizeeg commented Jan 11, 2017

try to add --prefer-free-formats to your youtube-dl command line parameters

@utack
utack commented Jan 11, 2017

Unfortunately the prefer free formats option applied to youtube-dl in mpv still chooses the 360p version

@linglung

You want to select best available format? why didn't use youtube-dl -F to check it first before downloading? then pick -f number

@utack
utack commented Jan 12, 2017

You want to select best available format? why didn't use youtube-dl -F to check it first before downloading? then pick -f number

Thanks for letting me know, but I read the docs and realized that works
Unfortunately it does not solve the problem the format stream should be able to automatically sort out the one that is best by certain criteria, like for example has the highest resolution. I watch 30+ youtube videos a day starting mpv and youtube-dl from a browser plugin, sorting them out manually is not an option

@shizeeg
Contributor
shizeeg commented Jan 12, 2017 edited

Unfortunately the prefer free formats option applied to youtube-dl in mpv still chooses the 360p version

@utack you can pass youtube-dl parameters using mpv's --ytdl-raw-options or --ytdl-format like that:
$ mpv --ytdl-format=bestvideo --ytdl-raw-options='--prefer-free-formats='
take a note of final =

you may also like to put all that in ~/.config/mpv/mpv.conf w/o leading --:
# ~/.config/mpv/mpv.conf
ytdl-format=bestvideo
ytdl-raw-options='--prefer-free-formats='
# end of mpv.conf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment