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

output template from metadata #18940

Closed
randomhuman1 opened this issue Jan 21, 2019 · 8 comments
Closed

output template from metadata #18940

randomhuman1 opened this issue Jan 21, 2019 · 8 comments
Labels

Comments

@randomhuman1
Copy link

@randomhuman1 randomhuman1 commented Jan 21, 2019

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 this: [x])
  • Use the Preview tab to see what your issue will actually look like

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

Before submitting an issue make sure you have:

  • [ x] At least skimmed through the README, most notably the FAQ and BUGS sections
  • [ x] Searched the bugtracker for similar issues including closed ones
  • [ x] Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser

What is the purpose of your issue?

  • [x ] 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


If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:

Add the -v flag to your command line you run youtube-dl with (youtube-dl -v <your command line>), copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):

youtube-dl https://www.youtube.com/watch?v=NPCVmZmV_tw -v
[debug] System config: []
[debug] User config: [u'--add-metadata', u'--metadata-from-title', u'%(artist)s - %(title)s', u'-x', u'--audio-format', u'mp3', u'--audio-quality', u'192K', u'-o', u'~/Music/DL/%(artist)s/%(playlist_index)s_%(title)s [%(abr)s].%(ext)s']
[debug] Custom config: []
[debug] Command-line args: [u'https://www.youtube.com/watch?v=NPCVmZmV_tw', u'-v']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2019.01.17
[debug] Python version 2.7.13 (CPython) - Linux-4.9.0-8-amd64-x86_64-with-BunsenLabs-9.6-helium
[debug] exe versions: ffmpeg 3.2.12-1, ffprobe 3.2.12-1
[debug] Proxy map: {}
[youtube] NPCVmZmV_tw: Downloading webpage
[youtube] NPCVmZmV_tw: Downloading video info webpage
[youtube] NPCVmZmV_tw: Downloading MPD manifest
[debug] Invoking downloader on u'https://r2---sn-4g5e6ns7.googlevideo.com/videoplayback/id/34f095999995fedc/itag/140/source/youtube/requiressl/yes/ms/au,onr/mv/m/mn/sn-4g5e6ns7,sn-h0jeeney/pl/35/mm/31,26/ei/cghGXIPbNc3ggAe29rbICA/initcwndbps/1507500/ratebypass/yes/mime/audio%2Fmp4/otfp/1/gir/yes/clen/2456347/lmt/1490617885970498/dur/154.505/mt/1548093477/fvip/2/disable_polymer/true/ip/2a02:810a:1440:8926:d9f2:5f6d:8865:4032/ipbits/0/expire/1548115155/sparams/ip,ipbits,expire,id,itag,source,requiressl,ms,mv,mn,pl,mm,ei,initcwndbps,ratebypass,mime,otfp,gir,clen,lmt,dur/signature/14B21C04A48E5C4738BBF0A7689E182F91F540B1.936B0616AA26BFC8A98C11604CE6E3FCEA61B9C6/key/dg_yt0/'
[dashsegments] Total fragments: 32
[download] Destination: /home/manu/Music/DL/NA/NA_Flaty - B7_ Elusive Garden feat. Dada Ques [128].m4a
[download] 100% of 2.34MiB in 00:10
[ffmpeg] Correcting container in "/home/manu/Music/DL/NA/NA_Flaty - B7_ Elusive Garden feat. Dada Ques [128].m4a"
[debug] ffmpeg command line: ffmpeg -y -i 'file:/home/manu/Music/DL/NA/NA_Flaty - B7_ Elusive Garden feat. Dada Ques [128].m4a' -c copy -f mp4 'file:/home/manu/Music/DL/NA/NA_Flaty - B7_ Elusive Garden feat. Dada Ques [128].temp.m4a'
[fromtitle] parsed artist: Flaty
[fromtitle] parsed title: B7/ Elusive Garden feat. Dada Ques
[debug] ffmpeg command line: ffprobe -show_streams 'file:/home/manu/Music/DL/NA/NA_Flaty - B7_ Elusive Garden feat. Dada Ques [128].m4a'
[ffmpeg] Destination: /home/manu/Music/DL/NA/NA_Flaty - B7_ Elusive Garden feat. Dada Ques [128].mp3
[debug] ffmpeg command line: ffmpeg -y -i 'file:/home/manu/Music/DL/NA/NA_Flaty - B7_ Elusive Garden feat. Dada Ques [128].m4a' -vn -acodec libmp3lame '-b:a' 192k 'file:/home/manu/Music/DL/NA/NA_Flaty - B7_ Elusive Garden feat. Dada Ques [128].mp3'
Deleting original file /home/manu/Music/DL/NA/NA_Flaty - B7_ Elusive Garden feat. Dada Ques [128].m4a (pass -k to keep)
[ffmpeg] Adding metadata to '/home/manu/Music/DL/NA/NA_Flaty - B7_ Elusive Garden feat. Dada Ques [128].mp3'
[debug] ffmpeg command line: ffmpeg -y -i 'file:/home/manu/Music/DL/NA/NA_Flaty - B7_ Elusive Garden feat. Dada Ques [128].mp3' -c copy -metadata 'comment=Flaty - New Suggestions (LP)
Produced By Flaty / NII001, Наука и Искусство, 2016

