OGG output
OGG
: An open container format that is free of software patents and is designed to efficiently stream and manipulate high-quality digital multimedia. It encompasses a range of codecs, with Vorbis being the most commonly used for audio compression.
Use the OGGSinkSettings
class to set the parameters.
Block info
Name: OGGSinkBlock.
Pin direction | Media type | Pins count |
---|---|---|
Input audio | audio/x-vorbis | one or more |
audio/x-flac | ||
audio/x-speex | ||
audio/x-celt | ||
application/x-ogm-audio | ||
audio/x-opus | ||
Input video | video/x-theora | one or more |
application/x-ogm-video | ||
video/x-dirac | ||
video/x-smoke | ||
video/x-vp8 | ||
video/x-daala | ||
Input subtitle | text/x-cmml | one or more |
subtitle/x-kate | ||
application/x-kate |
The sample pipeline
Sample code
var pipeline = new MediaBlocksPipeline();
var filename = "test.mp3";
var fileSource = new UniversalSourceBlock(await UniversalSourceSettings.CreateAsync(new Uri(filename)));
var vorbisEncoderBlock = new VorbisEncoderBlock(new VorbisEncoderSettings());
pipeline.Connect(fileSource.AudioOutput, vorbisEncoderBlock.Input);
var oggSinkBlock = new OGGSinkBlock(new OGGSinkSettings(@"output.ogg"));
pipeline.Connect(vorbisEncoderBlock.Output, oggSinkBlock.CreateNewInput(MediaBlockPadMediaType.Audio));
await pipeline.StartAsync();
Platforms
Windows, macOS, Linux, iOS, Android.