|
Posted by Toby A Inkster on 03/02/07 18:41
Lawrence wrote:
> Could you recommend an "easy to use" PHP module that will tell me the
> length of an uploaded mp3 file?
If you can install a command line tool onto your server, then grab and
install mp3info:
ftp://metalab.unc.edu/pub/linux/apps/sound/mp3-utils/mp3info
and then call it like this:
$s = `/path/to/mp3info -p '%S' /path/to/audio-file.mp3`;
This will set $s to the length of the file, in seconds.
You can also substitute '%S' for '%r' (bit rate), '%o' (stereo-ness),
'%Q' (sampling rate) and various other things.
--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux
* = I'm getting there!
Navigation:
[Reply to this message]
|