diff options
Diffstat (limited to 'tools/extract_audio')
-rw-r--r-- | tools/extract_audio | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tools/extract_audio b/tools/extract_audio new file mode 100644 index 0000000..26a8588 --- /dev/null +++ b/tools/extract_audio @@ -0,0 +1,18 @@ +#!/bin/bash +# +# Date: 2009-11-30 +# Author: Ole Kristian Lien +# License: GNU General Public License +# +# Extract audio from video-file + +EXT=`echo "$1"|awk -F . '{print $NF}'` +NAME=`basename $1 .$EXT` +FORMAT=`./audio_format $1` + +if [ -z "$1" ]; then + echo "Usage: $0 <video-file>" + exit 1 +fi + +ffmpeg -i $1 -vn -acodec copy $NAME.$FORMAT 2> /dev/null |