Skip to content

Instantly share code, notes, and snippets.

@loderunner
Last active August 29, 2015 14:01
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save loderunner/7c96b772053063ba2a3d to your computer and use it in GitHub Desktop.
Save loderunner/7c96b772053063ba2a3d to your computer and use it in GitHub Desktop.
Converts all flac files in the directory to high-quality mp3
#!/bin/sh
# Converts all flac files in the directory to high-quality mp3
for flacfile in *.flac
do
flac --decode "$flacfile"
wavfile="${flacfile:0:(${#flacfile}-4)}wav"
lame -b320 -q0 -ms "$wavfile"
rm "$wavfile"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment