Last active
August 29, 2015 14:17
-
-
Save ShigekiKarita/51225aecb7ca68cd820f to your computer and use it in GitHub Desktop.
FLAC to MP3 converter
This file contains hidden or 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
# convert extension | |
mv_ext() { | |
for nm in *.${1}; do | |
mv $nm ${nm%.${1}}.${2}; | |
done | |
} | |
# ffmpeg required | |
flac2mp3() { | |
1=${1:-"128"} | |
2=${2:-"*.flac"} | |
find . -name "*.flac" -exec ffmpeg -i {} -ab ${1}k {}.mp3 \; | |
mv_ext flac.mp3 mp3 # fix extension | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment