Re: Regarding Accesing mp3 with php

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

 



tedd wrote:
At 10:02 AM +0530 6/26/09, Gautam Bhatia wrote:
hello all,
             Is there anyway in php by which i can get the total play
time of a mp3 , I found some information while doing the google thing
using some 3rd party plug ins like getID3 but without any luck, Any help
in this case would be helpful. Thank you.
Regards,

Gautam Bhatia .

Gautam:

I think that play time would be proportional to file size, right?

If so, then take two files and play them. Note the play times and file sizes of both and work out a algorithm. That would be the way I would try to solve it.

Dear $_DEITY no. Filesize is barely related to play time. He's going aboutit the correct way, using existing libraries that know how retrieve the information. I would probably try ffplay (part of ffmpeg package):

    ffplay -an -stats THE_FILE.mp3

You'll see a line with the duration:

Input #0, mp3, from 'THE_FILE.mp3':
  Duration: 00:03:35.10, start: 0.000000, bitrate: 127 kb/s
    Stream #0.0: Audio: mp3, 44100 Hz, stereo, s16, 128 kb/s

Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for 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