I recently use getId3 library to manipulate audio files from PHP. It is very accurate than FFMPEG. For example, FFMPEG is not helpful for audio files having VBR (Various Bit Rate).
It returns error
“Estimating duration from bitrate, this may be inaccurate”
But by using getId3, we can retrieve detailed information about a particular audio file (WAV, MP3 or any)
This library can be used for any kind of medias.
You can download it from http://getid3.sourceforge.net/