summaryrefslogtreecommitdiffstats
path: root/tools/duration
diff options
context:
space:
mode:
authorOle Kristian Lien <ole.k.lien@gmail.com>2009-11-30 07:48:55 +0000
committerOle Kristian Lien <ole.k.lien@gmail.com>2009-11-30 07:48:55 +0000
commit60111523edcd9b4e4c93ee9bcda221afa6845154 (patch)
tree0b40b0371723f1342619ac3a0457a5e2774edd5e /tools/duration
parent245f2fe809388a1eb8ff0065cf53713d08a7fca5 (diff)
Noen scripts til å redigere video og lyd
Diffstat (limited to 'tools/duration')
-rw-r--r--tools/duration14
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/duration b/tools/duration
new file mode 100644
index 0000000..797eeb4
--- /dev/null
+++ b/tools/duration
@@ -0,0 +1,14 @@
+#!/bin/bash
+#
+# Date: 2009-11-30
+# Author: Ole Kristian Lien
+# License: GNU General Public License
+#
+# Grabs duration from audio/video-file
+
+if [ -z "$1" ]; then
+ echo "Usage: $0 <audio/video-file>"
+ exit 1
+fi
+
+ffmpeg -i $1 2>&1 | grep "Duration" | cut -d ' ' -f 4 | sed s/,// | cut -d "." -f1