Convert wave file to Mp3 file

alvinblim

Well-known member
Joined
Jan 7, 2006
Messages
46
Location
malaysia
Programming Experience
3-5
Hi,
how can i convert from wave file to mp3 file? Do some one know about the way to solve it. thank you very much.

best regards,
alvin
 

mafrosis

Well-known member
Joined
Jun 5, 2006
Messages
88
Location
UK
Programming Experience
5-10
You could do this by starting an external process with the Lame MP3 encoder. The Lame EXE can be downloaded here (found a quick link):

http://www.trudyholler.com/extras/razor/lame/lame-3.92.zip

And here's the full list of command line switches you can pass to the encoder:

http://lame.sourceforge.net/doc/html/switchs.html

You needn't worry about most of them - your most basic command line for Lame is this:

lame -h input.wav output.mp3
Then VB.NET create a new process using something like this:

VB.NET:
Dim p As New Process()
p.StartInfo.FileName = "C:\lame.exe"
p.StartInfo.Arguments = "-h input.wav output.mp3"
p.StartInfo.CreateNoWindow = True
p.Start()
mafro
 
Top Bottom