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

[Youtube] Metadata extracted from video title does not get written to extracted mp3 file #11020

Closed
cadomani opened this issue Oct 24, 2016 · 3 comments

Comments

@cadomani
Copy link

@cadomani cadomani commented Oct 24, 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.10.25. 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.10.25

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

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 -v flag to your command line you run youtube-dl with, 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.exe https://www.youtube.com/watch?v=MQnyoAyxi8M -x --embed-thumbnail -o %(title)s.%(ext)s -i --metadata-from-title "%(artist)s - %(title)s" --add-metadata --audio-format "mp3" --audio-quality 0 -v
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['https://www.youtube.com/watch?v=MQnyoAyxi8M', '-x', '--embed-thumbnail', '-o', '%(title)s.%(ext)s', '-i', '--metadata-from-title', '%(artist)s - %(title)s', '--add-metadata', '--audio-format', 'mp3', '--audio-quality', '0', '-v']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2016.10.25
[debug] Python version 3.4.4 - Windows-10-10.0.14393
[debug] exe versions: ffmpeg N-82080-g6969bed, ffprobe N-82080-g6969bed
[debug] Proxy map: {}
[youtube] MQnyoAyxi8M: Downloading webpage
[youtube] MQnyoAyxi8M: Downloading video info webpage
[youtube] MQnyoAyxi8M: Extracting video information
[youtube] MQnyoAyxi8M: Downloading MPD manifest
[youtube] MQnyoAyxi8M: Downloading thumbnail ...
[youtube] MQnyoAyxi8M: Writing thumbnail to: SRNO - Stay Sane (ft. Naaz).jpg
[debug] Invoking downloader on 'https://r1---sn-p5qlsnsr.googlevideo.com/videoplayback?id=3109f2a00cb18bc3&itag=251&source=youtube&requiressl=yes&pl=21&nh=IgpwcjA2LmxnYTA3KgkxMjcuMC4wLjE&ms=au&mv=m&mm=31&mn=sn-p5qlsnsr&initcwndbps=2887500&ratebypass=yes&mime=audio/webm&gir=yes&clen=3331531&lmt=1477323058844747&dur=194.001&upn=OyrV2DB99Sk&key=dg_yt0&signature=3AA78091F9D875574BAB0F9FF056721F7E641695.7E475D5D225E9606C26F8DA80DA895C913629954&mt=1477345239&ip=209.222.15.233&ipbits=0&expire=1477367062&sparams=ip,ipbits,expire,id,itag,source,requiressl,pl,nh,ms,mv,mm,mn,initcwndbps,ratebypass,mime,gir,clen,lmt,dur'
[download] Destination: SRNO - Stay Sane (ft. Naaz).webm
[download] 100% of 3.18MiB in 00:02
[fromtitle] parsed artist: SRNO
[fromtitle] parsed title: Stay Sane (ft. Naaz)
[ffmpeg] Adding metadata to 'SRNO - Stay Sane (ft. Naaz).webm'
[debug] ffmpeg command line: ffmpeg -y -i 'file:SRNO - Stay Sane (ft. Naaz).webm' -c copy -metadata 'description=Majestic Casual - Experience music in a new way.
● Spotify ▸ http://smarturl.it/majesticcspotify
● Facebook ▸ https://facebook.com/majesticcasual
● SoundCloud ▸ http://soundcloud.com/majesticcasual
● Instagram ▸ https://instagram.com/majesticcasual
● Twitter ▸ https://twitter.com/majesticcasual
● Snapchat ▸ '"'"'majesticcasual'"'"'

● Stream on Spotify ▸ http://smarturl.it/staysaneSPOTIFY
● Listen on SoundCloud ▸http://smarturl.it/staysaneSC
● Free Download ▸ http://smarturl.it/staysaneDL

Follow SRNO
● https://facebook.com/prodbysrno
● https://soundcloud.com/srno
● https://twitter.com/prodbysrno