Discogs Page:
https://www.discogs.com/Flaty-New-Suggestions/release/9074582' -metadata 'description=Flaty - New Suggestions (LP)
Produced By Flaty / NII001, Наука и Искусство, 2016

Discogs Page:
https://www.discogs.com/Flaty-New-Suggestions/release/9074582' -metadata 'artist=Flaty' -metadata 'title=B7/ Elusive Garden feat. Dada Ques' -metadata 'date=20170327' -metadata 'purl=https://www.youtube.com/watch?v=NPCVmZmV_tw' 'file:/home/manu/Music/DL/NA/NA_Flaty - B7_ Elusive Garden feat. Dada Ques [128].temp.mp3'

---


### Description of your *issue*, suggested solution and other information

my output template sometimes correctly uses the metadata from title, but mostly it does not.
in the example, it should put the song in ~/Music/DL/Flaty, but it puts it in /NA instead.
it works for some reason with some tracks of the same album, eg https://www.youtube.com/watch?v=hyl9MzXa_LM
@randomhuman1
Copy link
Author

@randomhuman1 randomhuman1 commented Jan 21, 2019

also i dont know why the output of the terminal is linking to the discogs page, could not find something in the readme.. is it possible to add metadata retrieved from discogs?

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jan 21, 2019

This is expected behavior. --metadata-from-title is a post processor option and won't add any parsed metadata to info dict used by output template.
As for metadata from discogs - no such feature exists.

@dstftw dstftw closed this Jan 21, 2019
@dstftw dstftw added the invalid label Jan 21, 2019
@randomhuman1
Copy link
Author

@randomhuman1 randomhuman1 commented Jan 21, 2019

