Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Encoder/Decoder for C# (Read 11990 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Encoder/Decoder for C#

 Greetings! Like I just said, I´m new in this forum, and I hope that someone cal give me a hand with the followin issue. I need a MP3 encoder/decorer for C#. In a more detail matter, I hace a collage proyect in which I have to record a WAV and make it an MP3 adn vice-versa. Of course thats just a little part of the proyect, but I need to start somewhere! I would really apreciate any help or clue. Thanks! 

Encoder/Decoder for C#

Reply #1
The easeist way to do this will be to just call LAME.EXE from your .NET application.

It is possible that you could use the LAME DLL , but it will be more effort for very little gain (for something of this nature).

LAME will encode WAVE to MP3 and decode MP3 to WAVE.
I'm on a horse.

Encoder/Decoder for C#

Reply #2
Porting one of the simple (low quality) encoders to C# wouldn't be a major issue. There are a couple of MP3 encoders out there designed purely for simplicity.

By the way, please read your posts before you post them and check for spelling errors and typos.

Encoder/Decoder for C#

Reply #3
Quote
Greetings! Like I just said, I´m new in this forum, and I hope that someone cal give me a hand with the followin issue. I need a MP3 encoder/decorer for C#. In a more detail matter, I hace a collage proyect in which I have to record a WAV and make it an MP3 adn vice-versa. Of course thats just a little part of the proyect, but I need to start somewhere! I would really apreciate any help or clue. Thanks! 
[{POST_SNAPBACK}][/a]


You don't need one in C#, if the codec was written directly in C# it would be far too slow. It is possible to call DirectShow and use the Windows decoder. Unfortunately Microsoft currently don't provide bindings but there an article about how you can go about doing your own [a href="http://www.codeproject.com/cs/media/directshownet.asp]http://www.codeproject.com/cs/media/directshownet.asp[/url]

You be able to encode this way as well but it's going to be crippled in terms of rates you can encoded at for patent licensing reasons unless you install a 3rd party MP3 DirectShow codec.

I would question the wisdom of trying to write a media application in C#. It would be much easier to do in C++. You can even get a free optimising compiler from Microsoft these days from:

http://msdn.microsoft.com/visualc/vctoolkit2003/

You could try and wrap the lame dll in a managed wrapper so you can call it from C# however it sounds like more trouble than it is worth.