Create Blog | Admin
Welcome to Paul's BlogWelcome to Paul's Blog

Saturday, 4th February 2006

ID3 tags and ROTunes revisited

rotunes2.gif
Track info window
(click on image to view full size)

I've spent the last couple of days trying to get my head around various ID3 tag madness.

It started out as a relatively harmless exercise in adding better ID3 support to ROTunes mainly so that I could implement 'Genre management'. However, it soon became apparent that there are several different varieties of ID3 tags. AMPlayer (which ROTunes uses as the underlying player module) only seems happy with ID3v1 tags, although it does seem to cope with some ID3v2 headers.

However, what caused the main headache was that 95% of my MP3 files were created using iTunes on the Apple Mac, which seems to use a completely different variety altogether.

After extensive searching for technical documents on Google, I managed to find several sites which describe the inner header formats for the various ID3 versions, together with a definitive list of genre labels.

It transpires that iTunes uses its own variation of ID3v2 tags, with a few custom headers added, so I decided to write my own ID3v2 interpreter for ROTunes. Of course, an hour or so later when I had completed it, I then discover that some of my MP3s were created by an earlier version of iTunes and that Apple, in their infinite wisdom, have changed the internal format of MP3 files between major upgrades of iTunes - so back to the drawing board and to reverse engineering the differences between formats. Another hour or so later and ROTunes could automatically detect from a large number of subtle variations - but that wasn't the end of the story.... Ooooh no!

It now turns out that iTunes allows you to add your own genres to the main database of default ones. This of course meant that half my MP3s came up as 'Blues', which puzzled me at first - until I realised that 'Blues' is genre 0 and that ROTunes was returning a value of 0 for 'unknown' genres. More head scratching, resulting in an expandable database of user-genres - on top of an extra list of 'WinAmp' genres which themselves were additions to the standard list of 80 genres listed on the ID3 site.

Having done this and feeling rather pleased that ROTunes was now comprehensively understanding pretty much any MP3 I could throw at it, I then found that it was mis-reading the track length of certain files..... Grrrr!

This turns out to be yet another variation of tags, or possibly even a corrupted header on a few tracks, as the tag lengths didn't seem to be internally consistent. Cue improved error handling routines, multiple cups of coffee, extensive head-scratching and general pondering and a couple of hours later (we're now well into the 'early hours') and ROTunes v0.08 is nearing completion and ready for 'extensive' bug testing.

Not content with leaving it alone for five minutes, I now shuffle off to re-write the documentation in HTML format.....


Last amended by Paul on 17th January at 2:35pm
So far people have left 4 comments;
JPEG to PDF Converter said...
I think i told you about 10000 times till now that this blog is great, but i'll say it again one more time
Sep 3rd, 2010 3:23am
mens nike shox said...
come here and see nike shox shoes
Jul 16th, 2010 7:34am
mbt shoes said...
Yep,waiting for ur update...
Jul 14th, 2010 8:41am
Ed Hardy said...
when he set out to combine being a writer with running a farm. Nevertheless
May 11th, 2010 6:09am
Leave a new comment:
Your Name
Your Email Address
(optional, will be encoded to avoid spambots)
Your web page
(optional and takes precedence over email address)
Add your comment
(include URLs inside square brackets, eg. [www.bbc.co.uk]
Anti-Spam Verification code
*****
Please re-enter the characters you see above: 
Moderation
Off - Your comments will be published immediately.
Remember name and email/web page for next time  (requires 'cookies')
URLs linking to this entry

 · uk.search.yahoo.com | 9-January-2007
 · www.google.com | 18-April-2006
 · www.bloglines.com | 5-February-2006

Creative Commons LicenseElectricType

©paulsdomain.co.uk | Home | About Paul | Disclaimer | Admin | Contact | RSS feed

Powered by ElectricType 1.05 (28th Dec 2008)