(cons 'geek 'culture)

Cutting edge culture for geeks...

Thursday, August 23, 2007

A Quick Hack to Convert m4a to mp3 in Linux

As I was getting ready for my eight hour car trip back to MTU, I wanted some music to ease the pain of the long trip. I do not own a portable MP3 player, so everything I wanted was going to have to be burned to an audio CD (I use GnomeBaker to do this). The only issue was, most of my Pink Floyd music was in M4A format, and GnomeBaker only handles OGG/MP3 for inclusion in an audio CD. So without further ado, here is the code for the bash script I wrote to convert M4A's to MP3:


#!/bin/bash

for i in *.m4a; do
  faad -o - "$i" lame - "${i%.m4a}.mp3"
done


After this ran, I also executed a rm *m4a. Enjoy!

Labels: , ,

1 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home