Leider musste ich das Serendipity neu installieren und alle alten Einträge löschen. Aber so viele waren es ja nicht.
Hier nun also die beiden Transcoder-Scripte (tags werden beibehalten):
1.: (flac->mp3)
#! /bin/bash
for i in *.flac; do
title=$(metaflac --show-tag=title "$i"|sed s/"TITLE="//)
artist=$(metaflac --show-tag=artist "$i"|sed s/"ARTIST="//)
album=$(metaflac --show-tag=album "$i"|sed s/"ALBUM="//)
year=$(metaflac --show-tag=date "$i"|sed s/"DATE="//)
genre=$(metaflac --show-tag=genre "$i"|sed s/"GENRE="//)
track=$(metaflac --show-tag=tracknumber "$i"|sed s/"TRACKNUMBER="//)
flac -d -o tmp.wav "$i"
lame --preset fast standard -h --add-id3v2 --tt "$title" --ta "$artist" --tl "$album" --ty "$year" --tn "$track" --tg "$genre" tmp.wav $(basename "$i" .flac).mp3
rm tmp.wav
done
exit 0
2.: (ape->mp3)
#! /bin/bash
for i in *.ape; do
album=$(apetag -i "$i" | grep -i album | sed s/"Album\" "// | sed s/"\""//g);
artist=$(apetag -i "$i" | grep -i artist | sed s/"Artist\" "// | sed s/"\""//g);
genre=$(apetag -i "$i" | grep -i genre | sed s/"Genre\" "// | sed s/"\""//g);
title=$(apetag -i "$i" | grep -i title | sed s/"Title\" "// | sed s/"\""//g);
track=$(apetag -i "$i" | grep -i track | sed s/"Track\" "// | sed s/"\""//g);
year=$(apetag -i "$i" | grep -i year | sed s/"Year\" "// | sed s/"\""//g);
ffmpeg -i "$i" -f wav tmp.wav
lame --preset fast standard -h --add-id3v2 --ta "$artist" --tt "$title" --tl "$album" --tg "$genre" --tn "$track" --ty "$year" tmp.wav "$(basename "$i" .ape)".mp3
rm tmp.wav
done
exit 0