File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Reading ID3 Tags of MP3s Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Reading ID3 Tags of MP3s" Watch "Reading ID3 Tags of MP3s" New topic
Author

Reading ID3 Tags of MP3s

Yohan Liyanage
Ranch Hand

Joined: Aug 17, 2007
Posts: 132

Hi,

Is there anyway to read the ID3 (both Version 1 and 2) tags of a MP3 file in Java ?

Thanks.
[ November 10, 2007: Message edited by: Yohan Liyanage ]

Yohan Liyanage
http://blog.yohanliyanage.com
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4659
    
    5

Sure, I do it all the time.
I don't know of a public library to do it, but it was fairly easy to write, I read ID3v1, ID3V2, ID3v3, Ogg, Flac and perhaps one or two more.

Be forwarned ID3 tags are a gross hack, badly designed, ancient, limited, and not standardized.

see
http://www.id3.org/
Yohan Liyanage
Ranch Hand

Joined: Aug 17, 2007
Posts: 132

Gee, thanks about the warning! I wanted to write my own program to manage my MP3 collection.

Thanks !
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4659
    
    5

If you want to learn, go for it.
But there are many open source library management programs.
I use SlimServer from SlimDevices.com. They sell hardware, wifi audio, etc. but the server itself is open source, runs on Windows, Mac and linux, and does not require their hardware.
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

Parsing ID3 Tags From MP3 files
Freddy Wong
Ranch Hand

Joined: Sep 11, 2006
Posts: 959

I use JID3.
http://jid3.blinkenlights.org/


SCJP 5.0, SCWCD 1.4, SCBCD 1.3, SCDJWS 1.4
My Blog
Yohan Liyanage
Ranch Hand

Joined: Aug 17, 2007
Posts: 132

Thanks guys ! I looked into JID3 as well. Well, I want to write my own app, just for the sake of learning it. Thanks for the help.
joneric wennerstrom
Greenhorn

Joined: Jun 17, 2004
Posts: 1
I looked around for java ID3 tag libraries, and didn't really like any that I found.
Plus I wanted to learn about it.
So, I wrote me own, which can be found at http://www.beaglebuddy.com.
It is open source, free, provides e-mail support, has amazing javadocs, lots of sample code examples, uses java 1.6 and works on Android, Windows, Linux, Mac, etc.

In my opinion, it is 1000 times better than anything out there.
You can load mp3 files from a local file system, from a URL, from a network drive, etc.
Especially loading mp3 files from a URL, which is something I have yet to find in any other java id3 library.
It has support for synchronized lyrics (ie, making mp3 files into Karaoke songs), support for images in your mp3 files, etc.

The javadocs are excellent. I spent a lot of time on them.
The sample code gets you up in running in a few minutes.

The design of the library is also far simpler and much easier to understand than anything else I've found out there.

But, I wrote the library, so don't take my word for it.
Check it out for yourself to see just how good it is.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Reading ID3 Tags of MP3s