Skip to content

Instantly share code, notes, and snippets.

@brendanjcaffrey
Created June 17, 2016 21:28
Show Gist options
  • Save brendanjcaffrey/1b5ed1bf3397ee0edda847110ca66b16 to your computer and use it in GitHub Desktop.
Save brendanjcaffrey/1b5ed1bf3397ee0edda847110ca66b16 to your computer and use it in GitHub Desktop.
convert audio files to mp3
brew install libav
cd ~/Music/iTunes/iTunes\ Music/[artist]/[album]/
for file in *.aif; do avconv -i "$file" -f mp3 -acodec libmp3lame -ab 320000 -ar 44100 "$file.mp3"; done
open .
-- make sure new mp3 files look good
rm *.aif
for file in *.aif.mp3; do new=`echo $file | sed "s|.aif||"`; mv "$file" "$new"; done
-- go into itunes, click on song you converted, locate, pick new mp3 file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment