13 December 2011

HowTo: Batch-Converting m4a files to mp3 (command line)

If you buy songs in *.m4a (or ma4) format but, like me, your car stereo plays *.mp3 audio files only, here is a commandline script to convert all the m4a/ma4 files in the local directory to mp3 at 320 audio bitrate (the highest offered by mp3)

for f in *.m4a; do ffmpeg -i "$f" -acodec libmp3lame -ab 320 "${f%.m4a}.mp3"; done

0 comments: