convertmp3
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
#!/bin/bash | |
# Convert lots of *.flac into *.mp3 for consumption in devices without flac support | |
# Usage is: | |
# $ cd yourflacfolder | |
# $ convertmp3 | |
# Files will be created in a new directory | |
MP3DIR="`basename \"$PWD\"` - mp3" | |
mkdir -p "$MP3DIR" | |
for f in *.flac; | |
do | |
flac -d "$f" "${f%.flac}.wav"; | |
mv "${f%.flac}.wav" "$MP3DIR/" | |
done | |
cd "$MP3DIR" | |
for f in *.wav; | |
do | |
lame --preset fast extreme "$f" "${f%.wav}.mp3"; | |
rm "$f" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment