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

How to download best quality from each format #747

Closed
ghost opened this issue Mar 18, 2013 · 3 comments
Closed

How to download best quality from each format #747

ghost opened this issue Mar 18, 2013 · 3 comments

Comments

@ghost
Copy link

@ghost ghost commented Mar 18, 2013

Great app, many thanks!
I'm trying to download the best quality of each format or the best quality of a specific format.
Is there a recommended way?
When I try to use the '--all-formats' option I get all the formats available but I'm not sure that I remain with the best quality as the many quality levels are not being downloaded as the file is "already exists".

Will be glad to get some insight about that.

Thanks again,
Z.

@Plaque-fcc
Copy link

@Plaque-fcc Plaque-fcc commented Mar 18, 2013

According to man page:


Note that not all videos are available in all formats and that other
sites supported by youtube-dl may have different conventions for their
video formats.

By default, youtube-dl will download the best available format; if you
want to download the worst format to save bandwidth and time, use "-f"
worst.


Well, if the point is to obtain the most weightful (less lossy) clip,
then there's no sense in directing youtube-dl do anything special. When
the point is to get some specific, like getting all the best of all
formats and containers, there could youtube-dl decide itself (with a
new command line key, of course), since there's no other way of knowing
formats (IDs passed) apart trying to download the video.

Since that, may be it possible to prefer/ban formats and/or
prefer/ban resolutions (so-called «quality») in the way here asked?

@ghost
Copy link
Author

@ghost ghost commented Mar 19, 2013

Thanks for the answer. I think you got it right, it is not just letting youtube-dl to download the best available format but more like letting it download the best available quality of a specific format or of all available formats.
The option to prefer/ban formats and/or prefer/ban resolution could answer that only if it would be possible to state "best/highest" as one of the alternatives of "resolution" (as the available resolution are not always known in advance.

@phihag
Copy link
Contributor

@phihag phihag commented Apr 18, 2013

You can simply add %(format)s to your file format string, like this:

youtube-dl -o '%(title)s-%(id)s-%(format)s.%(ext)s' BaW_jenozKc --all-formats

Note that although multiple files have the same extensions, they're usually not in the same format or even the same container. Why do you want to have multiple versions in the first place? If your answer is compatibility with as many devices as possible, you should download all videos, since the high-quality versions typically use a larger decoder feature set anyways, even if container and codec have the same name.

@dstftw dstftw closed this May 8, 2017
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
3 participants
You can’t perform that action at this time.