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