[ LUGOS ] cd rip -> mp3

Polz of the SBT polz na writeme.com
Pon Sep 6 10:04:41 CEST 1999


> Me pa zanima obratna smer iz mp3 nardit cdda? Rad bi posnel glasbeni CD iz
> mp3jev..
> Obstaja kaj takega?

Yep. A je domace ? Domace je, domace!

 #!/bin/bash
 number=1
 fname="audio_01.cdr"
 for name in *.mp3
 do
   while test -f $fname; do
     fname=`printf "%s%02d.cdr" audio_ $number`
     number=`expr $number + 1`;
   done
   echo transforming $name into $fname
   mpg123 -s "$name" 2>&1 >/tmp/audio.tmp 2> /tmp/info.tmp
   if grep -q -G stereo /tmp/info.tmp; then
     channels=2;
   else 
     channels=1;
   fi
   if grep -q -G "44100 Hz" /tmp/info.tmp; then rate=44100; fi
   if grep -q -G "22050 Hz" /tmp/info.tmp; then rate=22050; fi
   if grep -q -G "11025 Hz" /tmp/info.tmp; then rate=11025; fi
   sox -t raw -s -w -r $rate -c $channels /tmp/audio.tmp $fname
   rm /tmp/audio.tmp
   rm /tmp/info.tmp
 done




Dodatne informacije o seznamu Starilist