diff options
author | David Runge <david.runge@frqrec.com> | 2013-12-31 14:19:23 +0100 |
---|---|---|
committer | David Runge <david.runge@frqrec.com> | 2013-12-31 14:19:23 +0100 |
commit | 931c8711d64b50c240c5cf1079480094dbde9ff1 (patch) | |
tree | 330d282d31afdf14412a60569d87e86603bcae9b /bin/flac2mp3 | |
parent | d9fd1d6971d8b3d71a0f1556a3b5d29ea6641ac2 (diff) | |
download | dotfiles-931c8711d64b50c240c5cf1079480094dbde9ff1.tar.gz dotfiles-931c8711d64b50c240c5cf1079480094dbde9ff1.tar.bz2 dotfiles-931c8711d64b50c240c5cf1079480094dbde9ff1.tar.xz dotfiles-931c8711d64b50c240c5cf1079480094dbde9ff1.zip |
Adding new scripts from /usr/local/bin and updating backup-profiles and autostart
Diffstat (limited to 'bin/flac2mp3')
-rwxr-xr-x | bin/flac2mp3 | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/bin/flac2mp3 b/bin/flac2mp3 new file mode 100755 index 0000000..9dd970b --- /dev/null +++ b/bin/flac2mp3 @@ -0,0 +1,19 @@ +find -name *.flac -print0 | while read -d $'\0' a + + +do +OUTF=`echo "$a" | sed s/\.flac$/.mp3/g` + +ARTIST=`metaflac "$a" --show-tag=ARTIST | sed s/.*=//g` +TITLE=`metaflac "$a" --show-tag=TITLE | sed s/.*=//g` +ALBUM=`metaflac "$a" --show-tag=ALBUM | sed s/.*=//g` +GENRE=`metaflac "$a" --show-tag=GENRE | sed s/.*=//g` +TRACKNUMBER=`metaflac "$a" --show-tag=TRACKNUMBER | sed s/.*=//g` +DATE=`metaflac "$a" --show-tag=DATE | sed s/.*=//g` + +flac -c -d "$a" | lame -m j -q 0 --vbr-new -V 0 -s 44.1 - "$OUTF" +id3 -t "$TITLE" -T "${TRACKNUMBER:-0}" -a "$ARTIST" -A "$ALBUM" -y "$DATE" -g "${GENRE:-12}" "$OUTF" + +done + + |