Atom Feed SITE FEED   ADD TO GOOGLE READER

Java ID3 MP3? Good luck!

Today we attempted to parse some MP3 files with Java and we ran into some frustration. We're using the latest iTunes to do ripping and require compatibility with the latest and greatest of ID3v2. Here's what I found:

  • de.ueberdosis.mp3info The API for this package includes a class called "TwoStrings" that has the obvious methods setOne(), setTwo(), getOne(), getTwo(). This type of genius design didn't offer much confidence. It failed to parse all the MP3s I threw at it.
  • de.vdheide.mp3 This package offers a tight concise API. The API was really easy to use and I was up-and-running in minutes. But it didn't parse my files, so I just kept running.
  • helliker.id3 The first ID3 library that partially worked. It has a nice API but has been neglected for over 2 years. It didn't work on ID3v2 but it gave some hope on ID3v1. Still insufficient though.
  • org.farng.mp3 90% of the Javadoc for this package is the phrase DOCUMENT ME!. They suck. I couldn't even figure out the API!
  • javazoom.spi The API is awkward for ID3 alone since this library is primarily for decoding MP3 audio. But it works perfectly as an ID3 tag reader! This is what I'm using, it's the best.

    Moral of story: if you wanna use open source software, be prepared to waste 4 hours on crap. But when you do find that diamond in the rough, you will love it forever as if it were your poodle or wife.
  • What about JID3? It's the first hit when googling 'java id3 library'. I find it to work well, and the API is clean. Only problem I've had is with MP3's encoded with EAC/LAME. The tag fields it writes have a zero-byte character at the end that causes JID3 problems with numeric fields (well, only YEAR applies). I'd call it a EAC bug, but JID3 deals with it decently.
    I couldn't agree more with the assessments of the various ID3 api's. It's very frustrating to hear from one source how wonderful an API is, then spend time just to eventually find out it is a sham. Dead giveaway: no succinct example code.

    JID3: Couldn't figure out. No decent example. A weird API model.
    I'm also a fan of JID3, you should try it.

    Why the general bashing of open source? It's true that the particular area of "Java ID3" solutions isn't great, but I don't know of any commercial packages that are either, so I consider the whole area to be lacking.

    In general though, the open source movement has been incredible: Apache, Tomcat, Firefox, BitTorrent, just to name a few.
    What about jaudiotagger, (https://jaudiotagger.dev.java.net/), this appears pretty comprehensive and is actively developed.
    JID3 library is a very good choice if are totally sure you won't deal with ID3v2_2 tags. It's driveing me crazy!!!
    hey man
    how did you use the jlayer API to get the id3 of the mp3's?

    i didnt find any method in this API!

    please send a response!

    thanks
    Here's how to get ID3 tags out of JavaZoom: http://www.javazoom.net/mp3spi/documents.html
    You rock, I've been looking for something to work with iTunes for days. JavaZoom worked a treat!
    JavaZoom works like a charm!
    I've tried with the jid3 0.5.4 and with jd3lib 2005-04-alpha4 and not all files were read correctly and I couldn't obtain the bitrate, VBR and other mpeg settings.
    i got JID3 working in a couple of hours. the code is well laid out if not documented terribly well. its logical. I was able to extend the code to do what i needed. I imagine that I will be able to expand it if i ever need id3v2.4 to work. right now im happy.
    Kevan -
    I'm writing my own lib for id3v1, and I'd like some tips on how to read the zero-byte field which indicates if the track number is stored. This field should contain a binary value (0 or 1) but after a year of absence from programming I'm having trouble verifying which value it contains.

    following doesn't seem to work:
    byte a = 1;
    System.out.println(zerobyte[0]);
    if ((a & zerobyte[0]) == 1) {
    System.out.println("TRUE");
    }
    nevermind, problem solved
    I'm using entagged from http://entagged.sourceforge.net/
    I've tested some libraries on multiple files, and this one really comes out the best
    I'm using Jaudiotagger and I'm happy with it. I'm only set the Artist in an mp3 but it looks like a good API.
    Easy to use with maven.
    The last is from December 2008.
    http://www.jthink.net/jaudiotagger/