7

I have a CAF server on my Ubuntu 9.10 server and I need to convert them to MP3 or WAV. I have already tried with pacpl and ffmpeg, but it didn't work (I don't have the right encodings in Ubuntu).

Does anyone know how to convert the CAF file in Ubuntu?

Edit:

The output of the pacpl command (pacpl input.caf -to mp3) is:

Converting: [test.caf] -> [mp3] decode failed with exit status: 256 Total files converted: 0, failed: 1

pacpl 6a27cb1fcd120491531eb8b984c536bd.caf -t wav Perl Audio Converter - 4.0.5

When decoding a Wav:

Converting: [6a27cb1fcd120491531eb8b984c536bd.caf] -> [wav] decode failed with exit status: 256

Total files converted: 0, failed: 1

1 Answer 1

7

Times have changed from the days of Ubuntu 9.10 (when this question was originally asked) and now a modern version of FFmpeg in a recent Ubuntu release has both an encoder and decoder for the caf (Core Audio Format) container. Test your own modern version of FFmpeg as follows for 'D'ecoding and 'E'ncoding with caf:

ffmpeg -formats 2>/dev/null | grep caf
 DE caf             Apple CAF (Core Audio Format)

We can test with the following sample .caf file:

wget samples.mplayerhq.hu/A-codecs/caf/waterfall.caf

And an easy conversion to mp3 with FFmpeg:

ffmpeg -i waterfall.caf -hide_banner -ac 1 test.mp3
[caf @ 0x66e8c0] Estimating duration from bitrate, this may be inaccurate
Guessed Channel Layout for Input Stream #0.0 : mono
Input #0, caf, from 'waterfall.caf':
  Duration: 00:00:01.95, start: 0.000000, bitrate: 722 kb/s
    Stream #0:0: Audio: pcm_s16le (lpcm / 0x6D63706C), 44100 Hz, mono, s16, 705 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (pcm_s16le (native) -> mp3 (libmp3lame))
Press [q] to stop, [?] for help
Output #0, mp3, to 'test.mp3':
  Metadata:
    TSSE            : Lavf58.10.100
    Stream #0:0: Audio: mp3 (libmp3lame), 44100 Hz, mono, s16p
    Metadata:
      encoder         : Lavc58.13.100 libmp3lame
size=      16kB time=00:00:01.96 bitrate=  65.7kbits/s speed=75.6x    
video:0kB audio:16kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.429291%

How cool is the command line :)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .