# Encode # v0.2 18.08.08 - Second draft, changed the default to lame 3.97 as this is what's in the Ubuntu repositories # v0.1 17.08.08 - First created # Darren O'Connor # This script, when run in a folder full of FLAC files, will create high quality VBR mp3's for use in mp3 players. # This version uses lame 3.98 and 3.97. Please edit out the appropriate line below (Don't leave them both in!) #!/bin/bash mkdir wav/ flac -d *.flac mv *.wav wav/ cd wav/ for f in *.wav; do mv "$f" "${f%.wav}";done mkdir ../mp3/ # If you use lame 3.98 then comment IN the next line and comment out the following line # find -maxdepth 1 -type f -name '*' -exec lame -V0 -q0 '{}' -o '../mp3/{}' \; # If you use lame 3.97 then comment IN the next line and comment OUT the previous line find -maxdepth 1 -type f -name '*' -exec lame --vbr-new -V0 -q0 '{}' -o '../mp3/{}' \; cd ../mp3/ for FILE in *; do mv "$FILE" "$FILE.mp3"; done cd ../ rm -r wav/