Convert CAF to MP3 or WAV?

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 :)