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: Comments in the config file #10024

Closed
keybounce opened this issue Jul 7, 2016 · 1 comment
Closed

Feature request: Comments in the config file #10024

keybounce opened this issue Jul 7, 2016 · 1 comment
Labels

Comments

@keybounce
Copy link

@keybounce keybounce commented Jul 7, 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.07.07. 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.07.07

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 be able to put comments in the config file.

Specifically, my config file has gotten large ...

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

That format string is getting messy. I have, for example, discovered that YouTube will occasionally have 478p recordings (that is NOT a typo; it was 1024x576 originally, and uploaded, the best quality was 478p. udcpS7XQGJM . There is a 358 mp4, and a 360p webm marked "best".) Also, a dash format will be lower bitrate than the single-file version at the same scan line count -- so preferring a slightly lower scanline for single-file.

I'd like to document all this in my config file so I'll remember it next year.

(Those first two lines for getting 720's is a temporary thing, for a few specific videos. I normally go for 480's.)

@yan12125 yan12125 added the request label Jul 7, 2016
@phihag phihag closed this in 571808a Jul 7, 2016
@phihag
Copy link
Contributor

@phihag phihag commented Jul 7, 2016

Start lines with # to make them comments. For instance,

# Here goes my long -f
-f "
best[ext=mp4][height=720]/
worst
"

Note that you cannot comment within a line, or within the quotes after -f.

You may also want to simplify your configuration. For example, the first four lines can be replaced by best[ext=mp4][height<=720][height>440].

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.