PHP Function to get MP3 duration

ram picture ram · Aug 21, 2012 · Viewed 57.7k times · Source

Is there any PHP function that will give me the MP3 duration. I looked at ID 3 function but i don't see any thing there for duration and apart from this,id3 is some kind of tag,which will not be there in all MP3 so using this will not make any sense.

Answer

Richard Askew picture Richard Askew · Aug 21, 2012

This should work for you, notice the getduration function: http://www.zedwood.com/article/127/php-calculate-duration-of-mp3