HyperCodecs 1.1.1

dotnet add package HyperCodecs --version 1.1.1
                    
NuGet\Install-Package HyperCodecs -Version 1.1.1
                    
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="HyperCodecs" Version="1.1.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="HyperCodecs" Version="1.1.1" />
                    
Directory.Packages.props
<PackageReference Include="HyperCodecs" />
                    
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 HyperCodecs --version 1.1.1
                    
#r "nuget: HyperCodecs, 1.1.1"
                    
#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 HyperCodecs@1.1.1
                    
#: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=HyperCodecs&version=1.1.1
                    
Install as a Cake Addin
#tool nuget:?package=HyperCodecs&version=1.1.1
                    
Install as a Cake Tool

HyperCodecs

Sound and video containers and decoders written in managed C# for .NET 10 and .NET 11. This package loads no native library. For system sound output and hardware video decoding, add HyperCodecs.Platform. Everything reads and writes spans, works on Linux, Windows and macOS, and is trim and Native AOT safe.

HyperCodecs is part of the Hyper PDF Viewer family and lives at glennawatson/HyperCodecs.

Supported formats

Kind Formats
Containers MP4 and M4A (including fragmented files), Matroska and WebM, Ogg, WAVE, FLAC files, raw ADTS AAC and MP3
Sound AAC-LC, MP3, FLAC, Opus, Vorbis, PCM
Video H.264, H.265

Decode sound

using HyperCodecs;

using var container = MediaContainers.Open("song.m4a") ?? throw new InvalidDataException("Unsupported file.");
var index = container.FindTrack(MediaTrackKind.Audio);
using var decoder = AudioDecoders.Create(container.Tracks[index]) ?? throw new InvalidDataException("Unsupported codec.");

var pcm = new PcmBuffer();
var packet = new MediaPacket();
while (container.ReadPacket(packet))
{
    if (packet.Track == index)
    {
        decoder.Decode(packet, pcm);

        // Read pcm.Samples here, then clear the buffer for the next packet.
        pcm.Clear();
    }
}

PcmBuffer.Samples holds interleaved 32-bit float samples between -1 and 1. decoder.SampleRate and decoder.Channels describe them.

Decode video

VideoDecoders.Create returns a decoder for an H.264 or H.265 track. Decode adds finished pictures to a List<VideoFrame> in display order, and Flush adds the pictures still held back at the end. Give a frame back with Recycle when you are done with it so the decoder can reuse its planes.

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.  net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.
  • net11.0

    • No dependencies.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on HyperCodecs:

Package Downloads
HyperCodecs.Platform

Operating system sound output and hardware video decoding for HyperCodecs: WASAPI and Media Foundation on Windows, Audio Toolbox and VideoToolbox on Apple systems, AudioTrack and MediaCodec on Android, and a plain build with none. Linux has its own package, HyperCodecs.Platform.Linux. Each build holds only the code for its own system, and the managed decoders in HyperCodecs remain the fallback.

HyperCodecs.Platform.Linux

PulseAudio (and PipeWire) sound output and VA-API hardware video decoding for HyperCodecs on Linux.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.1 364 11/23/2026
1.1.0 2,033 11/14/2026
1.0.0 1,296 10/25/2026