Re: Regarding Accesing mp3 with php
| From: | Robert Cummings | Date: | Fri, 26 Jun 2009 14:53:12 +0000 |
| Subject: | Re: Regarding Accesing mp3 with php | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-294648@lists.php.net to get a copy of this message | ||
tedd wrote:
At 10:02 AM +0530 6/26/09, Gautam Bhatia wrote: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):hello all,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.Is there anyway in php by which i can get the total playtime 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 .
ffplay -an -stats THE_FILE.mp3You'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/sCheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP