RE: Determining the length (in an audio sense) of an MP3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Haven't looked specifically at mp3 but with most sound formats the "sample
rate" divided into the number of characters in the file should produce the
time length (i.e. 22000 samples per second divided into a 440000 byte data
length results in 20 seconds of sound).  Seems to me that with most formats
(wav, etc) the sample rate is recorded with the data so that the player can
play back at the correct rate.  Not familiar with oog but did find some
references to ogg (google is your friend here).

http://www.borg.com/~jglatt/tech/wave.htm

Google produced the following on mp3

http://mpgedit.org/mpgedit/mpeg_format/MP3Format.html
http://mpgedit.org/mpgedit/mpeg_format/mpeghdr.htm

Hope this helps,

Warren Vail


-----Original Message-----
From: Paul Reinheimer [mailto:preinheimer@xxxxxxxxx] 
Sent: Thursday, October 07, 2004 4:04 PM
To: php-general@xxxxxxxxxxxxx
Subject:  Determining the length (in an audio sense) of an MP3


Hi,

I am trying to determine the length (in terms of seconds) of an MP3 file. I
have seen the ID3 pear project, but I didn't see anything there to tell me
how long the song was. There is a fileinfo pecl project, but it doesn't
mention MP3s and I couldn't find any good documentation for it (looking at
the pecl site).

Does anyone know of an decent way to determine the length of a song? What
about other formats (oog, wav, etc?).


thanks
paul

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux