comparison gettracks.sh @ 10:c9ade2a9c808

Use dd and lame to rip and compress.
author darius
date Thu, 18 Jul 2002 06:37:59 +0000
parents cf06ab549064
children
comparison
equal deleted inserted replaced
9:f3f2657296d2 10:c9ade2a9c808
8 tracks=$* 8 tracks=$*
9 fi 9 fi
10 10
11 echo Ripping tracks $tracks 11 echo Ripping tracks $tracks
12 12
13 ripper="cdd -t \$num -" 13 #ripper="cdd -t \$num - | sox -x -t wav - -t wav -"
14 comp="lame -x -b 192 - -" 14 #ripper="cdda2wav -O wav -t \$num -D 0,6,0 -"
15 #comp="lame -V 1 -m j -b 160 - -"
15 #comp="gogo -silent -offset 0 -b 192 stdin" 16 #comp="gogo -silent -offset 0 -b 192 stdin"
16 17
17 for t in $tracks ; do 18 for t in $tracks ; do
18 num=`printf %02d $t` 19 num=`printf %02d $t`
19 name=`printf track_%s.mp3 $num` 20 name=`printf track_%s.mp3 $num`
20 if [ -e ".${num}.done" ]; then 21 if [ -e ".${num}.done" ]; then
21 echo Skipping $num 22 echo Skipping $num
22 continue 23 continue
23 fi 24 fi
24 echo Ripping $num to $name 25 echo Ripping $num to $name
25 eval $ripper 2>> rip.log | sox -t cdr - -t wav - | $comp > $name 26 # eval $ripper 2>> rip.log | $comp > $name
27 dd if=/dev/acd0t$t bs=2352 | lame -r -x -V 1 -b 128 -h -m j -q1 - - >$name
26 if [ $? -ne 0 ]; then 28 if [ $? -ne 0 ]; then
27 echo "Failed!" 29 echo "Failed!"
28 exit 1 30 exit 1
29 fi 31 fi
30 touch ".${num}.done" 32 touch ".${num}.done"