From 9b2bb95215e80dfcef3f4e1251124422ee7ddc6c Mon Sep 17 00:00:00 2001 From: Bastian Dehn Date: Sat, 4 Jun 2022 18:05:22 +0200 Subject: [PATCH] add: encode vorbis with apply replaygain option --- albentohandy | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) 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" - } -- 2.47.3