CodeBrix.VideoPlayback.MitLicenseForever 1.0.285.833

dotnet add package CodeBrix.VideoPlayback.MitLicenseForever --version 1.0.285.833
                    
NuGet\Install-Package CodeBrix.VideoPlayback.MitLicenseForever -Version 1.0.285.833
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CodeBrix.VideoPlayback.MitLicenseForever" Version="1.0.285.833" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CodeBrix.VideoPlayback.MitLicenseForever" Version="1.0.285.833" />
                    
Directory.Packages.props
<PackageReference Include="CodeBrix.VideoPlayback.MitLicenseForever" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CodeBrix.VideoPlayback.MitLicenseForever --version 1.0.285.833
                    
#r "nuget: CodeBrix.VideoPlayback.MitLicenseForever, 1.0.285.833"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package CodeBrix.VideoPlayback.MitLicenseForever@1.0.285.833
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CodeBrix.VideoPlayback.MitLicenseForever&version=1.0.285.833
                    
Install as a Cake Addin
#tool nuget:?package=CodeBrix.VideoPlayback.MitLicenseForever&version=1.0.285.833
                    
Install as a Cake Tool

CodeBrix.VideoPlayback

Royalty-free video playback for .NET, with no native binaries, no drawing dependency and exactly one NuGet dependency. It reads WebM and Matroska files carrying AV1 video with Opus or Vorbis audio and any number of text caption tracks, and reads and writes .cbv - a bespoke container laid out so that the whole index and every caption cue sit in front of the media data, which is what makes a shipped-with-the-app clip start instantly and a seek cost one read. CodeBrix.VideoPlayback is provided as three .NET 10 libraries and their associated NuGet packages: CodeBrix.VideoPlayback.MitLicenseForever (playback), CodeBrix.VideoPlayback.Skia.MitLicenseForever (a presenter that draws the frames) and CodeBrix.VideoPlayback.Authoring.MitLicenseForever (a developer-machine library that writes the files the first one reads).

CodeBrix.VideoPlayback supports applications and assemblies that target Microsoft .NET version 10.0 and later. Microsoft .NET version 10.0 is a Long-Term Supported (LTS) version of .NET, and was released on Nov 11, 2025; and will be actively supported by Microsoft until Nov 14, 2028. Please update your C#/.NET code and projects to the latest LTS version of Microsoft .NET.

Installation

dotnet add package CodeBrix.VideoPlayback.MitLicenseForever
dotnet add package CodeBrix.VideoPlayback.Skia.MitLicenseForever
dotnet add package CodeBrix.VideoPlayback.Authoring.MitLicenseForever

Which one do I reference? An application that PLAYS video takes CodeBrix.VideoPlayback.MitLicenseForever, and adds CodeBrix.VideoPlayback.Skia.MitLicenseForever when it would rather have frames drawn for it than draw them itself. A build tool or an asset pipeline that WRITES video takes CodeBrix.VideoPlayback.Authoring.MitLicenseForever - and only there: that one drives the FFmpeg installed on the authoring workstation, so it belongs in a build tool or an asset pipeline and never in a shipped application. The three are published together at one version.

Note that the NuGet package IDs and the namespaces are different - there is no package named plain CodeBrix.VideoPlayback:

  • NuGet package ID CodeBrix.VideoPlayback.MitLicenseForever - assembly and primary namespace CodeBrix.VideoPlayback - i.e. using CodeBrix.VideoPlayback;
  • NuGet package ID CodeBrix.VideoPlayback.Skia.MitLicenseForever - assembly and primary namespace CodeBrix.VideoPlayback.Skia
  • NuGet package ID CodeBrix.VideoPlayback.Authoring.MitLicenseForever - assembly and primary namespace CodeBrix.VideoPlayback.Authoring

XML documentation (IntelliSense) ships alongside every assembly.

Each package pulls in what it needs automatically; no version pinning is needed in the consuming project:

  • CodeBrix.VideoPlayback.MitLicenseForever pulls in CodeBrix.Audio.Core.MitLicenseForever, the managed audio library with Vorbis built in. That is the whole list - no native binary, no drawing dependency. To hear the sound, an application adds the audio package that carries the native engine for its platform - CodeBrix.Audio.MitLicenseForever on Windows, Linux and macOS, CodeBrix.Audio.Android.ApacheLicenseForever on Android. No package in this repository chooses it for you.
  • CodeBrix.VideoPlayback.Skia.MitLicenseForever pulls in the playback package and SkiaSharp. It deliberately does NOT bring a SkiaSharp native-asset package: a consuming application adds the SkiaSharp.NativeAssets package for each platform it ships on, and so chooses its own native binary. It does not bring an audio engine either - the application adds the audio package for its platform, exactly as with the playback package alone.
  • CodeBrix.VideoPlayback.Authoring.MitLicenseForever pulls in the playback package, CodeBrix.VideoProcessing.Core.MitLicenseForever - the engine-neutral contract it works through - and the AV1, FLAC, Vorbis and Opus encoder packages its in-process passes write with. It does not bring a video-processing engine: the application adds CodeBrix.VideoProcessing.MitLicenseForever on the desktop (the engine that locates and launches the FFmpeg installed on the machine) or CodeBrix.VideoProcessing.Android.MitLicenseForever on Android, and registers it once at start-up - CodeBrixVideoProcessing.Register() or CodeBrixVideoProcessingAndroid.Register(). Without a registered engine, authoring refuses.

