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 file with both v1 and v2.2 tag misses metadata #975

Closed
thoni56 opened this issue Jan 11, 2022 · 5 comments · Fixed by #977
Closed

MP3 file with both v1 and v2.2 tag misses metadata #975

thoni56 opened this issue Jan 11, 2022 · 5 comments · Fixed by #977

Comments

@thoni56
Copy link

thoni56 commented Jan 11, 2022

Bug description
When an MP3 file that has tags ID3 v1 and ID3 v2.2 meta data from v2.2 is not transferred to "common".

Running music-metadata v7.11.4.

Expected behavior
The file has the v2.2 meta data "TBP" which is not transferred to common.bpm as expected. The data it is saved in native[ID3v2.2][TBP].

So even if the double ID3 tags might be confusing, music-metadata seems to consider the file having ID3 v2.2 format since that metadata is in native but there is no ID3 v1 entry.

Audio file demonstrating the problem
01 Betty Lou.zip

@Borewit
Copy link
Owner

Borewit commented Jan 11, 2022

Hello @thoni56

The MP3 file has indeed a headers ID3v2 and ID3v1 header, but also an APEv2 header.

Based on their priority, one tag header get precedence over the other and is mapped to .common.

These are the priorities:

const TagPriority: TagType[] = ['matroska', 'APEv2', 'vorbis', 'ID3v2.4', 'ID3v2.3', 'ID3v2.2', 'exif', 'asf', 'iTunes', 'ID3v1'];

First one, get priority over the others. They are not combined, only one is picked. Trust me, the metadata may inconsistent in between version, and I will get tons of question about weird combinations if I would combine them.

The idea is that a more modern tag header tags precedence over the older one.
So if an ID3v2.2 tag header is present, that one will be leading for common, and the ID3v1 header is ignored. Which is sensible thing as the later version can capture much more detailed metadata is the older header.
Yet this algorithm is far away from perfect. An APEv2 header in MP3 file is arbitrary as it kind of non-standard. A smarter priority mapping may give APEv2 a lower priority for this reason.

The tag ID3v22.TBP is currently indeed not mapped to common.

I have no problem adding mapping from ID3v22.TBP to common.bpm. Would be great if you can tell me where is coming from. I think this tag is non standard, and probably even violating the informal iD3v2.2 standard as it not using the custom tag system. I have no problem taking a pragmatic approach (that''s why you can access APEv2), as long it does not harm formal standards.

I hope this clarifies things a bit.

@thoni56
Copy link
Author

thoni56 commented Jan 12, 2022

Thank you, @Borewit! Pretty much what I expected. I did not know the priority order, nor that we can actually find which tag/attribute is actually mapped. Nice to know!

Unfortunately I have a lot of files ripped with different software, so I can't tell you where this comes from. What I can say is that iTunes finds and sets the TBP attribute, which is why I started investigating why my software did not pick it up. Indicated also here (which probably is a heuristic list and not an official standard).

Since the APE tag only contains gain information, I'm guessing that might also come from iTunes (auto-adjust level), but that is just a guess. But then it would seem strange that iTunes would only add this to some files.

Anyway, thanks again, I will probably try to remap the tags to a more standard configuration. It is only the files from one album.

@Borewit
Copy link
Owner

Borewit commented Jan 12, 2022

Version 7.11.6 maps the ID3v2.2 TBP.

@thoni56
Copy link
Author

thoni56 commented Jan 12, 2022

Thanks!

@Borewit
Copy link
Owner

Borewit commented Jan 13, 2022

I can strongly recommend MusicBrainz Picard for tagging your audio tracks.

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

Successfully merging a pull request may close this issue.

2 participants