From aead500d329de5c1f662e4e1acf094514cb350a8 Mon Sep 17 00:00:00 2001 From: Bastian Dehn Date: Sat, 4 Jun 2022 18:23:01 +0200 Subject: [PATCH] add: encode mp4 with apply replaygain option --- albentohandy | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/albentohandy b/albentohandy index 6812092..77006c3 100755 --- a/albentohandy +++ b/albentohandy @@ -66,12 +66,15 @@ ReadFlacToMp3Tags() --title=\"$TITLE\" \ --album=\"$ALBUM\" \ --genre=\"${GENRE:-12}\" \ - --track=\"${TRACKNUMBER:-0}\" --recording-date=\"$DATE\" \ - --user-text-frame=\"$RRL\" \ - --user-text-frame=\"$RTG\" \ - --user-text-frame=\"$RTP\" \ - --user-text-frame=\"$RAG\" \ - --user-text-frame=\"$RAP\"" + --track=\"${TRACKNUMBER:-0}\" --recording-date=\"$DATE\"" + + if [ -z $replaygainapply ]; then + local eyed3Command="$eyed3Command --user-text-frame=\"$RRL\" \ + --user-text-frame=\"$RTG\" \ + --user-text-frame=\"$RTP\" \ + --user-text-frame=\"$RAG\" \ + --user-text-frame=\"$RAP\"" + fi # add cover picture to command if [ -f $INPUTFILEDIR/cover.jpg ]; then @@ -92,7 +95,8 @@ EncodingFlacToMp3() local readonly OUTPUTFILE="$2" # stream flac into the lame encoder - nice --adjustment=10 flac --silent --stdout --decode "$INPUTFILE" \ + nice --adjustment=10 flac --totally-silent --stdout --decode \ + $replaygainapply "$INPUTFILE" \ | nice --adjustment=15 lame --silent \ -b 192 --noreplaygain - "$OUTPUTFILE" } -- 2.47.3