EggEncoder 4.1.0
dotnet add package EggEncoder --version 4.1.0
NuGet\Install-Package EggEncoder -Version 4.1.0
<PackageReference Include="EggEncoder" Version="4.1.0" />
<PackageVersion Include="EggEncoder" Version="4.1.0" />
<PackageReference Include="EggEncoder" />
paket add EggEncoder --version 4.1.0
#r "nuget: EggEncoder, 4.1.0"
#:package EggEncoder@4.1.0
#addin nuget:?package=EggEncoder&version=4.1.0
#tool nuget:?package=EggEncoder&version=4.1.0
π₯ 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
IMediaEncoderinterface.
Sponsored by eggspot.app
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.*.AbstractionsandNLayer - π 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 | Versions 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. |
-
net10.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.0)
- NLayer (>= 2.0.1)
-
net8.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.0)
- NLayer (>= 2.0.1)
-
net9.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.0)
- NLayer (>= 2.0.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.