From 655ac8af579b8b2b756250ab994bccb7a0262b05 Mon Sep 17 00:00:00 2001 From: Bastian Dehn Date: Mon, 11 Jul 2016 16:33:16 +0200 Subject: [PATCH] Bitrate,Mode configure in .flactomp3v2.conf --- flactomp3v2.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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 ] -- 2.47.3