ASF/WMV/WMA output
ASF (Advanced Systems Format)
: A Microsoft digital container format used to store multimedia data, designed to be platform-independent and to support scalable media types like audio and video.
Use the ASFSinkSettings
class to set the parameters.
Block info
Name: AVISinkBlock.
Pin direction | Media type | Pins count |
---|---|---|
Input audio | audio/x-raw | one or more |
audio/mpeg | ||
audio/x-ac3 | ||
audio/x-alaw | ||
audio/x-mulaw | ||
audio/x-wma | ||
Input video | video/x-raw | one or more |
image/jpeg | ||
video/x-divx | ||
video/x-msmpeg | ||
video/mpeg | ||
video/x-h263 | ||
video/x-h264 | ||
video/x-dv | ||
video/x-huffyuv | ||
video/x-wmv | ||
video/x-jpc | ||
video/x-vp8 | ||
image/png |
The sample pipeline
Sample code
var pipeline = new MediaBlocksPipeline();
var filename = "test.mp4";
var fileSource = new UniversalSourceBlock(await UniversalSourceSettings.CreateAsync(new Uri(filename)));
var audioEncoderBlock = new WMA1EncoderBlock(new WMA1EncoderSettings());
pipeline.Connect(fileSource.AudioOutput, audioEncoderBlock.Input);
var videoEncoderBlock = new WMV1EncoderBlock(new WMV1EncoderSettings());
pipeline.Connect(fileSource.VideoOutput, videoEncoderBlock.Input);
var sinkBlock = new ASFSinkBlock(new ASFSinkSettings(@"output.wmv"));
pipeline.Connect(audioEncoderBlock.Output, sinkBlock.CreateNewInput(MediaBlockPadMediaType.Audio));
pipeline.Connect(videoEncoderBlock.Output, sinkBlock.CreateNewInput(MediaBlockPadMediaType.Video));
await pipeline.StartAsync();
Platforms
Windows, macOS, Linux, iOS, Android.