What is all this ID3 nonsense, you ask? Well it's be easy to explain if the ID3.org website were up more often. ID3 tags are small pieces of information stored inside the MP3 file. They can contain bits of metadata about the MP3, such as album name, song name, artist, original artist, genre, composer, year of release, additional comment fields, and many more. Unfortunately, there have been many versions of the ID3 spec and it has slowly been getting more and more complicated. Oh, and the tags are typed. And may have other fields than simply "value". And tags have been renamed in newer versions of the spec for no real reason other than to confuse me. A simple key -> value frame at the end of the MP3 file would have been so much simpler, but unfortunately we can't change the world overnight.
Anyway, ID3Lib reads and writes these tags. The actual library is in C++ but there is a cut-down C interface which I picked as I know no C. After refreshing my XS and typemap knowledge, it all pretty much fell into place. One strange thing was having to use g++ to compile the XS. Is there a more-portable way to find a C++ compiler than:
# In Makefile.PL
'CC' => 'g++',
'LD' => 'g++',
The current docs and API are a little lacking and there's a small memory leak, but it works! It's up on the CPAN, phew.
And thanks to Pudge for letting me use his test MP3s...
Am I Going Mad? (Score:2)
I could have sworn that I've been using MP3::Info to write tags for months. The docs mention a set_mp3tag function.
Re:Am I Going Mad? (Score:2)
Re:Am I Going Mad? (Score:3, Informative)
Firstly, id3v1 has length limits on all the fields it supports, usually about 40 or so characters. Secondly, id3v1 only supports six (I think) basic tags.
As I like to keep the file names of my mp3s short (so I can still see them with the Mac OS 9 Finder, amongst other reasons), that means the id3 tags have to keep all the metadata about the mp3s, so id3v1 just doesn't cut it. (Not en
Re:Am I Going Mad? (Score:3, Informative)
I have over a dozen MP3::Info patches to apply; when Apple sends me my new PowerBook, I am going to work more on them. One of them has to do with writing ID3v2 tags. I've not tried it yet, but someone wrote MP3::Info::set_mp3v2tag [cpan.org], and has given me permission to integrate it into MP3::Info. Have you tried this module? I've not ye
Re: set_mp3v2tag (Score:1)
My one complaint is that it doesn't set comments correctly, because id3v2 allows multiple comment frames, distinguished by the language and description. I have a (three-line) local patch that uses 'eng' as the default language, which is probably acceptable as a convenience.
Re: set_mp3v2tag (Score:2)
id3lib rocks! (Score:2)
Why do you need a Perl interface? I've been doing a ton of things like this:
% ls -1 "His Dark"* | perl -nle '/(.*) - (\d+) - (.*)/; system("id3tag", "-aBBC", "-A$1", "-s$3", "-t$2", "-T3", $_)'(for those without id3lib, that takes His Dark Materials - 1 - The Amber SpyglaRe:id3lib rocks! (Score:2)
Re:id3lib rocks! (Score:3, Funny)
Re:id3lib rocks! (Score:1)