Re: duration of mp3 file

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

 



Or you could use ffmpeg executable to get details about the media file.
You will have to parse the response of the executable.
The only thing is that you must have exec function or an execution
function available and ffmpeg installed.
This is for linux machines tho... Don't know if ffmpeg is available for
windows too.

Andy

Steven Macintyre wrote:
> Shyte ... 
>
> The files are VBR ... I will read up and when I find answer - will revert to
> list with it as well..
>
> Ps. 
>
> Everyone is a bunny to me :P
>
> S
>
>   
>> -----Original Message-----
>> From: Jim Moseby [mailto:JMoseby@xxxxxxxxxxxxxxxxx]
>> Sent: 11 July 2007 03:55 PM
>> To: 'Steven Macintyre'; php-general@xxxxxxxxxxxxx
>> Subject: RE:  duration of mp3 file
>>
>>     
>>> Allow bunnies ...
>>>
>>> Any takers on this ... I JUST want the duration of the mp3
>>> file - with a
>>> small function if possible ... I honestly don't want to use a
>>> class like
>>> http://www.phpclasses.org/browse/package/112.html
>>>
>>> The coding is terrible and SERIOUSLY over inflated for what I
>>>       
>> want.
>>     
>>> Anyone know of a simple class / function ?
>>>
>>> S
>>>
>>>       
>> Apparently, you can read the header of the file to find the
>> bitrate, then
>> calculate the approximate play duration from that info and the
>> filesize.
>> Here is information on the mp3 file format:
>>
>> http://mpgedit.org/mpgedit/mpeg_format/mpeghdr.htm
>>
>> ...and here is a discussion thread that provides the calculation
>> and other
>> links:
>>
>> http://www.hydrogenaudio.org/forums/lofiversion/index.php/t46563.ht
>> ml
>>
>> I've never done this, and apparently there is an issue with MP3s
>> that have
>> variable bitrates, but maybe this will get you started in the right
>> direction.
>>
>> HTH - JM <-- not anything like a bunny ;-)
>>     
>
>   

[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