Universal source block
A universal source that decodes video and audio files/network streams and provides uncompressed data to the connected blocks.
Block supports MP4, WebM, AVI, TS, MKV, MP3, AAC, M4A, and many other formats. If FFMPEG redist is available, all decoders available in FFMPEG will also be supported.
Block info
Name: UniversalSourceBlock.
Pin direction | Media type | Pins count |
---|---|---|
Output audio | depends from decoder | one or more |
Output video | depends from decoder | one or more |
Output subtitle | depends from decoder | one or more |
The sample pipeline
Sample code
var pipeline = new MediaBlocksPipeline();
var fileSource = new UniversalSourceBlock();
fileSource.Filename = "test.mp4";
var videoRenderer = new VideoRendererBlock(pipeline, VideoView1);
pipeline.Connect(fileSource.VideoOutput, videoRenderer.Input);
var audioRenderer = new AudioRendererBlock();
pipeline.Connect(fileSource.AudioOutput, audioRenderer.Input);
await pipeline.StartAsync();
Sample applications
Platforms
Windows, macOS, Linux, iOS, Android.