Audio preview extraction

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
aerciofilho
Forum Newbie
Posts: 1
Joined: Thu May 25, 2006 9:36 am

Audio preview extraction

Post by aerciofilho »

Hi all,

I'm working on a system that shall provide the capability of uploading audio files, such as mp3 and midis. After performing the upload, the system must extract an audio preview (a few secs of the audio file). Does anyone have any idea how to do this? I mean, is it possible?

Thanks in advance.

Aércio
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

yes, it's possible. There are many tools out there that can convert from mp3/midi to basic PCM sound format which is the easiest to extract sound data from.
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Post by onion2k »

Not really feasible in pure PHP, but if you're able to run commandline tools then it should be possible using something like SoX called from exec(). Bit of a guess though..
Post Reply