Follow Naaz
● https://facebook.com/bitsofnaaz
● https://soundcloud.com/bitsofnaaz
● https://twitter.com/bitsofnaaz

Picture © WeliWaca Film Gallery
● https://www.facebook.com/weliwacagallery/' -metadata date=20161024 -metadata 'comment=Majestic Casual - Experience music in a new way.
● Spotify ▸ http://smarturl.it/majesticcspotify
● Facebook ▸ https://facebook.com/majesticcasual
● SoundCloud ▸ http://soundcloud.com/majesticcasual
● Instagram ▸ https://instagram.com/majesticcasual
● Twitter ▸ https://twitter.com/majesticcasual
● Snapchat ▸ '"'"'majesticcasual'"'"'

● Stream on Spotify ▸ http://smarturl.it/staysaneSPOTIFY
● Listen on SoundCloud ▸http://smarturl.it/staysaneSC
● Free Download ▸ http://smarturl.it/staysaneDL

Follow SRNO
● https://facebook.com/prodbysrno
● https://soundcloud.com/srno
● https://twitter.com/prodbysrno

Follow Naaz
● https://facebook.com/bitsofnaaz
● https://soundcloud.com/bitsofnaaz
● https://twitter.com/bitsofnaaz

Picture © WeliWaca Film Gallery
● https://www.facebook.com/weliwacagallery/' -metadata 'purl=https://www.youtube.com/watch?v=MQnyoAyxi8M' -metadata artist=SRNO -metadata 'title=Stay Sane (ft. Naaz)' 'file:SRNO - Stay Sane (ft. Naaz).temp.webm'
[debug] ffmpeg command line: ffprobe -show_streams 'file:SRNO - Stay Sane (ft. Naaz).webm'
[ffmpeg] Destination: SRNO - Stay Sane (ft. Naaz).mp3
[debug] ffmpeg command line: ffmpeg -y -i 'file:SRNO - Stay Sane (ft. Naaz).webm' -vn -acodec libmp3lame -q:a 0 'file:SRNO - Stay Sane (ft. Naaz).mp3'
Deleting original file SRNO - Stay Sane (ft. Naaz).webm (pass -k to keep)
[ffmpeg] Adding thumbnail to "SRNO - Stay Sane (ft. Naaz).mp3"
[debug] ffmpeg command line: ffmpeg -y -i 'file:SRNO - Stay Sane (ft. Naaz).mp3' -i 'file:SRNO - Stay Sane (ft. Naaz).jpg' -c copy -map 0 -map 1 -metadata:s:v 'title="Album cover"' -metadata:s:v 'comment="Cover (Front)"' 'file:SRNO - Stay Sane (ft. Naaz).temp.mp3'

Description of your issue, suggested solution and other information

When trying to add metadata to a song extracted from a youtube video, the program correctly detects the artist and song name. FFMPEG shows it is writing metadata (artist and song title) but when the audio is extracted using -x, the resulting mp3 file does not have the artist and song title embedded in the metadata. I think the metadata is lost when the audio is extracted using -x. I did a search and people have been successful at achieving this in threads such as [(http://stackoverflow.com/questions/30376172/downloading-youtube-mp3-metadata-encoding-issue-python-youtube-dl-ffmpeg)] where the user is using a different approach (using a python application), but the command is similar. Is it possible to have youtube-dl command ffmpeg to write metadata to the extracted mp3 file rather than writing metadata to the downloaded webm video then converting to mp3? Or am I missing or incorrectly using an argument?

Thanks in advance

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Oct 25, 2016

Seems a bug. MetadataFromTitlePP and FFmpegMetadataPP should be run before XAttrMetadataPP and after other post processors.

@ThibF
Copy link

@ThibF ThibF commented Jan 15, 2017

Issue is still present in youtube-dl version 2017.01.10 from France

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Jun 3, 2017

This has been fixed since version 2017.03.07. Feel free to open new issues if there are still problems.

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