wavenc/main.sh
2024-11-26 18:37:48 +00:00

13 lines
518 B
Bash

#!/usr/bin/env bash
# The getopt are for extra param, i like to use -x6 for extra encode processing
# You can read more on the docs: https://www.wavpack.com/wavpack_doc.html
array=("DATE" "TOTALTRACKS" "TRACKNUMBER" "ALBUM" "ARTIST" "TITLE")
trap "echo Exited!; exit;" SIGINT SIGTERM
for i in *.flac ; do
filename=${i%.*};
flac --decode -c "$i" | wavpack -i $1 "-" -hhb2 -y -o "$filename.wv";
for n in ${array[@]}; do
tag=`metaflac --show-tag=$n "$i"`;
wvtag -w "$tag" "$filename.wv" ;
done
done