• Post Reply Bookmark Topic Watch Topic
  • New Topic

Extract song length from mp3 file  RSS feed

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
i'm writing a little app, in which i need to extract (to know) the length of a loaded MP3 song. I've read the explanation regarding the structure of such a file, including ID3, ID3v2 etc. ...and i've seen that it is not so easy. Fortunately there are some libraries which already do it. I've seen some, found "helliker" and i've seen it is great.
The only problem is that it doesn't work well sometimes and i don't understand if the problem are some not well-formed mp3 files or if the library has some bug.
Does somebody have experience with it? Or are there other suggestions?
 
Ranch Hand
Posts: 201
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is just a question - why do you need to know? I'm not in any way suggesting that you don't need to know, I'd just like to know why.
 
Emanuel Borsoi
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm by writing a little mp3 player, and since it is an MP3 player, it would be nice if there is shown the "right" length of the song....
 
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The OtherOpenSourceProjectsFaq page points to various libraries that can read MP3 files and/or extract ID3 tags; I suggest to try a few of those to see of they do better than the one you're using now.
 
Emanuel Borsoi
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:The OtherOpenSourceProjectsFaq page points to various libraries that can read MP3 files and/or extract ID3 tags; I suggest to try a few of those to see of they do better than the one you're using now.


Well, before using helliker i tryied out JMF and Tritonus, but since i wasn't able to play mp3s due some errore, and i didn't know why, i used this helliker library. But i'll try....i'll let you know.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!