aboutsummaryrefslogtreecommitdiff
path: root/stereo2mono.sh
diff options
context:
space:
mode:
Diffstat (limited to 'stereo2mono.sh')
-rwxr-xr-xstereo2mono.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/stereo2mono.sh b/stereo2mono.sh
new file mode 100755
index 0000000..6020263
--- /dev/null
+++ b/stereo2mono.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+find res/sound/ -type f \( -name "*.mp3" -o -name "*.wav" -o -name "*.ogg" \) -print0 |
+while IFS= read -r -d '' file; do
+ out="res/mono/${file#res/sound/}"
+ out="${out%.*}.ogg"
+
+ mkdir -p "$(dirname "$out")"
+ ffmpeg -i "$file" -ac 1 "$out"
+done