Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I am trying to use afconvert to convert a .mp3 to .m4r. I am entering the following:

afconvert -f m4af -d aac -o input.mp3 tone.m4r

However, this gives me an error:

Error: Couldn't open input file (-43)

I am in the directory of the input file. Could someone please shed some light on what I am doing wrong?

share|improve this question

2 Answers 2

up vote 0 down vote accepted

Drop the -o flag, I think. You are specifying input.mp3 as an output file, and then tone.m4r becomes the input file. See the output of afconvert -h.

share|improve this answer

I tried to run afconvert -f m4af -d aac -o output.aac input.mp3 and it worked perfectly. And according to the man page, it probably isn't beneficial or necessary to use the -o flag, just afconvert -f m4af -d aac input.mp3 output.aac would be fine also.

Have you checked the permissions? I tried to chmod 000 input.mp3 the file and subsequently rerun your command and it returned the same error. Try to run file input.mp3 and see if other Unix utilities can read that file. If so, I guess the problem is just that the error description from afconvert is not clear enough. And its man page seems to be badly written.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.