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

Feature request: ability to specify fallback formats via -f #11180

Closed
betathetatau opened this issue Nov 13, 2016 · 1 comment
Closed

Feature request: ability to specify fallback formats via -f #11180

betathetatau opened this issue Nov 13, 2016 · 1 comment
Labels

Comments

@betathetatau
Copy link

@betathetatau betathetatau commented Nov 13, 2016

Please follow the guide below

  • You will be asked some questions and requested to provide some information, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your issue (like that [x])
  • Use Preview tab to see how your issue will actually look like

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

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

The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue


Description of your issue, suggested solution and other information

Feature request: the ability to specify one or more format code fallbacks with the -f parameter, separated by semicolon delimiters (;). Should work with any site. Two examples:

youtube-dl -f http-720p;http-360p https://vimeo.com/44583147
-- would download http-720p if available;
ELSE, would download http-360p if available;
ELSE, returns standard "ERROR: requested format not available" message and stops.

youtube-dl -f 22;135+140;135,171;18 https://www.youtube.com/watch?v=zDZFcDGpL4U
-- would download 22 if available;
ELSE, would download 135 and 140 (and merge them) if both 135 and 140 are available;
ELSE, would download 135 and 171 (and NOT merge them) if both 135 and 171 are available;
ELSE, would download 18 if available;
ELSE, returns standard "ERROR: requested format not available" message and stops.

Basically, this feature simply implies placing the portion of youtube-dl's code which tests the validity of the -f specification into a while() loop that repeats the test for each substring between semicolons. The while loop ends only upon finding the first match, or upon running out of possibilities.

The reason I need this feature (and believe others would benefit from it too) is that it would make batch downloading easier for those who would normally just do "-f best", but who have slow broadband and/or storage space limitations and/or preferences for certain container formats and/or preferences for specific download protocols (i.e. http vs. hls). My feature request is therefore just a way of restricting the action of "-f best" so that it operates within a user-specified list of qualities/formats/protocols -- and according to the user's own personal definition of best;to;worst.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Nov 13, 2016

Did you even read FAQ? It's already supported with /.

@dstftw dstftw closed this Nov 13, 2016
@dstftw dstftw added the invalid label Nov 13, 2016
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.