ManagedCodecs.MonoGame
0.9.0
dotnet add package ManagedCodecs.MonoGame --version 0.9.0
NuGet\Install-Package ManagedCodecs.MonoGame -Version 0.9.0
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="ManagedCodecs.MonoGame" Version="0.9.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ManagedCodecs.MonoGame" Version="0.9.0" />
<PackageReference Include="ManagedCodecs.MonoGame" />
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 ManagedCodecs.MonoGame --version 0.9.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: ManagedCodecs.MonoGame, 0.9.0"
#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 ManagedCodecs.MonoGame@0.9.0
#: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=ManagedCodecs.MonoGame&version=0.9.0
#tool nuget:?package=ManagedCodecs.MonoGame&version=0.9.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
ManagedCodecs.MonoGame
Video for MonoGame games, in pure managed C#: VideoTexture plays an MP4, Matroska, WebM or AVI file (H.264 or MJPEG
video, AAC audio) into a Texture2D and a DynamicSoundEffectInstance. No native binaries and no codec of the
platform's, so it plays the same everywhere. The decoding runs on a thread of its own (ManagedCodecs.Playback).
using ManagedCodecs.MonoGame;
VideoTexture video;
protected override void LoadContent()
{
video = new VideoTexture(GraphicsDevice, "Content/intro.mp4");
video.Play();
}
protected override void Update(GameTime gameTime)
{
video.Update(gameTime); // the frame due into video.Texture, the audio queued
if (video.IsFinished) { /* on to the game */ }
base.Update(gameTime);
}
protected override void Draw(GameTime gameTime)
{
GraphicsDevice.Clear(Color.Black);
spriteBatch.Begin(samplerState: SamplerState.LinearClamp);
video.Draw(spriteBatch, GraphicsDevice.Viewport.Bounds); // letterboxed, aspect ratio and rotation applied
spriteBatch.End();
base.Draw(gameTime);
}
- The clock is the game's:
Updatemoves it bygameTime.ElapsedGameTimewhile playing, soPause()stops picture and sound together, and frames due while the game was busy are dropped rather than shown late. - Requirements: .NET 10 (the decoders' target) and MonoGame 3.8, any platform package: this one is compiled against MonoGame's API and doesn't bring a platform of its own.
- Speed: on 4 vCPUs at 2.1 GHz, 1080p24 and 1080p30 keep up, conversion to RGBA included.
- Options:
PlaybackOptions(Loopfor a menu's backdrop,MatrixandRangefor the colours,DecoderThreads);Volume;Playerfor the stream's facts and the decoding's timings. - Without an audio device the video plays alone. A damaged file plays up to the damage, then ends with the
exception in
Player.Error. - Not a media player: no seeking.
The README has the rest; mcplay, the repository's
MonoGame sample, is a Game around it.
| Product | Versions 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.
-
net10.0
- ManagedCodecs.Playback (= 0.9.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.9.0 | 0 | 11/7/2026 |