FLAC encoder
FLAC encoder is used when encoding files in FLAC, WebM, MKV, and some other formats.
Use FLACEncoderSettings class to set the parameters.
Block info
Name: FLACEncoderBlock.
Pin direction | Media type | Pins count |
---|---|---|
Input | PCM/IEEE | 1 |
Output | FLAC | 1 |
The sample pipeline
FileSourceBlock
→ FLACEncoderBlock
→ FileSinkBlock
Sample code
var pipeline = new MediaBlocksPipeline(false);
var fileSource = new FileSourceBlock();
fileSource.Filename = "test.mp3";
var flacEncoderBlock = new FLACEncoderBlock(new FLACEncoderSettings());
pipeline.Connect(fileSource.AudioOutput, flacEncoderBlock.Input);
var fileSinkBlock = new FileSinkBlock(@"output.flac");
pipeline.Connect(flacEncoderBlock.Output, fileSinkBlock.Input);
await pipeline.StartAsync();
Platforms
Windows, macOS, Linux, iOS, Android.