Can I calculate length of audio files wav or mp3?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
gertrudis
Forum Newbie
Posts: 14
Joined: Wed Jan 27, 2010 8:15 pm

Can I calculate length of audio files wav or mp3?

Post by gertrudis »

Hi to all.
Could be some way to calculate the length of a wav file using php?

My problem:
I'm receiving a list of file recorded in wav format that i have to convert to mp3 and then save a link to the file name, file size and duration to mysql table.
everything it ok, but I don't have duration in minutes or second of the recording.

I don't know how to get it using php.


Thanks a lot in advance.
buckit
Forum Contributor
Posts: 169
Joined: Fri Jan 01, 2010 10:21 am

Re: Can I calculate length of audio files wav or mp3?

Post by buckit »

give this a look

http://getid3.org/
gertrudis
Forum Newbie
Posts: 14
Joined: Wed Jan 27, 2010 8:15 pm

Re: Can I calculate length of audio files wav or mp3?

Post by gertrudis »

Thanks a lot Buckit
Post Reply