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

%(title)s for output filename is wrong #11108

Closed
Spenhouet opened this issue Nov 3, 2016 · 5 comments
Closed

%(title)s for output filename is wrong #11108

Spenhouet opened this issue Nov 3, 2016 · 5 comments
Labels

Comments

@Spenhouet
Copy link

@Spenhouet Spenhouet commented Nov 3, 2016

youtube-dl -x --audio-format "mp3" --audio-quality 0 --metadata-from-title "%(artist)s - %(title)s" -o "/Music/%(uploader)s/%(title)s.%(ext)s" https://www.youtube.com/watch?v=0sjR0-EG3BM

The title and artist is parsed correctly:

[fromtitle] parsed title: Changes
[fromtitle] parsed artist: DOPEDROP

But for %(title)s.%(ext)s the output filename is DOPEDROP - Changes.mp3.
I did expect: Changes.mp3
When using %(track)s or %(artist)s the output is NA.

Version: 2016.11.02
OS: Windows 10

@Hrxn
Copy link

@Hrxn Hrxn commented Nov 3, 2016

Yes and no..

Afaik, the %(title)s you use in your output template (-o) is the full title of the video, i.e. that was YouTube is displaying directly below the video frame. And that is in this case: DOPEDROP - Changes
Works as expected..

Edit:

Okay.. If %(track)s doesn't work..
Legitimate issue I think.

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Nov 16, 2016

--metadata-from-title only affects --add-metadata. Variables like %(title)s are unchanged.

What you want may be an option like --variables-from-title

@yan12125 yan12125 added the request label Nov 16, 2016
@Spenhouet
Copy link
Author

@Spenhouet Spenhouet commented Nov 16, 2016

@yan12125 Shouldn't it still affect variables like %(track)s or %(artist)s ?

If not, than it's not a bug but --variables-from-title would be great feature.

@jblachly
Copy link

@jblachly jblachly commented Jan 17, 2017

If not, than it's not a bug but --variables-from-title would be great feature.

Yes, 100% this!

I was coming to file a bug report about my output template generating a bunch of NA - SNAENA - NA.<ext> files despite that youtube-dl was correctly interpreting the metadata from the title according to the template string I laid out.

Lack of this feature makes youtube-dl use incredibly painful.

One pain point in terms of adding a feature like --variables-from-title is that at least in the output I see, the metadata parsing happens after all the files are downloaded, so it would have to rename all the files (and also inteliigently avoid the NA thing.

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Jan 17, 2017

Superseded by #11747. Please move to there for further discussions.

@yan12125 yan12125 closed this Jan 17, 2017
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
4 participants
You can’t perform that action at this time.