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)" \
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" -
}