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

Some ID3v2.3 native tag names contain null byte #795

Closed
bradisbell opened this issue Apr 17, 2021 · 3 comments · Fixed by #796
Closed

Some ID3v2.3 native tag names contain null byte #795

bradisbell opened this issue Apr 17, 2021 · 3 comments · Fixed by #796

Comments

@bradisbell
Copy link

When iterating through metadata.native['ID3V2.3'], I've noticed that some tag names contain a null byte at the end:

  • TP1
  • TP2
  • TAL
  • TEN

(If you serialize the tag names to JSON, you'll see TP1\u0000, TP2\u0000, etc.)

Attached is a test file that demonstrates the problem. Please let me know if you'd like any other test files! In the mean time, I'm going to work around this by trimming the tag names, but I figured you would want the test case. Thanks!

bc5f5386-82ae-4f86-b5f5-61000d8fa381.zip

@Borewit
Copy link
Owner

Borewit commented Apr 18, 2021

I do, thanks @bradisbell !

@Borewit Borewit transferred this issue from Borewit/music-metadata-browser Apr 18, 2021
@Borewit Borewit added bug Bug, will addressed with high priority caused by corrupt audio track labels Apr 18, 2021
@Borewit
Copy link
Owner

Borewit commented Apr 18, 2021

This id3v2 header is violating the standard.
The version is id3v2.3, while it is using 3 letter tags of id3v2.0.

The id3v2.3 Frame ID:

Frame ID $xx xx xx xx (four characters)
The frame ID made out of the characters capital A-Z and 0-9.

Furthermore, unless declared experimental, the tag ID's are preserved by the id3 standard.

So TP1\u0000 should be TIT1.

What fails in this scenario is that music-metadata should generate a warning an invalid frame ID has been found.

@bradisbell
Copy link
Author

Thanks for looking into that, and adding the warning!

I decided to do some digging into the sample files I have to find commonalities in case anyone else hits this issue. It looks like Apple products were creating these invalid tags. Here are some of the version numbers I've noticed:

iTunes

  • 8.2.16
  • 9.1
  • 10.0.1
  • 10.1.2
  • 10.4
  • 10.4.1
  • 10.4.1.10
  • 10.5.0.142
  • 11.2.2.3
  • 11.4
  • 12.1.2.27

GarageBand

  • 4.1.2

Logic Pro

  • 9.1.3

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

Successfully merging a pull request may close this issue.

2 participants