summaryrefslogtreecommitdiffstats
path: root/tools/audio_format
diff options
context:
space:
mode:
authorOle Kristian Lien <ole.k.lien@gmail.com>2009-12-10 04:36:13 +0000
committerOle Kristian Lien <ole.k.lien@gmail.com>2009-12-10 04:36:13 +0000
commitf109c2fc7c7ed195003d9deb20710b49d86f12c8 (patch)
treee41cc182f640c1e0a597f7f1e6444bf4729279c4 /tools/audio_format
parent2c2ff1462d288567db0cf90faa5591f0823042ff (diff)
Fungerende intro-outro. :) Litt lese stoff og små fikser.
Diffstat (limited to 'tools/audio_format')
-rw-r--r--tools/audio_format9
1 files changed, 8 insertions, 1 deletions
diff --git a/tools/audio_format b/tools/audio_format
index a96348c..96523cb 100644
--- a/tools/audio_format
+++ b/tools/audio_format
@@ -6,9 +6,16 @@
#
# Grabs audio format from audio/video-file
+FORMAT=`ffmpeg -i $1 2>&1 | grep Audio | cut -d " " -f 8 | sed 's/,//g'`
+
if [ -z "$1" ]; then
echo "Usage: $0 <audio/video-file>"
exit 1
fi
-ffmpeg -i $1 2>&1 | grep Audio | cut -d " " -f 8 | sed 's/,//g'
+if [ "$FORMAT" == "pcm_s16le" ]; then
+ echo "wav"
+else
+ echo $FORMAT
+fi
+