Script zum schnellen komprimieren von Audio-Kapiteln
This commit is contained in:
19
compact.sh
Executable file
19
compact.sh
Executable 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"
|
||||
Reference in New Issue
Block a user