Page 1 of 1

audio uploader that converts to MP3

Posted: Sun Mar 04, 2007 8:27 pm
by Ju-Pao
I would like to make a PHP code that uploads an audio file and converts the file to mp3 before saving in the disk... can anyone suggest a tutorial or functions that can help me in my problem?

thanks for the notice :)

Posted: Sun Mar 04, 2007 9:41 pm
by feyd
I believe you'll need a library or command line function (like "lame") to encode the file to mp3.

As for uploading in php.. http://php.net/features.file-upload

Posted: Mon Mar 05, 2007 12:30 am
by Chris Corbyn
I'm not sure what lame's licensing terms are for things like this. I know applications can't bundle the lame encoder with them (at least, they couldn't a few years back). You might wan't to look into that.

EDIT | Also, rather than using exec() or similar, you'll probably want to use proc_open() so you can detect failures and read from stdin/stdout/stderr.

Posted: Mon Mar 05, 2007 9:19 pm
by Ju-Pao
thanks for the reply guys :D