Jump to content

Encoding an audio file with PHP (converting from CAF)... using LAME?


Recommended Posts

Hey all,

 

So I have .caf files that are recorded from my iOS applications and uploaded to my server.  Ultimately I want to play these recordings within my website using jPlayer (a jQuery plugin: http://www.jplayer.org), which means they need to be converted from the .caf format.  The encoding cannot be done on the mobile device, or so I am told, being that it is too processor intensive.  This leaves the webserver...

 

So far I've had very little luck finding any way to convert the file using PHP.  I assumed that it would be easy enough to use something like LAME to encode the caf into a mp3.  I've seen a few cryptic references to doing exactly this in my google searches, but no definitive information.

 

Can anybody shed some light on the situation?

 

Thanks.

I've done this by having PHP put the file into a storage location, and populating a database table that a cron script runs to encode the file.  You probably could just as easily use the shell_exec() function in your upload script, but you might run into timeout issues if it takes too long to encode.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.