EggEncoder 4.1.0

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

πŸ₯š EggEncoder

Audio encoding/decoding toolkit for .NET β€” native MP3/FLAC codec bindings, managed AAC/WMA encode/decode, and built-in waveform generation, all behind one IMediaEncoder interface.

Sponsored by eggspot.app

CI NuGet MIT License

πŸ“– Full documentation β†’

Overview

EggEncoder gives you a single IMediaEncoder abstraction β€” Probe, ConvertFile, CutFile β€” implemented entirely in-process by NativeEncoder: pure .NET codec implementations (AAC, WAV, WMA) plus native P/Invoke bindings to libmp3lame and libFLAC. No external process, no ffmpeg install, no subprocess overhead.

Why EggEncoder?

  • πŸš€ Fully native, in-process β€” direct P/Invoke to LAME (MP3) and libFLAC, no subprocess/shell-out overhead
  • 🎼 Broad format coverage β€” AAC, FLAC, MP3, WAV, WMA decode/encode; MOV/MP4 metadata probing
  • πŸ“Š Built-in waveform generation β€” normalized peak windows for any decoded stream
  • βœ‚οΈ Sample-accurate cutting β€” trim audio files without a full decodeβ†’encode round trip
  • πŸͺΆ Dependency-light β€” only Microsoft.Extensions.*.Abstractions and NLayer
  • πŸ“– MIT licensed β€” see THIRD-PARTY-NOTICES.md for the bundled native codec licenses (LGPL-2.1 LAME, BSD-style libFLAC)

Installation

dotnet add package EggEncoder

Native codec binaries (libmp3lame.dll, libFLAC.dll) ship inside the package for win-x64 and are copied to your output directory automatically.

Quick Start

using EggEncoder;

// Dependency injection (recommended)
builder.Services.AddEggEncoder();
public class MediaService(IMediaEncoder mediaEncoder)
{
    public async Task<ProbeResult> Inspect(string filePath) =>
        await mediaEncoder.Probe(filePath);

    public Task Transcode(string sourcePath, string destPath) =>
        mediaEncoder.ConvertFile(sourcePath, destPath);

    public Task Trim(string sourcePath, string destPath, int startSeconds, int endSeconds) =>
        mediaEncoder.CutFile(sourcePath, destPath, startSeconds, endSeconds);
}

Without DI

using EggEncoder;
using Microsoft.Extensions.Logging.Abstractions;

IMediaEncoder encoder = new NativeEncoder(NullLogger<NativeEncoder>.Instance);
var probeResult = await encoder.Probe("track.flac");

Supported Formats

Format Probe Decode Encode
WAV βœ… βœ… βœ…
FLAC βœ… βœ… βœ…
MP3 βœ… βœ… βœ…
AAC βœ… βœ… βœ…
WMA βœ… βœ… βœ…
MOV/MP4 (metadata only) βœ… ❌ ❌

IMediaEncoder.CutFile decodes any supported source (WAV, FLAC, MP3, AAC, WMA) and can cut into any supported destination format, including converting as it trims β€” sample-accurate, no re-encode of the untouched region.

License

MIT β€” see LICENSE. EggEncoder bundles pre-built libmp3lame.dll (LGPL-2.1) and libFLAC.dll (BSD-style) as separate, dynamically-loaded native binaries; see THIRD-PARTY-NOTICES.md for details.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  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

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
4.1.0 84 8/6/2026
4.0.0 99 8/5/2026
3.0.0 103 8/5/2026
2.0.0 97 8/5/2026
1.0.0 105 8/4/2026
0.1.0 92 8/4/2026