[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: OT: sox help needed



On Thursday 20 May 2004 08:34 am, Matthias Czapla wrote:
>On Thu, May 20, 2004 at 04:43:48AM -0400, Jeff Elkins wrote:
>> I need to convert a mess of mp3 files into PCM 8000 kHz, 16 Bit, Mono wav
>> format. I tried using mpg123 and sox :
>>
>> mpg123 -b 10000 -s test.mp3 | sox -t raw -r 8000 -s -w -c 2 - test.wav
>>
>> w/o success. The resulting wav file is molasses slow.
>
>The syntax of sox is:
>sox [INPUT file options] input_file [OUTPUT file options] output_file
>
>You told sox that the input would be 16 Bit 8 kHz stereo, which it
>probably is not. Try something like this:
>
>mpg123 -s test.mp3 | sox -t raw -r 44100 -s -w -c 2 - \
>-t wav -r 8000 -w -c 1 out.wav
>
>Regards
>Matthias

Thanks!

I'm trying to automate this:

#!/bin/sh

for i in *; do
        if test -f $i; then
mpg123 -s $i | sox -t raw -r 44100 -s -w -c 1 - -t wav -r 8000 -w -c 1 $i.wav

    fi
done

which works, but gives me: filename.mp3.wav - anyway to end up with 
filename.wav?

Thanks again,

Jeff Elkins



Reply to: