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

Specify multiple format options, use the first available for each video. #798

Closed
joaormatos opened this issue Apr 21, 2013 · 3 comments
Closed

Comments

@joaormatos
Copy link

@joaormatos joaormatos commented Apr 21, 2013

If the user specifies more than one -f option, accumulate a list of formats and, for each video being downloaded, use the first format specified in the command line that's available.

Example usage:
$ youtube-dl -f 22 -f 18 -f 17 URL
This will download the video(s) in either format 22, 18 or 17, choosing the first format from the list available for each video.

Note that the user can specify any order she desires, e.g.:
$ youtube-dl -f 18 -f 17 -f 22 URL
In which case, the order of preference will be 18, 17, 22.

Alternatively, the format preference list could be specified in a single argument, such as -f 22,17,18.

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Apr 22, 2013

Actually you can do what you want using, instead of commas, slashes, like: -f 22/17/18. It's not documented, so I will try to add it on the README or the documentation page.

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Apr 23, 2013

If you have any question (or if this is not what you wanted to do), feel free to ask.

@joaormatos
Copy link
Author

@joaormatos joaormatos commented Apr 23, 2013

That's exactly it, thank you.

This is a really useful feature that allows doing what --max-quality was probably intended to do (but doesn't work because youtube format IDs have a somewhat arbitrary order).

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.