Add, as your application needs them:

  • CodeBrix.VideoPlayback.Dav1d.BsdLicenseForever - to play AV1 video. It binds the dav1d AV1 decoder and carries native binaries, which is why it is a separate package.
  • CodeBrix.Audio.Opus.BsdLicenseForever - to play Opus audio.

CodeBrix.VideoPlayback supports:

  • A playback session with a transport, a clock, A/V sync, seeking, looping, captions and chapters
  • Reading WebM and Matroska files carrying AV1 video with Opus or Vorbis audio, plus any number of text caption tracks
  • Writing WebM and Matroska files in managed code - AV1 video, Opus or Vorbis audio, WebVTT captions and chapters, with the index in front of the media - so a CodeBrix Video Mode1 file can be authored where FFmpeg does not exist
  • Reading and writing .cbv, the bespoke container, with its index and every caption cue in front of the media data
  • Reading and writing .cbvmaster, the bespoke container's master form: an optional alpha-plane track beside the picture, for video with real transparency, lossless FLAC sound, and a flag marking a file silent by intent
  • Playing transparent video: the alpha plane is decoded beside the picture, kept frame for frame in step with it, and handed on as premultiplied colour with real opacity
  • Playing from files, streams, memory, memory-mapped files and HTTP
  • A frame-buffer pool whose layout lets a decoder write straight into the memory a presenter uploads from - no copy in between, and nothing allocated per frame once playback is warm
  • A frame presenter: a one-slot mailbox that always holds the newest frame, so the drawing side never waits and never shows a stale picture
  • A managed SIMD converter from planar YUV to BGRA, for when there is no graphics device to do it
  • Managed frame processing for engines without FFmpeg: a bilinear and Lanczos scaler, quarter-turn rotation and flips, drop/duplicate frame-rate conversion, and 3D LUT grading of YUV frames at 8, 10 and 12 bits - all working on plain planes, all measured against FFmpeg
  • Colour lookup tables - 1D and 3D, .cube reading and writing, and layered chains composed into one resultant table
  • Container readers for EBML, Matroska/WebM and .cbv, and writers for Matroska/WebM, .cbv, IVF and Ogg
  • A codec-neutral decoder seam that decoder packages register themselves into
  • A streamable-profile checker that says whether a file really is laid out the way a .cbv promises

CodeBrix.VideoPlayback.Skia supports:

  • One class, SkiaVideoPresenter, that composes the newest frame on an off-screen surface and blits the result into whatever canvas your application owns
  • A graphics-device path: one SkSL shader doing the colour conversion and a whole chain of colour effects in a single pass
  • A processor path through the core's converter, and a choice of which you get - GpuAuto, GpuNoFallback or Cpu
  • Letterboxing: Uniform, UniformToFill, Fill or None
  • Drawing over the video - a Composing event that hands you the canvas, and IVideoLayer overlay layers
  • Colour effects, including lookup-table chains, and the resultant table they compose to
  • Capturing the composed frame as an SKImage
  • Transparent video on both paths: premultiplied colour with real opacity, drawn over whatever is behind it
  • Composition statistics and frame counters
  • Plain SkiaSharp only: no view package, no native asset, no windowing toolkit

