On Wed, 21 Feb 2001, A Brady wrote:
>
> I was going to answer this before, was distracted by my 2-year-old, lost
> track and deleted the mail.
>
> Here's a script that I use:
>
> ------ CUT HERE ------
> #!/bin/bash
> # mp32wav
> mpg123 -b 10000 -s "$1" | sox -t raw -r 44100 -s -w -c2 - "$2"
> ------ CUT HERE ------
>
> Very simple, very effective. Requires only sox and mpg123.
>
I like it.  May I sugest one improvment?  I hate entering two names on
the command line, so I would use something like this...

------ CUT HERE ------
#!/bin/bash
# mp32wav
#
mpg123 -b 10000 -s "$1" | \
sox -t raw -r 44100 -s -w -c2 - "$(basename $1 mp3)wav"
------ CUT HERE ------

You do get some strange output file names if your origional file doesn't
end in .mp3, but you do get to use the file name completion feature of
your shell...  It also puts the .wav file in your current directory...

Mikkel
-- 

    Do not meddle in the affairs of dragons,
 for you are crunchy and taste good with ketchup.



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to