• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Extract song length from mp3 file

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Willie Smits can speak 40 languages. This tiny ad can speak only one:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic