Script zum schnellen komprimieren von Audio-Kapiteln

This commit is contained in:
2026-07-22 22:34:46 +02:00
parent c52abe6829
commit fa8365dbd0

19
compact.sh Executable file
View File

@@ -0,0 +1,19 @@
#!/bin/sh
cd "$(dirname "$0")"
CHAPTER="$1"
if test -z "$CHAPTER" || test -f "audio/$CHAPTER.mp3"; then
echo "Usage: $0 <chapter>" >&2
exit 1
fi
sox part* output.wav
ffmpeg -i output.wav audio/$CHAPTER.mp3
if [ $? -eq 0 ]; then
rm output.wav part*.wav
fi
echo "Done"