Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Specify multiple format options, use the first available for each video. #798
Comments
|
Actually you can do what you want using, instead of commas, slashes, like: |
|
If you have any question (or if this is not what you wanted to do), feel free to ask. |
|
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). |
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.