Skip to main content

Audio capture to MP3 file

Products: Video Capture SDK .Net

MP3, standing for MPEG-1 Audio Layer III, is a compact digital audio format that gained widespread popularity for its ability to compress large audio files while retaining quality. Developed by the Fraunhofer Society in the late 1980s, it utilizes lossy compression to minimize file sizes. A notable implementation of MP3 encoding is LAME, an open-source encoder that enhanced MP3's accessibility and efficiency, solidifying MP3's role in transforming digital music consumption and distribution.

Sample code

Set sample MP3 settings and apply them as output format.

var mp3Output = new MP3Output();

mp3Output.CBR_Bitrate = 128;
mp3Output.VBR_MinBitrate = 128;
mp3Output.VBR_MaxBitrate = 192;
mp3Output.SampleRate = 44100;
mp3Output.ChannelsMode = MP3ChannelsMode.StandardStereo;
mp3Output.VBR_Mode = true;

VideoCapture1.Output_Format = mp3Output;

Set the audio capture mode.

VideoCapture1.Mode = VideoCaptureMode.AudioCapture;

Set the file name.

VideoCapture1.Output_Filename = "output.mp3";

Start capture (sync or async).

await VideoCapture1.StartAsync();

Required redists

How can the required redists be installed or deployed to the user's PC?


Visit our GitHub page to get more code samples.