#!/bin/bash # # Date: 2009-12-10 # Author: Ole Kristian Lien # License: GNU General Public License # # Check if the left and right channel is equal. EXT=`echo "$1"|awk -F . '{print $NF}'` NAME=`basename $1 .$EXT` FORMAT=`./audio_format $1` if [ -z "$1" ]; then echo "Usage: $0 " exit 1 fi # funker ikke helt enda ./extract_audio $1 0 10 # legg på navn-left/right ./audio_split $NAME #sox $1 -c 1 $NAME-left.wav mixer -l 2> /dev/null #sox $1 -c 1 $NAME-right.wav mixer -r 2> /dev/null ./audio_info $NAME-left.$FORMAT &> $NAME-left.$FORMAT.stat ./audio_info $NAME-right.$FORMAT &> $NAME-right.$FORMAT.stat LEFT=`md5sum $NAME-left.$FORMAT.stat | awk '{print $1}'` RIGHT=`md5sum $NAME-right.$FORMAT.stat | awk '{print $1}'` #sox left.wav -n stat &> left.wav.stat #sox right.wav -n stat &> right.wav.stat if [ "$LEFT" == "$RIGHT" ]; then echo 0 else echo 1 fi rm $NAME.$FORMAT $NAME-left* $NAME-right*