Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- # Simple FLAC to MP3 converter
- # Requires 'flac' and 'lame' packages
- # Author: smok (http://smok.zoxt.net/)
- # Save it as ~/flac2mp3.sh, chmod +x it, and call from direcory with *.flac files.
- for ffile in *.flac;
- do
- ARTIST=`metaflac "$ffile" --show-tag=ARTIST | sed s/.*=//g`
- TITLE=`metaflac "$ffile" --show-tag=TITLE | sed s/.*=//g`
- ALBUM=`metaflac "$ffile" --show-tag=ALBUM | sed s/.*=//g`
- GENRE=`metaflac "$ffile" --show-tag=GENRE | sed s/.*=//g`
- TRACKNUMBER=`metaflac "$ffile" --show-tag=TRACKNUMBER | sed s/.*=//g`
- DATE=`metaflac "$ffile" --show-tag=DATE | sed s/.*=//g`
- flac -dc "$ffile" | lame --quiet -b 320 --tt "$TITLE" --ta "$ARTIST" --tl "$ALBUM" --tn "$TRACKNUMBER" --tg "$GENRE" --ty "$DATE" - "`echo "$ffile" | sed s/\.flac$/\.mp3/g`"
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement