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

Request: support spaces in a format string #9940

Closed
keybounce opened this issue Jun 29, 2016 · 6 comments
Closed

Request: support spaces in a format string #9940

keybounce opened this issue Jun 29, 2016 · 6 comments
Labels

Comments

@keybounce
Copy link

@keybounce keybounce commented Jun 29, 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.06.27. If it's not read this FAQ entry and update. Issues with outdated version will be rejected.

  • [ x] I've verified and I assure that I'm running youtube-dl 2016.06.27

Before submitting an issue make sure you have:

  • [x ] At least skimmed through README and most notably FAQ and BUGS sections
  • [x ] 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)
  • [ x] Feature request (request for a new functionality)
  • Question
  • Other

I'd like to see support for spaces in a format string.

Reason: Here is my config file, before I pack it:

--no-mtime
-o %(title)s.%(ext)s
-f "
best     [exp=mp4][height=480]
bestvideo[ext=mp4][height=480]+bestaudio[ext=m4a]
best     [exp=mp4][height>360][height<=480]
bestvideo[ext=mp4][height>360][height<=480]+bestaudio
best     [height>360][height<=480]
bestvideo[height>360][height<=480]+bestaudio
best     [exp=mp4][height=>280][height<=360]
best     [height<=480]
worst"
--write-sub
--embed-subs
--recode-video mp4

That's understandable, right? Well, guess what that format string will look like with the spaces removed and slashes instead of newlines :-)

@yan12125 yan12125 added the request label Jun 29, 2016
@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Jun 29, 2016

I guess keeping slashes is easier to implement.

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Jun 29, 2016

I have opened #9945 for handling multiline quoted strings.
You haven't added / between the lines, is that intentional or do you want it to be added implicitly by youtube-dl?

Also, there's a typo on a pair of lines: you wrote exp instead of ext.

@keybounce
Copy link
Author

@keybounce keybounce commented Jun 29, 2016

Whoops, thank you for catching that typo, I will fix my config file :-).

I was expecting the "/" to be implicit for a newline; does that seem reasonable, or not?

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Jun 29, 2016

I was expecting the "/" to be implicit for a newline; does that seem reasonable, or not?

I would prefer it to be explicit, since one could also expect , as the default for newlines.

dstftw added a commit that referenced this issue Jun 30, 2016
Like:

    -f "
    bestvideo+bestaudio/
    best
    "
@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Jun 30, 2016

Multiline quoted strings are recognized with 9e29ef1. I'm closing the issue since I think it's better to explicitly use /.

@jaimeMF jaimeMF closed this Jun 30, 2016
@keybounce
Copy link
Author

@keybounce keybounce commented Jul 1, 2016

Thank you.

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.