From: Bastian Dehn Date: Mon, 11 Jul 2016 14:33:16 +0000 (+0200) Subject: Bitrate,Mode configure in .flactomp3v2.conf X-Git-Tag: v1.0.0^2~143 X-Git-Url: https://gitweb.hhaalo.de/?a=commitdiff_plain;h=655ac8af579b8b2b756250ab994bccb7a0262b05;p=albentohandy.git Bitrate,Mode configure in .flactomp3v2.conf --- diff --git a/flactomp3v2.sh b/flactomp3v2.sh index b051258..49c6884 100755 --- a/flactomp3v2.sh +++ b/flactomp3v2.sh @@ -1,5 +1,14 @@ #!/bin/bash +# Default options +BITRATE=192 +MODE="j" + +if [ -f $HOME/.flactomp3v2.conf ] +then + source $HOME/.flactomp3v2.conf +fi + a=$1 # give output correct extension OUTF="${a[@]/%flac/mp3}" @@ -18,7 +27,7 @@ RAG=$(metaflac "$a" --show-tag=REPLAYGAIN_ALBUM_GAIN | sed s/.*=//g) RAP=$(metaflac "$a" --show-tag=REPLAYGAIN_ALBUM_PEAK | sed s/.*=//g) # stream flac into the lame encoder -flac -s -c -d "$a" | lame --silent -b 192 -m j --noreplaygain - "$OUTF" +flac -s -c -d "$a" | lame --silent -b $BITRATE -m $MODE --noreplaygain - "$OUTF" # ID3v2.3 tagging if [ -f ${a%/*}/cover.jpg ]