Stupid iTunes

| | Comments (0)
I have been getting a lot of complaints about ID3v2 tags of certain MP3s not being able to be read by MP3::Info. In pretty much every case, the file was written by iTunes. It turns out that iTunes is saving comments in a tag "COM ". My regex was looking for tags matching /^[A-Z0-9]{4}$/. Because, that is what, you know, EVERY TAG NAME MATCHES. ID3v2.3.0 and ID3v2.4.0 specify that the comment field is "COMM", not "COM ". I guess they did this so their own comments wouldn't interfere with the user's comments, or something; you can have multiple comments fields. But that space broke MP3::Info. And it is certainly broken:

The frame ID is made out of the characters capital A-Z and 0-9. Identifiers beginning with "X", "Y" and "Z" are for experimental frames and free for everyone to use, without the need to set the experimental bit in the tag header. Bear in mind that someone else might have used the same identifier as you. All other identifiers are either used or reserved for future use.
-- ID3 tag version 2.4.0 - Main Structure: 4. ID3v2 frame overview

So 1. it must not have a space there and 2. it must begin with X, Y, or Z if it is different from the standard set of frame IDs.

Oh well, I tracked it down, all better. Will upload sometime soon (more fixes to make). use.perl.org

Leave a comment

<pudge/*> (pronounced "PudgeGlob") is thousands of posts over many years by Pudge.

"It is the common fate of the indolent to see their rights become a prey to the active. The condition upon which God hath given liberty to man is eternal vigilance; which condition if he break, servitude is at once the consequence of his crime and the punishment of his guilt."

About this Entry

This page contains a single entry by pudge published on February 12, 2003 6:58 PM.

Moving was the previous entry in this site.

Perl Programmers Support Terror is the next entry in this site.

Find recent content on the main index or look in the archives to find all content.