Monday, February 2, 2009

How to encoding WAV to MP3 simultanously

As I told before, to encode or convert from WAV to MP3 file, you must do that one by one. With the certain script, this encoding can do with simultanously. To do this, make a script, call it "encoding.sh". The content of this file is :


#!/bin/sh


lame track01.cdda.wav track01.mp3

lame track02.cdda.wav track02.mp3

lame track03.cdda.wav track03.mp3

lame track04.cdda.wav track04.mp3

lame track05.cdda.wav track05.mp3

lame track06.cdda.wav track06.mp3

lame track07.cdda.wav track07.mp3

lame track08.cdda.wav track08.mp3

lame track09.cdda.wav track09.mp3

lame track10.cdda.wav track10.mp3

lame track11.cdda.wav track11.mp3

lame track12.cdda.wav track12.mp3

lame track13.cdda.wav track13.mp3

lame track14.cdda.wav track14.mp3

lame track15.cdda.wav track15.mp3

lame track16.cdda.wav track16.mp3

Don't forget to change “encoding.sh” file mode to 777.

Code :

# chmod 777 encoding.sh

I make the script until track #16, because the maximum songs on CD Audio that I have is 16 songs. If the song on a CD Audio only 10 songs, this script still working properly. But if the songs on CD Audio more than 16, you just add command line at the end of “encoding.sh” file, like :

lame track17.cdda.wav track17.mp3

lame track18.cdda.wav track18.mp3

and so on.

To convert all WAV files to MP3 files, you just run :

Code :

# ./encoding.sh

by.msmunir@batan.go.id

No comments:

Post a Comment