Posted by smok on Sun 12 Apr 23:20 (modification of post by view diff)
report abuse | download | new post
- #!/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
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.