tags:

views:

221

answers:

3

I wrote a JSP that hands my Flash front-end an XML file that describes the contents of my mp3 folder, but am stuck trying to parse the individual file headers for the album art that is embedded therein. Can anyone recommend a good library that has something straight forward that in pseudo code would look like...

String mp3FilePath = "/mp3s/foo.mp3";
File myJpg = getImageFromMP3(mp3FilePath);

I don't have to use JSP, if that's a problem, I can write a servlet.

+1  A: 

JavaMusicTag library allows you to read / write ID3 tags in mp3.

It supports ID3v2 so getting album art should be possible.

ChssPly76
+1  A: 

You'll need an ID3 parsing library. Here's a Java ID3 Tag Library. You'll want to extract a FrameBodyPIC. The Quick Start Guide may be helpful.

Laurence Gonsalves
A: 

JAudioTagger is probably the most complete solution. It's supports many versions of id3. But it's too heavy. Jid3tag may be better if you only need the picture.

tulskiy