blob: 3fff16e5d0301b40d044404af1eec5b195b76d2f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#!/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 <audio-file>"
exit 1
fi
./require sox || { exit 1; }
# 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 -n " * 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
echo -e "OK!"
|