Skip to main content

Audio capture to WAV file

Products: Video Capture SDK .Net

Sample code

1. Get a list of available audio codecs

foreach (var codec in VideoCapture1.Audio_Codecs)

2. Set audio settings, and apply output format

var acmOutput = new ACMOutput();

acmOutput.Channels = 2;
acmOutput.BPS = 16;
acmOutput.SampleRate = 44100;
acmOutput.Name = cbAudioCodecs.Text;

VideoCapture1.Output_Format = acmOutput;

3. Set audio capture mode

VideoCapture1.Mode = VideoCaptureMode.AudioCapture;

4. Set file name

VideoCapture1.Output_Filename = "output.wav";

5. Start capture

await VideoCapture1.StartAsync();

Required redists

How to install the required redists or deploy them to the user's PC?

Visit our GitHub page to get more code samples.