From: Bastian Dehn Date: Sat, 4 Jun 2022 16:05:22 +0000 (+0200) Subject: add: encode vorbis with apply replaygain option X-Git-Tag: v1.0.0^2~57^2~2 X-Git-Url: https://gitweb.hhaalo.de/?a=commitdiff_plain;h=9b2bb95215e80dfcef3f4e1251124422ee7ddc6c;p=albentohandy.git add: encode vorbis with apply replaygain option --- diff --git a/albentohandy b/albentohandy index e964d24..6812092 100755 --- a/albentohandy +++ b/albentohandy @@ -168,8 +168,14 @@ ReadFlacToOggTags() local readonly OUTPUFILE="$2" local readonly COVERFILE="${INPUTFILE%/*}/cover.txt" - metaflac --export-tags-to=- $INPUTFILE \ - | vorbiscomment --commentfile - --write $OUTPUTFILE + if [ -z "$replaygainapply" ]; then + metaflac --export-tags-to=- $INPUTFILE \ + | vorbiscomment --commentfile - --write $OUTPUTFILE + else + metaflac --export-tags-to=- $INPUTFILE \ + | sed '/REPLAYGAIN/d' \ + | vorbiscomment --commentfile - --write $OUTPUTFILE + fi if [ -f $COVERFILE ]; then echo "METADATA_BLOCK_PICTURE=$(base64 --wrap 0 $COVERFILE)" \ @@ -182,7 +188,8 @@ EncodingFlacToOgg() local readonly INPUTFILE="$1" local readonly OUTPUTFILE="$2" - nice --adjustment=10 flac --silent --stdout --decode "$INPUTFILE" \ + nice --adjustment=10 flac --totally-silent --stdout --decode \ + $replaygainapply "$INPUTFILE" \ | nice --adjustment=15 oggenc --quiet --quality 6 \ --output "$OUTPUTFILE" - }