Sat Aug 1 08:50:22 PDT 2015

Converting .M4A Files to .MP3 Format

If you have used iTunes in default mode to create a library of music for your iPod you may need to convert the resulting .m4a files to .mp3 format. MPlayer can do this for you - here are the necessary commands, in the form of a simple shell script:

#!/bin/sh
for FILE in *.m4a 
do 
  mplayer.exe -vc null -vo null -ao pcm:fast $FILE -ao pcm:file="temp.wav"
  lame -h -V2 --vbr-new temp.wav `basename $FILE .m4a`.mp3
done

You will be left with a temp.wav file in the current directory - delete it (and the .m4a files, if you want) after the conversion.


Posted by ZFS | Permanent link | File under: bash