#!/bin/bash # # Date: 2009-12-10 # Author: Ole Kristian Lien # License: GNU General Public License # # Splits a audio-file to a left- and right-file. EXT=`echo "$1"|awk -F . '{print $NF}'` NAME=`basename $1 .$EXT` if [ -z "$1" ]; then echo "Usage: $0 " exit 1 fi # sox FAIL formats: can't open output file `1-left.mp2': SoX was compiled without MP3 encoding support # kan ikke encode til mp{2,3}... echo "Splitting up audio to a left- and right-file..." sox $1 -c 1 $NAME-left.wav mixer -l 2> /dev/null sox $1 -c 1 $NAME-right.wav mixer -r 2> /dev/null