Convert wma to ogg

Write small shell script to perform batch conversion. However it works only with files from current directory, and with files what has only one period in file name (for example ASOT-280.wma)

Following script will convert all wma files to ogg format:

for i in *.wma ;
ii=`echo $i | cut -d'.' -f1`
`mplayer -vo null -vc dummy -af resample=44100 \
-ao pcm:waveheader:file=$ii.wav $i`
`oggenc -q 5 $ii.wav`

(!) Do not forget to manually remove original wma and temporarily created wav files.

I will not explain here all mplayer and oggenc params. If you would like to know more, please look to man pages

If you would like to convert wma to mp3 you need replace line:

`oggenc -q 5 $ii.wav


`lame -m j -h --vbr-new -b 192 $ii.wav -o $ii.mp3`

That’s all.

Digg Google Bookmarks reddit Mixx StumbleUpon Technorati Yahoo! Buzz DesignFloat Delicious BlinkList Furl


Youconvertit said...

This is a great blog that explains the various benefits of ogg. You can opt for various types of conversion such as Convert ogg to mp3 absolutely free.

markson said...

AnyConv is an online file converter. It allows users to convert files without downloading a software tool, and supports over 1,200 different conversion types. The service supports the conversion of documents, images, audio, video, e-Books, CAD files and compressed file formats.

Post a Comment

Popular Posts