Skip to main content

WMV2 encoder

Overview

WMV2 encoder block encodes video in WMV format.

Block info

Name: WMV1EncoderBlock.

Pin directionMedia typePins count
InputUncompressed video1
Outputvideo/x-wmv1

The sample pipeline

Sample code

var pipeline = new MediaBlocksPipeline(false);

var filename = "test.mp4";
var fileSource = new UniversalSourceBlock(await UniversalSourceSettings.CreateAsync(new Uri(filename)));

var wmvEncoderBlock = new WMV2EncoderBlock(new WMV2EncoderSettings());
pipeline.Connect(fileSource.VideoOutput, wmvEncoderBlock.Input);

var asfSinkBlock = new ASFSinkBlock(new ASFSinkSettings(@"output.wmv"));
pipeline.Connect(wmvEncoderBlock.Output, asfSinkBlock.CreateNewInput(MediaBlockPadMediaType.Video));

await pipeline.StartAsync();

Platforms

Windows, macOS, Linux.