I am using the afconvert command line utility to convert an audio file from .caf
to .mp3
format. I have used afconvert
:
afconvert -f 'MPG3 ' -d '.mp3' -v input.caf output.mp3
But this gives me the following error:
Input file: input.caf, 19008 frames
Error: ExtAudioFileSetProperty ('cfmt') failed ('fmt?')
I have also tried the following:
afconvert -f 'MPG3 ' -d LEI32@44100 -v input.caf output.mp3
This also gives me the error:
Input file: min.caf, 19008 frames
Error: ExtAudioFileCreateWithURL failed ('fmt?')
I couldn't figure out why is this giving error.
Can anybody guide me in solving this problem?
Thanks in an advance.
you should check this,
This way you will convert your CAF file to the MPEG-4 format.
Read: Apple does not ship any form of MP3 encoder with Mac OS X aside from the one built into iTunes. source: http://lists.apple.com/archives/coreaudio-api/2005/Jul/msg00182.html
you should use 3rd party encoders if you need to encode mp3 Mp3 Encoder examples: lame encoder or ffmpeg :) good luck.
You can install LAME encoder and use it.
If you have Mac Ports (if don't - just search and install), just run:
First, you will have to convert caf to wav (I had no chance to check if LAME supports caf as input, but it supports wav for sure). Then run
This will create mp3 file with 128 kbps constant bitrate. LAME has lot of settings, you can choose mp3 parameters as you wish.
try this:
I know it's not exactly mp3, but I couldn't get around that same error you are getting, so I tried mp4f and it worked.