Skip to content

Instantly share code, notes, and snippets.

@williamrowell
Created June 8, 2015 02:01
Show Gist options
  • Save williamrowell/f11f1a5d88586e8d838f to your computer and use it in GitHub Desktop.
Save williamrowell/f11f1a5d88586e8d838f to your computer and use it in GitHub Desktop.
transcode all flac files into mp3
#!/bin/sh
mkdir mp3
for I in *.flac; do
flac -d --stdout "$I" | lame -V0 --vbr-new - mp3/"$I"
done
for J in *.flac; do
id3cp -2 "$J" mp3/"$J"
done
for K in mp3/*.flac; do
base=`basename "$K" .flac`
mv "$K" mp3/"$base".mp3
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment