#
WMA encoder
WMA (Windows Media Audio)
: A series of audio codecs and their corresponding audio coding formats developed by Microsoft, known for its ability to compress at high ratios with good sound quality.
The WMA encoder is used to encode files in ASF, WMA, and WMV formats.
Use the WMAEncoderSettings
class to set the parameters.
#
Block info
Name: WMAEncoderBlock.
#
The sample pipeline
graph LR; UniversalSourceBlock-->WMAEncoderBlock; WMAEncoderBlock-->ASFSinkBlock;
#
Sample code
var pipeline = new MediaBlocksPipeline(false);
var filename = "test.mp3";
var fileSource = new UniversalSourceBlock(await UniversalSourceSettings.CreateAsync(new Uri(filename)));
var audioEncoderBlock = new WMAEncoderBlock(new WMAEncoderSettings());
pipeline.Connect(fileSource.AudioOutput, audioEncoderBlock.Input);
var sinkBlock = new ASFSinkBlock(new ASFSinkSettings(@"output.wma"));
pipeline.Connect(audioEncoderBlock.Output, sinkBlock.CreateNewInput(MediaBlockPadMediaType.Audio));
await pipeline.StartAsync();
#
Platforms
Windows, macOS, Linux, Android.