CodeBrix.VideoPlayback.Authoring supports:

  • One call that turns a source video, plus its caption files and a chapter file, into a .cbv - in either flavour: one FFmpeg pass for the WebM-profile one, two passes and this repository's own muxer for the bespoke one
  • Frame sizes by source, exact size, long side or short side, with rate control and encoder settings
  • A master flavour, .cbvmaster, encoded in process from frames the registered video-processing engine decodes - on any engine, with no FFmpeg encoder involved: the source's alpha channel as a second, monochrome AV1 track whose key frames are forced onto the picture's, fully transparent pixels filled with the colour of the nearest visible one, and lossless FLAC sound - or, with Audio.Silent, no sound at all and the file flagged silent
  • Ten-bit masters: Video.BitDepth = 10 encodes the picture and its alpha plane at 10 bits on any engine that delivers 10-bit frames, and they play back at 10 bits
  • The bespoke flavour encoded in process too, on request or when FFmpeg is not available: AV1 and Vorbis from the in-process encoders, with the same captions, chapters and container
  • The WebM-profile flavour - CodeBrix Video Mode1 - encoded and muxed in process too, on request or when FFmpeg is not available: AV1 and Opus from the in-process encoders and the file written by this repository's own WebM muxer, with WebVTT captions, chapters in every title language, the index in front and the streamable-profile check, so a Mode1 file can be authored where FFmpeg does not exist
  • Scaling, frame-rate conversion, colour grading and rotation for in-process runs: an FFmpeg prepare pass on the desktop, and the same steps in managed code on an engine without FFmpeg
  • Device-class presets, applied to a request in one call
  • A colour grade baked from a chain of .cube tables with the same composer the presenter uses
  • A dry run that renders every command line - and every in-process pass's settings - without running anything
  • A streamable-profile report over the finished file
  • Exporting any CodeBrix video - .cbv, .cbvmaster or a WebM-profile file - to a standard MP4 (H.264, or HEVC where the engine has it, with AAC sound), compositing a transparent master over a colour, an image or another video - with no audio device needed
  • Refusing, before any process starts, what would not play or would not encode: Opus in a bespoke file, anything but FLAC in a master file, SubRip in a WebM-profile file, Vorbis or surround Opus in a WebM file encoded in process, a Vorbis bit rate outside the encoder's band, a malformed language tag

Decoders

One video decoder ships in the box: the uncompressed one, for Matroska's V_UNCOMPRESSED tracks and the .cbv files built from them. It is registered for you, so that container, session, clock, seek, pool and presenter all work with no codec package installed at all - it is a diagnostics and test codec, not a distribution format.

A decoder for a CODED format arrives as a separate package and registers itself; audio plays through CodeBrix.Audio, which has Vorbis built in. A file whose codec has no decoder fails with a message naming the package to add.

The two .cbv flavours

A WebM-profile file is an ordinary WebM document - or a Matroska one, if you ask for that - with its cues moved to the front, so anything that reads WebM can read it too, and Opus is its default sound.

A bespoke .cbv is this repository's own container, and it exists so that a file plays with the playback package and a video decoder and NOTHING else - so its sound is Vorbis, which the one audio dependency has built in. A bespoke file never carries Opus, and a request that asks for one is refused rather than written.

Sample Code

Play a file

using CodeBrix.VideoPlayback;
using CodeBrix.VideoPlayback.Frames;

VideoPlaybackSession session = new VideoPlaybackSession();
session.FrameReady += (s, e) => myView.Invalidate();
session.Open("clip.cbv");
session.Play();

// ...on the thread that draws:
if (session.Presenter.TryTakeLatest(out VideoFrame frame))
{
    using (frame)
    {
        // frame.Y / frame.U / frame.V are the planes, with their colour metadata.
    }
}

Have the frames drawn for you

using CodeBrix.VideoPlayback;
using CodeBrix.VideoPlayback.Rendering;
using CodeBrix.VideoPlayback.Skia;
using SkiaSharp;

VideoPlaybackSession session = new VideoPlaybackSession();
SkiaVideoPresenter presenter = new SkiaVideoPresenter();

presenter.Attach(session.Presenter);
presenter.Invalidated += (s, e) => myView.Invalidate();   // mark dirty; do NOT draw here

session.Open("clip.cbv");
session.Play();

// ...in whatever your host framework calls to paint:
void Paint(SKCanvas canvas, SKRect bounds)
{
    canvas.Clear(SKColors.Black);
    presenter.Draw(canvas, bounds, VideoStretch.Uniform);
}

Author a .cbv

using CodeBrix.VideoPlayback.Authoring;
using CodeBrix.VideoPlayback.Authoring.Presets;

VideoAuthoringRequest request = new VideoAuthoringRequest
{
    Flavour = VideoAuthoringFlavour.Bespoke,
    SourcePath = "master.mov",
    OutputPath = "intro.cbv",
};

DeviceClassPresets.Pi1080p.ApplyTo(request);

VideoAuthoringResult result = CbvAuthor.Write(request);
Console.WriteLine(result);          // path, size, flavour, profile verdict

The same request renders its command lines without running anything, which is what a build script records:

using CodeBrix.VideoPlayback.Authoring.Commands;

foreach (AuthoringCommand command in CbvAuthor.RenderCommands(request))
{
    Console.WriteLine(command);
}

Export to MP4

using CodeBrix.VideoPlayback.Authoring.Export;

VideoExportResult exported = VideoExporter.Run(new VideoExportRequest
{
    SourcePath = "intro.cbvmaster",
    OutputPath = "intro.mp4",
    Backdrop = ExportBackdrop.FromImage("stage.png"),
});

Look inside a file

dotnet run --project tools/CodeBrix.VideoPlayback.Tools -- cbvinfo clip.webm
dotnet run --project tools/CodeBrix.VideoPlayback.Tools -- cbvdecode --headless clip.cbv

