Link to home
Start Free TrialLog in
Avatar of Tyzer
Tyzer

asked on

Get BitRate From mp3

Hi everyone,
can anyone tell me how to get the bitrate from a mp3 file?
i'm using some id3 components to read all kind of info from a mp3 file,
but i cant find a way to read out the bitrate (and duration) of a song.
..and i was thinking , it should be possible simply by reading some file properties..
..even my windows explorer shows this info in its file properties..
..but these file properties only gave me creationdates, lengths.. no bitrates

Greetz, Tys
Avatar of w3tim
w3tim

Hi Tyzer,

This is something I've looked at before.  It's a fairly deep subject.  Well, it may be.  I'm unsure if you can get the bitrate from the headers of the file.  It may be something you have to calculate off the actual audio data.  Got to be honest I don't exactly know.

I've posted a few questions relating to Wav and MP3 data in that past.  I've still never managed to do the necessary stream converstions in VB.Net.  

In case they are of any use.
https://www.experts-exchange.com/questions/21131927/MP3-Stream-to-PCM-Stream-using-ACM-in-VB-Net.html
https://www.experts-exchange.com/questions/21142521/Urgent-Converting-Byte-4-into-integer-VB-Net.html
https://www.experts-exchange.com/questions/21143858/urgent-PCM-data-structure.html

Most of it is about byte and PCM stuff.  It was all a bit much for me at the time but it's something I will be returning too.

The information you are getting is all logged in the id3 header of the file so it can be edited and changed pretty easily.  For duration and bitrate etc I'd imagine you have get the actual audio stream.  You may well be able to find some components that do this.  There may have been one or two mentioned in posts from people on the topics I listed above.

Have a look and see if you can find anything.

Unfortunately, it has nothing to do with the file system.  That will only give you information regarding the file itself, not it's contents!

Hope this is of some help.

Tim
ASKER CERTIFIED SOLUTION
Avatar of wyoung76
wyoung76
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Chuckle, even if the author doesn't find it useful, I did.  Cheers for that! :)!
That's what I like about EE; you never know when you'll find something useful.  Even if it's not an accepted answer, it could be useful to someone else.

Glad you found it useful w3tim  :o)
Yeah, and it often happens.  It's great!!

I don't have much of a background in audio work and it's something I'm hoping to do more in at some point so it's really useful to get every bit of info I can :)!
What??

We STILL need a solution!

I have found that several 3rd part components doenst work, because of the possible VBR and different versioins of a MD3 tag. I have also found a solution earlier withe GetDetailsOf() Duaration and BitRate, but suddently it doesnt work anymore after a reinstall & ASR Restore of the Windows 2003 web server, so now Im also looking for a working solution to get Duration and BitRate of a MP3 file.
Avatar of Tyzer

ASKER

Hey loop,

It's been a while since something happened with this thread,
but perhaps i can solve many questions around this topic with a single link:

http://www.un4seen.com

This is by far the best audio library that i've ever found. I takes a while to fully understand how everything works, but it's worth your time. There are many samples included to learn from.

Go check it out and good luck.

Tys
Hi Tyzer,

Interesting tool/library..

I just dont know if its something for me.. I spend sevral hours to see if it could read ID3 tags, if I could find some examples, or if I could find some documentation. But no luck.
But the example page with only includes other peoples webpages or products were very interesting! :)

Do You know where to find a documentation for the DLL-file? And do You know which DLL I can use to read MP3 ID3 tags?
Avatar of Tyzer

ASKER

Follow the instructions on the us4seen website. Download the library and perhaps the .NET API as well. That should get you goin.
So what have You been donloading to get Your BitRate from within some code?

The BASS? The XMPlay? The MO3?
Avatar of Tyzer

ASKER

The Bass library
I cannot registrate it!

I have tried both to register the free bass.dll and the bass.dll.
They both say it doesnt have the function to register within the dll files.
I mean register them via "REGSVR32 BASS.DLL"