wavenc/main.sh

13 lines
518 B
Bash
Raw Permalink Normal View History

2024-11-26 08:21:53 +00:00
#!/usr/bin/env bash
2024-11-26 08:25:04 +00:00
# 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
2024-11-26 08:21:53 +00:00
array=("DATE" "TOTALTRACKS" "TRACKNUMBER" "ALBUM" "ARTIST" "TITLE")
2024-11-26 18:37:48 +00:00
trap "echo Exited!; exit;" SIGINT SIGTERM
for i in *.flac ; do
filename=${i%.*};
2024-11-26 08:25:04 +00:00
flac --decode -c "$i" | wavpack -i $1 "-" -hhb2 -y -o "$filename.wv";
2024-11-26 18:37:48 +00:00
for n in ${array[@]}; do
tag=`metaflac --show-tag=$n "$i"`;
wvtag -w "$tag" "$filename.wv" ;
done
done