views:

4314

answers:

7

I'd like to know a good ID3 tag reader library for Java. Would be good if it was easy to use or had very good documentation, but my main criteria is speed - I want to be able to read ID3 tags from over 10,000 files as quickly as possible.

Edit 04-Jan-2010

I'm not entirely sure what to do with this question now - it was a high priority project back when I posted it, but has gone far down the list since. As such I have not yet been able to evaluate any of the suggestions provided to be able to accept any as the answer, and don't forsee getting back to it any time soon. Any suggestions as to how this situation should be dealt with on S.O. are welcome!

+1  A: 

I use the java ID3 reader http://jid3.blinkenlights.org/, pretty good with speed and with documentation.

Tammen Bruccoleri
+3  A: 

The best library I have found is entagged This one supports any mp3/id3 formats I have found. I have also used jid3 but it does not supports as many formats. Both are very easy to use. You get the id3 tags with only one line of code. I have not done serious benchmark but I know that reading tags takes less than a second. Writing tags should be more cpu expensive.

Alexandre Victoor
FWIW, the latest release of Entagged was in 2006; Jaudiotagger is a much more active project
Jonik
A: 

Thanks guys - I do intend to come back to this once I've had a chance to evaluate these options - unfortunately have been sidetracked with other priorities at the moment

Graza
+3  A: 

I don't know if it's fast, but JAudioTagger supports MP3 ID3v1,ID3v11, ID3v2.2, v2.3 and v2.4.

http://www.jthink.net/jaudiotagger/

Remy
A: 

If none of the excellent libraries described by the other posters are what you need, or you need to re-implement it for speed, I have some very simple Java code at my Java tutorial site that reads the most common tags (it worked on all the MP3s I have). You could use it as a jumping off point for what you need:
  http://polylingualprogrammer.com/java/lesson6/solution.html (see the MP3File.java section).
I also attempted to make the ID3v2 spec a little more comprehensible than the original; see Advanced I/O >> ID3 Tag Format (sorry, I don't have enough reputation to post a second link).

prewett
A: 

Hi, I use Javazoom MP3SPI. It works quite well, albeit lacks support for some 2.4 tags (notably multiple genres and sort order (TSOA, TSOP, TSOT). Have a look at the Javazoom homepage?

p2r
A: 

Try http://github.com/mpatric/mp3agic

You can get it just to read ID3s (for speed), or read the full mp3, with mpeg frames, if you want to get actual length for VBR mp3s with invalid or missing xing headers. Although, of course this takes longer. Does id3v1, id3v2.1, id3v2.2, id3v2.3, id3v2.4.

Mike