Saturday, 4th February 2006ID3 tags and ROTunes revisited
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.....
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:
URLs linking to this entry
· uk.search.yahoo.com | 9-January-2007
· www.google.com | 18-April-2006 · www.bloglines.com | 5-February-2006 |
Search Paul's Blog
Contact
Summary of February 2006
14th - A load of balls
12th - Tidying loose ends
11th - Programming Marathon
5th - Universal Installer
2nd - Jehovah!
Current
Recent comments
On Sep 7th, 2010 6:38pm, location voiture marrakech commented on Heightened Terror State (26th August 2006)
On Sep 7th, 2010 10:05am, ugg boots cheap commented on Scary Wheelie Bins.... (31st August 2006)
On Sep 7th, 2010 4:38am, coach pureses commented on Heightened Terror State (26th August 2006)
On Sep 6th, 2010 1:47pm, ugg boots cheap commented on Scary Wheelie Bins.... (31st August 2006)
On Sep 6th, 2010 1:47pm, ugg boots cheap commented on Scary Wheelie Bins.... (31st August 2006)
On Sep 6th, 2010 11:01am, tag heuer watches commented on What's happened to monitor technology? (20th January 2007)
On Sep 6th, 2010 8:32am, watches longines commented on Saddam's cat up for adoption? (5th January 2007)
On Sep 6th, 2010 8:21am, watches longines commented on Saddam's cat up for adoption? (5th January 2007)
On Sep 6th, 2010 7:19am, christmas gift basket ideas commented on May Day (1st May 2006)
On Sep 6th, 2010 2:17am, Ang commented on Scary Wheelie Bins.... (31st August 2006)
On Sep 5th, 2010 8:45am, chanel necklace commented on May Day (1st May 2006)
On Sep 5th, 2010 8:43am, wc davinci commented on May Day (1st May 2006)
Tagged Categories
|
|||
|
Powered by ElectricType 1.05 (28th Dec 2008)
|
Visitors: 349275
|