Added some new scripts
[videoscripts/.git] / mp4tomp3
diff --git a/mp4tomp3 b/mp4tomp3
new file mode 100755 (executable)
index 0000000..ca69306
--- /dev/null
+++ b/mp4tomp3
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+INPUT=$1
+START=$2
+STOP=$3
+
+if [[ -n $START ]]; then
+  START="-ss $START"
+fi
+
+if [[ -n $STOP ]]; then
+  STOP="-t $STOP"
+fi
+
+if [[ -z INPUT ]]; then
+  echo "usage: $0 <input> [<start> <stop>]"
+fi
+
+ffmpeg $START $STOP -i $INPUT -acodec libmp3lame -ab 128k $INPUT.mp3