diff options
Diffstat (limited to 'tools/duration')
-rw-r--r-- | tools/duration | 14 |
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 |