Read Write MP3 ID3 Rating Stars Tag

These statements are partially correct. I was able to look at the files in a binary/hex viewer, and discovered that the v2.2 file actually contains both v2.2 tags and v2.4 tags. My ID3 extractor contains this block regarding v2.2:

ElseIf id3v220Idx >= 0 Then // We have an ID3 v2.20 3-character tag
  // THIS SECTION HAS *NOT* BEEN IMPLEMENTED YET (since ID3v220 was not widely accepted, I don't want to take the time at this point)
  // We will attempt to continue looping, although since the byte position is likely to be wrong, this probably won't work. -ELK 20230803
End If

Regarding v2.4 tags, most of them are supported by v2.3 code (so long as the file is not a hybrid containing both v2.2 and v2.4, like the sample you provided), but I’ll have to go through the specs and update the extractor. Thanks!

I added a line in your code that looks what version of ID3v2 we have: v2.3 or v2.4. It’s in GetID3Tags (in the old version of your code):

If headerText.Left(3) = "ID3" Then id3v2Exists = True
// version shows if it's a id3v2.3 or id3v2.4 version
version = Ascb(headerText.MiddleBytes(3,1))

Now I need to find out what’s the difference between these two versions in storing images :sweat_smile:

I found the structure of these different versions here.

1 Like

Regarding v2.4 tags, most of them are supported by v2.3 code (so long as the file is not a hybrid containing both v2.2 and v2.4, like the sample you provided), but I’ll have to go through the specs and update the extractor. Thanks!

After some more testing it seems that also the 2.4-only files do not show images, even if there are images present. Both the old and the new code does show the tags like title, artist, etc, but no images. In the new code I can sometimes see references to images in the long text that is shown, it seems that this is image data that is shown as text.

I have released another update to my ID3 Tag Extractor project, available here:
ID3 Tag Extractor updated binary project available for download

To summarize, both of the files provided had technical issues:

  • File 1 had an incorrect byte count on the first TXXX tag
    • I solved this problem in the update by including a new parameter on the constructor called “enableAutoCorrect”.
      • When enableAutoCorrect is true, the system will now read ahead in the data to see if any known tags exists.
      • Because this comes at a steep performance hit and is only necessary when reading non-standard-compliant ID3 tags, I have it disabled by default.
      • The sample project also includes a “Reload With Auto Correct” button to demo and test the feature.
  • File 2 included both ID3 v2.2 and v2.4 tags … I didn’t support v2.2 tags in my project because of their rarity and deprecation.
    • I may take the time to work around this issue later, but since the files are technically wrong, I would suggest retagging them with something like MusicBrainz.

Hope that helps!

2 Likes

Well, thanks to Mario for providing the samples, I ended up adding v2.2 support into my ID3 tag project after all. Use the link in the previous post for the latest (and hopefully last :slight_smile: ) update.

Thanks a lot ! :slight_smile:

Thanks again for this wonderful piece of code! With this last version all files I threw at it now show their cover art and tags correctly. I sure believe there’s a lot of variation in these ID3 tags over the years and also since it’s such a “loose” standard also with different versions and interpretations over these last few decades.