views:

8378

answers:

2

Hello everybody.

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.

A: 

Hey, try 'afconvert -f mp4f -d aac -v input.caf output.mp3'

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...! ? Hope it helps

+6  A: 

you should check this,

afconvert -f mp4f -d aac -b 128000   input.caf output2.mp3

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.

Guvener Gokce