For those using Ming 0.3 (like me), there is a way to calculate the length of the MP3 you are using. It might be a bit iffy for VBR files, but it seems to work well for the files I've tested thus far. The process of calculating the frame length (and size) is detailed at http://www.mpgedit.org/mpgedit/mpeg_format/mpeghdr.htm

$version=substr($bits, 0, 2); // this gives us the version
$layer=base_convert(substr($bits, 2, 2), 2, 10); // this gives us the layer
$verlay=base_convert(substr($bits, 0, 4), 2, 10); // this gives us both

Seems that this function only handles some MP3 files with specified sample rates and not others. 44100 and 21050 work. With the lame MP3 converter, this is obtained with setting the "bit rate" at 112 (average compression/quality), mono or stereo. Other values may work, probably multiples, I did not tried all.