Search code examples
mp3vlcnaudiortplibvlc

How can I stream sound from the microphone in mp3 format?


I need a software that can stream audio with mp3 format.The audio will come from the microphone at the same time.

I have a software that can stream sound with alaw and ulaw codecs. And I have an another program that can stream recorded mp3 file. Not capture from the microphone.

I can make stream with VLC.Dotnet wrapper but I didn't succeed with directshow.(namely microphone)

Here my Vlc.Dotnet code;

myVlcControl.Play("dshow://");
myVlcControl.Play(new Uri("dshow://"));

It did not work with this codes. I don't know what causes the problem.

My second software can stream sound that captures form microphone in real time. But its codec format is alaw not mp3. I did not find any converter that convert linear to mp3 file. I find a converter that convert linear to alaw. this is the link Linear to Alaw Codec I know the LAME and NAudio but it converts wav file to mp3. I need linear to mp3(like in the link)

I am very confused. I really do not know which way to go. 1. Find a codec linear to mp3 (It's very complicated) ? 2. Learn VLC direct Show usage on .NET ?

Thank you so much in advance.

*VLC.DotNet, axVLCPlugin21, LAME, ffmpeg....


Solution

  • As soon as I've successfully solved this problem with VLC.Dotnet wrapper. The problem is compiling with x64 architectural. When I was compiled with x86 architectural, The problem solved.