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

MP3 ID3 metadata formatting (--add-metadata) #14033

Open
5 of 8 tasks
ftc2 opened this issue Aug 26, 2017 · 0 comments
Open
5 of 8 tasks

MP3 ID3 metadata formatting (--add-metadata) #14033

ftc2 opened this issue Aug 26, 2017 · 0 comments

Comments

@ftc2
Copy link

ftc2 commented Aug 26, 2017

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 2017.08.23. 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 2017.08.23

Before submitting an issue make sure you have:

  • At least skimmed through the README, most notably the 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:

youtube-dl -v --add-metadata https://soundcloud.com/evanschaeffer/aqueduct                                                 
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'--add-metadata', u'https://soundcloud.com/evanschaeffer/aqueduct']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2017.08.23
[debug] Python version 2.7.10 - Darwin-16.7.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 3.3.3, ffprobe 3.3.3
[debug] Proxy map: {}
[soundcloud] evanschaeffer/aqueduct: Resolving id
[soundcloud] evanschaeffer/aqueduct: Downloading info JSON
[soundcloud] 292595282: Downloading track url
[soundcloud] 292595282: Downloading m3u8 information
[soundcloud] 292595282: Checking hls_mp3_128_url video format URL
[soundcloud] 292595282: Checking http_mp3_128_url video format URL
[debug] Default format spec: bestvideo+bestaudio/best
[debug] Invoking downloader on u'https://cf-media.sndcdn.com/exZY8crWniD5.128.mp3?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiKjovL2NmLW1lZGlhLnNuZGNkbi5jb20vZXhaWThjclduaUQ1LjEyOC5tcDMiLCJDb25kaXRpb24iOnsiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjE1MDM2NzY4MTl9fX1dfQ__&Signature=R3vAhbbdzzjm989Diq2VVQGq0MMps1xoHHoVWuoLnUHYf6PmZsxiRUFn2PWYY5iZgArOC0nBUc9N-c-iUnjWCfOkd~s5WYcxxgbiSVcPKpfZtZF7LNLqJUtbsWyV~ixbU81DK1j1otMWyl-YvKH9oihzbTrlNsX67g3IRvjFPx-0S~B-WYhcjatypMTBVUppr92OmJWHSlz6mPwIguUABJPuPTAiWykDSxHIDNIfLuseHQurQnbrP~B3tbQk3nEfS0nAnQ2Zi0xJ~J2khJOOVqxcwJekAIXOviPITZhyLSQIMbcuhG-PKK2nLf4nlPPlGczhQXbqxaDA0w19HrMchA__&Key-Pair-Id=APKAJAGZ7VMH2PFPW6UQ'
[download] Destination: AQUEDUCT (Pop _ Future Pop) (also at Spotify and iTunes)-292595282.mp3
[download] 100% of 2.34MiB in 00:00
[ffmpeg] Adding metadata to 'AQUEDUCT (Pop _ Future Pop) (also at Spotify and iTunes)-292595282.mp3'
[debug] ffmpeg command line: ffmpeg -y -i 'file:AQUEDUCT (Pop _ Future Pop) (also at Spotify and iTunes)-292595282.mp3' -c copy -metadata 'comment=You can use this song in a video -- just credit me (Evan Schaeffer) with a link back to my SoundCloud account. For information on commercial uses, see my SoundCloud profile and follow the link to www.evanschaeffermusic.com.

<a href="https://theartistunion.com/tracks/6be330" rel="nofollow">Download for free on The Artist Union</a>' -metadata 'description=You can use this song in a video -- just credit me (Evan Schaeffer) with a link back to my SoundCloud account. For information on commercial uses, see my SoundCloud profile and follow the link to www.evanschaeffermusic.com.

<a href="https://theartistunion.com/tracks/6be330" rel="nofollow">Download for free on The Artist Union</a>' -metadata 'artist=Evan Schaeffer' -metadata 'title=AQUEDUCT (Pop | Future Pop) (also at Spotify and iTunes)' -metadata 'date=20161111' -metadata 'purl=https://soundcloud.com/evanschaeffer/aqueduct' 'file:AQUEDUCT (Pop _ Future Pop) (also at Spotify and iTunes)-292595282.temp.mp3'

Description of your issue, suggested solution and other information

there are a couple of issues with mp3 metadata postprocessing via --add-metadata.
(youtube-dl relies on ffmpeg for id3 tagging)

id3 tag info (output from mid3v2):

IDv2 tag info for AQUEDUCT (Pop _ Future Pop) (also at Spotify and iTunes)-292595282.mp3
TDRC=20161111
TIT2=AQUEDUCT (Pop | Future Pop) (also at Spotify and iTunes)
TPE1=Evan Schaeffer
TSSE=Lavf57.71.100
TXXX=comment=You can use this song in a video -- just credit me (Evan Schaeffer) with a link back to my SoundCloud account. For information on commercial uses, see my SoundCloud profile and follow the link to www.evanschaeffermusic.com.

<a href="https://theartistunion.com/tracks/6be330" rel="nofollow">Download for free on The Artist Union</a>
TXXX=description=You can use this song in a video -- just credit me (Evan Schaeffer) with a link back to my SoundCloud account. For information on commercial uses, see my SoundCloud profile and follow the link to www.evanschaeffermusic.com.

<a href="https://theartistunion.com/tracks/6be330" rel="nofollow">Download for free on The Artist Union</a>
TXXX=purl=https://soundcloud.com/evanschaeffer/aqueduct

Comment tag
http://id3.org/id3v2.4.0-frames
the correct frame header ID for the comments is COMM, but this doesn't appear to be implemented by ffmpeg.
youtube-dl --add-metadata invokes the following:
ffmpeg -i infile -metadata 'comment=foo' outfile
this yields a TXXX (User defined text information) frame with description='comment'. the problem with this is that many (most?) mp3 players don't display arbitrary TXXX frames in their tag viewers and editors, so the metadata is not accessible to the user without relying on external, advanced id3 tagging software.

btw, ffmpeg -i infile -metadata 'comm=foo' outfile doesn't give a COMM frame either.

suggestion: consider using another ID3 lib to write metadata, especially for COMM support.
it might also be nice if miscellaneous metadata (especially purl (original song url)) were appended to the comments so they can be viewed in popular mp3 player software.

Date tag
the date format in the TDRC frame appears to be noncompliant.
it's being passed to ffmpeg in a noncompliant format, and ffmpeg doesn't fix it.

see:
http://id3.org/id3v2.4.0-structure
http://id3.org/id3v2.4.0-frames

TDRC
The 'Recording time' frame contains a timestamp describing when the
audio was recorded. Timestamp format is described in the ID3v2
structure document [ID3v2-strct].
The timestamp fields are based on a subset of ISO 8601. When being as
precise as possible the format of a time string is
yyyy-MM-ddTHH:mm:ss (year, "-", month, "-", day, "T", hour (out of
24), ":", minutes, ":", seconds), but the precision may be reduced by
removing as many time indicators as wanted. Hence valid timestamps
are
yyyy, yyyy-MM, yyyy-MM-dd, yyyy-MM-ddTHH, yyyy-MM-ddTHH:mm and
yyyy-MM-ddTHH:mm:ss.

the format currently being passed is yyMMdd, and this might be taken directly from source metadata with no additional processing?

suggestion: try to validate date format and process it into compliance before tagging

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

No branches or pull requests

1 participant