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

Add more metadata parsing options #9994

Open
4 of 8 tasks
Cephel opened this issue Jul 3, 2016 · 4 comments
Open
4 of 8 tasks

Add more metadata parsing options #9994

Cephel opened this issue Jul 3, 2016 · 4 comments
Labels

Comments

@Cephel
Copy link

Cephel commented Jul 3, 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.03. 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.07.03

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

Description of your issue, suggested solution and other information

Right now, the only way to include metadata is via parsing the title with --metadata-from-title. This requires a very deliberate and often not existent form of title formatting if you want more than just Artist and Title. Uploaders on often ommit everything past those two from the title for obvious brevity reasons.

My use case would be to allow/enable additional metadata fields to be set through data such as %(uploader)s, etc. which aren't part of the title. Often I want to download a bunch of files from a music aggregator and group them with an album tag with the uploader name, but this is currently impossible and needs to be done manually.

@dstftw
Copy link
Collaborator

dstftw commented Jul 3, 2016

Eventually, do you request them to be parsed from somewhere as title states or to be provided in some from via option? Clarify and provide concrete use case examples.

@Cephel
Copy link
Author

Cephel commented Jul 3, 2016

I don't know how extensive the changes to the whole system would be to cover all possible use cases, but for me personally, some small selection of transfer metadata fields would suffice:
--add-metadata-<key>=%(<value>)s
with being the name of the id3 tag field that you want to write to, ie. album and being any of the already existing descriptors such as described under output template.

Though this might become very verbose quickly if it isn't implemented in a more or less generic way. Perhaps one way to alleviate this problem would rather be some form of metadata field key->value assignment flag that can be repeated:
--add-metadata=<key1>:%(<value1>)s --add-metadata=<key2>:%(<value2>)s
and so on. and would then be the same as above.

Either of those system should ideally, though not required for my personal use case, allow mixing static with field generated content, such as, e.g. filling a comment tag ála --add-metadata=comment:This file was converted from: %(url)s..

A super super low cost solution would finally be postponing the --metadata-from-title processing until after the filename has been written by the -o output template. This would allow clever people to just write extra data as part of the filename and then process it with --metadata-from-title. The end result would mostly work, but it would create some pretty ugly file names.

@dstftw
Copy link
Collaborator

dstftw commented Jul 3, 2016

Both approaches look clumsy. What I can think of is providing a JSON similar to --load-info with additional metafields supporting output template. Note also that AFAIK ffmpeg does not support just arbitrary id3 tags to be written and it also names them differently.

@Cephel
Copy link
Author

Cephel commented Jul 3, 2016

I've got one more uploader who likes to put the genre of the song in the title, but not only is it embraced by unicode characters (【】), sometimes it's completely missing. Optional matching capability would be preferred for this reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants