iosffmpegoggcafafconvert

How to convert iphone's caf to ogg on ubuntu


i really need your support to solve that problem:

We developed an iOS application that sends a sound file to our server and then, we share this audio.

The problem is we didnt find any solution to convert the audio inside the iOS.

We tought: Ok, thats a problem, but we can still convert the audio in the server right?

We are trying to make this using afconvert, ffmpeg but with no sucess.

Do you have any basic guide or hint so we can write this in our server application and convert all the .CAF files to another format like OGG or MP3?

Thanks a lot!


Solution

  • Ubuntu sox seems to be broken. In principle:

    sox input.caf output.wav

    However it returns an error: sox FAIL formats, etc.

    The solution: download sox source code from upstream (sox.sf.net), configure make install. Be sure to have libsndfile1-dev installed (sndfile: yes, on the configure output). Now repeat the operation.

    [edit: the problem is a little worse, looks like it's related to a path bug, so when use the following configure command line: configure --prefix=/opt/sox, then set your path as necessary]