How to create MP3 file using CSCore from WAV file or how to solve "No MP3-Encoder was found"

2.2k Views Asked by At

I was wondering if it is possible to encode to mp3 after recording a wav file. I tried to change the WasapiCapture parameters but I think that is not working since the sound length has only 5 seconds and 1,20 MB.

Here the sample code trying to converting to mp3 before start the recording:

_soundIn = new WasapiCapture(false, AudioClientShareMode.Shared, 100,
                new WaveFormat(44100, 32, 2, AudioEncoding.MpegLayer3));

I tried to do as well as the example below but I always get this error: No MP3-Encoder was found.

http://cscore.codeplex.com/SourceControl/latest#Samples/RecordToWma/Program.cs

Thank you guys!

1

There are 1 best solutions below

0
On BEST ANSWER

According to the documentation, the MMF mp3 encoder requires Windows 8 (or Server 2012).

From MSDN:

Requirements

Minimum supported client Windows 8 [desktop apps only]

Minimum supported server Windows Server 2012 [desktop apps only]