cbvinfo prints the tracks, the index, the captions and the chapters, and checks the file against the streamable profile rules. cbvdecode decodes every frame to a hash and a timing summary with no display and no sound device - which is how a build is verified on a small board or a build agent.

Documentation

Every one of these NuGet packages includes AGENT-README.txt, a complete API reference and usage guide written for AI coding agents - point your agent at the file inside the package it is writing code against:

  • CodeBrix.VideoPlayback.MitLicenseForever - the playback library's guide: the session, the pool, the presenter mailbox, the converter, the containers, ten worked examples, performance notes and the pitfalls.
  • CodeBrix.VideoPlayback.Skia.MitLicenseForever - the presenter's guide: the two render paths, the composition surface, the effect chain, and ten more worked examples.
  • CodeBrix.VideoPlayback.Authoring.MitLicenseForever - the authoring library's guide: the two flavours, every encoder setting, the device-class table, the colour-grade hook, and the two things a WebM-profile file cannot carry.

Sound is played by the sibling CodeBrix.Audio.Core.MitLicenseForever / CodeBrix.Audio.MitLicenseForever packages; read their shared AGENT-README.txt for the audio side.

In the repository there is also CBV-FORMAT.txt, the bespoke container byte by byte; EXTRAS-README.txt, the headless tools, the samples and the test corpora; MAINTAINER-README.txt, the design notes and how to build, test and package it; and README-INDEX.txt, the map of all of them.

Additional sample code and usage examples are available in the CodeBrix.VideoPlayback.Tests project: https://github.com/ellisnet/CodeBrix.VideoPlayback/tree/main/tests/CodeBrix.VideoPlayback.Tests

The presenter and the authoring library have suites of their own beside it, CodeBrix.VideoPlayback.Skia.Tests and CodeBrix.VideoPlayback.Authoring.Tests.

An Android device proof that authors all three modes, exports them to MP4 and plays them back on a phone, with no ffmpeg, is in samples/VideoAuthoringAndroidProof.

License

CodeBrix.VideoPlayback is licensed under the MIT License, all three packages - see the LICENSE file.

For licensing and provenance information about the open source code included in this package, see THIRD-PARTY-NOTICES.txt.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (5)

Showing the top 5 NuGet packages that depend on CodeBrix.VideoPlayback.MitLicenseForever:

Package Downloads
CodeBrix.VideoPlayback.Skia.MitLicenseForever

Draws decoded video frames onto a Skia drawing surface, so a video player can show its picture using the same drawing technology as the rest of your UI. Converts video color data to on-screen color efficiently, using the GPU when one is available and falling back to an optimized CPU path otherwise. Supports letterboxing, custom overlay drawing on top of the video, and capturing the composed frame as an image.

CodeBrix.VideoPlayback.Dav1d.BsdLicenseForever

AV1 video decoding for CodeBrix.VideoPlayback. A source-generated binding over the dav1d decoder that decodes straight into the playback session's own frame-buffer pool - no copy between the decoder's output and the graphics upload - with self-built native libraries for Windows x64 and ARM64, macOS Intel and Apple Silicon, Linux x64, ARM64 and RISC-V 64, and Android 13+ (API 33+) ARM64 and x64. One Register() call at start-up makes AV1 playable; nothing else in an application ever names a decoder type.

CodeBrix.VideoPlayback.Authoring.MitLicenseForever

A developer tool for preparing video files for playback in your app - not something you ship inside it. Converts a source video into a compact, efficient format, with options for captions, chapters, and color adjustments. Includes a dry-run mode that shows exactly what it would do before it does anything.

CodeBrix.Platform.VideoPlayer.ApacheLicenseForever

Adds a video player to your app with the transport controls users expect: play, pause, seek, volume, and looping. It also supports letterboxing, captions, chapters, and custom color or drawing effects over the picture, and can use the GPU for smooth playback when one is available. It plays WebM and Matroska video files, including AV1-encoded content, through a fully managed decoder with no native codec to install.

CodeBrix.Android.VideoPlayer.ApacheLicenseForever

The VideoPlayer add-in for CodeBrix.Android applications: the platform-neutral assembly of the CodeBrix.Platform VideoPlayer add-in and its Android implementation, so code and XAML written against the add-in run unchanged on Android.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.285.833 37 10/12/2026
1.0.280.1149 82 10/7/2026
1.0.278.1162 122 10/5/2026
1.0.271.1195 142 9/28/2026
1.0.271.97 126 9/28/2026
1.0.256.1099 158 9/13/2026
1.0.252.1212 146 9/9/2026
1.0.251.1200 135 9/8/2026
1.0.245.280 134 9/2/2026
1.0.242.1044 159 8/30/2026
1.0.242.419 141 8/30/2026
1.0.241.1343 135 8/29/2026