[NTLUG:Discuss] converting audio files via CLI tools

terry trryhend at gmail.com
Fri Oct 1 12:53:10 CDT 2010


To convert mp3s to wav [using mpg123]:
      (First, fix the filenames)
If they have uppercase extensions - change to lowercase:
 for i in *.[Mm][Pp]3; do mv "$i" `echo $i | tr '[A-Z]' '[a-z]'`; done
To convert just extensions:
 for i in *.MP3; do mv "$i" "`basename "$i" .MP3`.mp3"; done
If there are spaces, remove those first:
 for i in *.mp3; do mv "$i" `echo $i | tr ' ' '_'`; done
Mow to convert mp3s to wav:
 for i in *.mp3; do mpg123 -w `basename $i .mp3`.wav $i; done


On Fri, Oct 1, 2010 at 9:32 AM, Richard <ntlug at rain4us.net> wrote:
>  I am needing to convert .MP3 files to an 8x16 wav file?  Is mplayer the CLI
> utility I want to use? After much googling, that's all I seem to come up
> with.
>
> _______________________________________________
> http://www.ntlug.org/mailman/listinfo/discuss
>



-- 
<><



More information about the Discuss mailing list