Solved

converting wav to mp3

Posted on 2009-05-07
5
361 Views
Last Modified: 2013-12-17
I need to convrt wav files to mp3 whithin my c# desktop app.
What is the efficient way for doing this?
0
Comment
Question by:yaron89
  • 2
  • 2
5 Comments
 
LVL 21

Expert Comment

by:Tapan Pattanaik
ID: 24327286
0
 
LVL 39

Expert Comment

by:abel
ID: 24327294
I'm sure you are not attempting to write the algorithms yourself, are you? Here are some links:

using lame:
http://www.csharphelp.com/archives/archive264.html

using a shareware dll:
http://www.download3k.com/Software-Development/Active-X/Download-free-Mp3-Format-DLL.html

0
 
LVL 39

Expert Comment

by:abel
ID: 24327303
hi tapan, using google the same way I do? Seem to be on the same page here lol ;-)
0
 
LVL 23

Expert Comment

by:Kamaraj Subramanian
ID: 24327336
0
 
LVL 23

Accepted Solution

by:
Kamaraj Subramanian earned 500 total points
ID: 24327348
download lame.exe from here.. and put in the bin directory. and run your exe or code

http://www.free-codecs.com/download/Lame_Encoder.htm
public void mciConvertWavMP3(string fileName, bool waitFlag)

{

//maxLen is in ms (1000 = 1 second)

string outfile= "-b 32 --resample 22.05 -m m \""+pworkingDir+fileName + "\" \"" + pworkingDir+fileName.Replace(".wav",".mp3")+"\"";

System.Diagnostics.ProcessStartInfo psi=new System.Diagnostics.ProcessStartInfo();

psi.FileName="\""+pworkingDir+"lame.exe"+"\"";

psi.Arguments=outfile;

//psi.WorkingDirectory=pworkingDir;

psi.WindowStyle=System.Diagnostics.ProcessWindowStyle.Minimized;

System.Diagnostics.Process p=System.Diagnostics.Process.Start(psi);

if (waitFlag)

{

p.WaitForExit();

// wait for exit of called application

}

}

Open in new window

0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now