summaryrefslogtreecommitdiffstats
path: root/bin/ogg-maker
diff options
context:
space:
mode:
Diffstat (limited to 'bin/ogg-maker')
-rwxr-xr-xbin/ogg-maker14
1 files changed, 14 insertions, 0 deletions
diff --git a/bin/ogg-maker b/bin/ogg-maker
new file mode 100755
index 0000000..4528df2
--- /dev/null
+++ b/bin/ogg-maker
@@ -0,0 +1,14 @@
+#!/bin/sh
+filename="$1"
+outname=$(echo $1 | sed 's/^\(.*\)\..*/\1/').ogg
+if [ "$filename" == "$outname" ]; then
+ ffmpeg -i $filename tmp_$filename
+ sox --norm=3 $filename tmp_$filename silence 1 0.1 1% reverse silence 1 0.1 1% reverse rate 44100
+ vorbisgain ${filename}tmp
+ mv tmp_$filename $filename
+else
+ ffmpeg -i $filename $outname
+ sox --norm=-3 $filename $outname silence 1 0.1 1% reverse silence 1 0.1 1% reverse rate 44100
+ vorbisgain $outname
+ rm $filename
+fi