Page 1 of 1
Read length and bitrate mp3
Posted: Wed Aug 18, 2010 9:55 pm
by vttv
i'm new PHP.
i want read length and bitrate file mp3(http://..../123.mp3) to calculator total time but i don't k.please help me.thanks.
Re: Read length and bitrate mp3
Posted: Wed Aug 18, 2010 10:29 pm
by requinix
There's likely a script out on the internet that can do this already. Google for it.
If you want to do it yourself,
- For the length you have to divide the number of samples by the sample rate.
- For the bitrate, it varies: CBRs are easy but with VBRs you'd have to check each frame and average out the rates.
How much do you know about the MP3 format?
Re: Read length and bitrate mp3
Posted: Thu Aug 19, 2010 1:19 am
by cpetercarter
getid3() will extract the information you need and much more.
Re: Read length and bitrate mp3
Posted: Thu Aug 19, 2010 8:06 am
by vttv
getID3()
with file local ex: C:/1.mp3 so it work, but it don't work with file on server( ex: htt://../1.mp3 )
Re: Read length and bitrate mp3
Posted: Fri Aug 20, 2010 12:31 pm
by cpetercarter
When you try to read information about mp3 files on your remote server, is getid3() also installed on the server, or are you trying to access the files from your local machine?
What are the permissions in the folder where the mp3 files are situated.