My audio container is M4A, but codec is AAC. When I try to convert it into MP3 I got an error:
afconvert ~/Desktop/src.m4a -f MPG3 -d .mp3 ~/Desktop/dst.mp3
Error: ExtAudioFileSetProperty ('cfmt') failed ('fmt?')
Could you just use ffmpeg?
ffmpeg -i file.m4a -aq 2 file.mp3
-aq 2 corresponds to -V2 in lame. ffmpeg preserves tags but not cover art.
-c:v copy
it might copy the cover art over as well.