but it is working in other instances, why? in this example it puts it in /Music/DL/Flaty
`youtube-dl -v https://www.youtube.com/watch?v=hyl9MzXa_LM
[debug] System config: []
[debug] User config: [u'--add-metadata', u'--metadata-from-title', u'%(artist)s - %(title)s', u'-x', u'--audio-format', u'mp3', u'--audio-quality', u'192K', u'-o', u'~/Music/DL/%(artist)s/%(playlist_index)s_%(title)s [%(abr)s].%(ext)s']
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'https://www.youtube.com/watch?v=hyl9MzXa_LM']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2019.01.17
[debug] Python version 2.7.13 (CPython) - Linux-4.9.0-8-amd64-x86_64-with-BunsenLabs-9.6-helium
[debug] exe versions: ffmpeg 3.2.12-1, ffprobe 3.2.12-1
[debug] Proxy map: {}
[youtube] hyl9MzXa_LM: Downloading webpage
[youtube] hyl9MzXa_LM: Downloading video info webpage
[youtube] {22} signature length 42.44, html5 player vfl-jbnrr
[youtube] {43} signature length 42.44, html5 player vfl-jbnrr
[youtube] {18} signature length 42.44, html5 player vfl-jbnrr
[youtube] {36} signature length 42.44, html5 player vfl-jbnrr
[youtube] {17} signature length 42.44, html5 player vfl-jbnrr
[youtube] {136} signature length 42.44, html5 player vfl-jbnrr
[youtube] {134} signature length 42.44, html5 player vfl-jbnrr
[youtube] {140} signature length 42.44, html5 player vfl-jbnrr
[youtube] hyl9MzXa_LM: Downloading MPD manifest
[debug] Invoking downloader on u'https://r5---sn-4g5e6nes.googlevideo.com/videoplayback/id/87297d3335dafcb3/itag/140/source/youtube/requiressl/yes/ei/Ww1GXNKqGpeNgQeBzpzIDg/pl/35/initcwndbps/1517500/mv/m/mn/sn-4g5e6nes,sn-4g5edney/mm/31,29/ms/au,rdu/ratebypass/yes/mime/audio%2Fmp4/otfp/1/gir/yes/clen/2316930/lmt/1520470259637226/dur/145.728/mt/1548094725/fvip/5/disable_polymer/true/ip/2a02:810a:1440:8926:d9f2:5f6d:8865:4032/ipbits/0/expire/1548116411/sparams/ip,ipbits,expire,id,itag,source,requiressl,ei,pl,initcwndbps,mv,mn,mm,ms,ratebypass,mime,otfp,gir,clen,lmt,dur/signature/69F27D7070B7DF55AE52DA294EE591AA4064BAA4.1575DADB72782002DD5BC169FBDFFEEDDD197BA3/key/dg_yt0/'
[dashsegments] Total fragments: 31
[download] Destination: /home/manu/Music/DL/Flaty/NA_Flaty - A1_ Rest Intensive feat. Piper Spray [128].m4a
[download] 100% of 2.21MiB in 00:06
[ffmpeg] Correcting container in "/home/manu/Music/DL/Flaty/NA_Flaty - A1_ Rest Intensive feat. Piper Spray [128].m4a"
[debug] ffmpeg command line: ffmpeg -y -i 'file:/home/manu/Music/DL/Flaty/NA_Flaty - A1_ Rest Intensive feat. Piper Spray [128].m4a' -c copy -f mp4 'file:/home/manu/Music/DL/Flaty/NA_Flaty - A1_ Rest Intensive feat. Piper Spray [128].temp.m4a'
[fromtitle] parsed artist: Flaty
[fromtitle] parsed title: A1/ Rest Intensive feat. Piper Spray
[debug] ffmpeg command line: ffprobe -show_streams 'file:/home/manu/Music/DL/Flaty/NA_Flaty - A1_ Rest Intensive feat. Piper Spray [128].m4a'
[ffmpeg] Destination: /home/manu/Music/DL/Flaty/NA_Flaty - A1_ Rest Intensive feat. Piper Spray [128].mp3
[debug] ffmpeg command line: ffmpeg -y -i 'file:/home/manu/Music/DL/Flaty/NA_Flaty - A1_ Rest Intensive feat. Piper Spray [128].m4a' -vn -acodec libmp3lame '-b:a' 192k 'file:/home/manu/Music/DL/Flaty/NA_Flaty - A1_ Rest Intensive feat. Piper Spray [128].mp3'
Deleting original file /home/manu/Music/DL/Flaty/NA_Flaty - A1_ Rest Intensive feat. Piper Spray [128].m4a (pass -k to keep)
[ffmpeg] Adding metadata to '/home/manu/Music/DL/Flaty/NA_Flaty - A1_ Rest Intensive feat. Piper Spray [128].mp3'
[debug] ffmpeg command line: ffmpeg -y -i 'file:/home/manu/Music/DL/Flaty/NA_Flaty - A1_ Rest Intensive feat. Piper Spray [128].mp3' -c copy -metadata 'comment=Flaty - New Suggestions (LP)
Produced By Flaty / NII001, Наука и Искусство, 2016

Discogs Page:
https://www.discogs.com/Flaty-New-Suggestions/release/9074582' -metadata 'description=Flaty - New Suggestions (LP)
Produced By Flaty / NII001, Наука и Искусство, 2016

Discogs Page:
https://www.discogs.com/Flaty-New-Suggestions/release/9074582' -metadata 'artist=Flaty' -metadata 'title=Rest Intensive' -metadata 'date=20170327' -metadata 'purl=https://www.youtube.com/watch?v=hyl9MzXa_LM' 'file:/home/manu/Music/DL/Flaty/NA_Flaty - A1_ Rest Intensive feat. Piper Spray [128].temp.mp3'
`

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jan 21, 2019

Cause it's extracted by extractor from the webpage itself.

@randomhuman1
Copy link
Author

@randomhuman1 randomhuman1 commented Jan 21, 2019

but the content of the description on youtube is identical in both cases, why would it work in one case and not in the other?

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jan 21, 2019

This has nothing to do with description. Again: the latter has separate artist metadata that the former does not.
image

@randomhuman1
Copy link
Author

@randomhuman1 randomhuman1 commented Jan 21, 2019

ah okay, now i understand. thank you!

@Kerndog73
Copy link

@Kerndog73 Kerndog73 commented Nov 26, 2019

@dstftw

This is expected behavior. --metadata-from-title is a post processor option and won't add any parsed metadata to info dict used by output template.

I just spent the last half hour wondering why --metadata-from-title wasn't working and then I came here. Is there any chance of this feature being added in the future? I think it would be really useful.

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.