Last active
August 29, 2015 14:08
-
-
Save earlcochran/55d22ba2905c41a6c2dc to your computer and use it in GitHub Desktop.
Convert FLAC files to LAME V0 mp3's
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ ! -d "mp3" ]; then | |
mkdir mp3 | |
fi | |
for f in *.flac; do | |
for tag in TITLE ARTIST ALBUM DATE COMMENT TRACKNUMBER TRACKTOTAL GENRE; do | |
eval "$tag=\"`metaflac --show-tag=$tag "$f" | sed 's/.*=//'`\"" | |
done | |
flac -cd "$f" | lame -V0 -q0 --noreplaygain --tt "$TITLE" --ta "$ARTIST" \ | |
--tl "$ALBUM" --ty "$DATE" --tc "$COMMENT" --tn "$TRACKNUMBER/$TRACKTOTAL" --tg "$GENRE" - mp3/"${f%.*}".mp3; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment