Free & MIT OR Apache-2.0 Licensed

Audio encode/decode without the ceremony

One IMediaEncoder interface, 100% pure managed C# and fully in-process. 12 formats — AAC, AIFF, ALAC, AU, FLAC, MP3, Opus, TTA, Vorbis, WAV, WavPack, WMA, plus MOV/MP4 probing — no native binary, no P/Invoke, anywhere in this project, built-in waveform generation, and an opt-in PCM transform pipeline (resampling, normalization, dynamics compression, noise gating, peak limiting, echo/delay, pan/balance, remix, fades, parametric EQ, FIR filtering, mixing) — no ffmpeg, no subprocess, no platform restriction.

0
External processes
12
Codecs (AAC/AIFF/ALAC/AU/FLAC/MP3/Opus/TTA/Vorbis/WAV/WavPack/WMA)
MIT / Apache-2.0
Free forever
.NET 8–10
Supported targets

Install

dotnet add package EggEncoder

Supports net8.0, net9.0, net10.0. No native binaries of any kind — just the package. Runs anywhere .NET 8/9/10 runs (Windows, Linux, macOS).

Fully Managed

EggEncoder
External processNone
SetupNothing — 100% pure managed, no native binaries at all
Platform supportWindows, Linux, macOS — CI builds and tests on all three
Format coverageAAC, AIFF (incl. AIFC), ALAC, AU, FLAC, MP3, Opus, TTA, Vorbis, WAV (incl. IMA/MS/Yamaha ADPCM and G.711), WavPack, WMA; MOV/MP4 metadata + mono AAC audio decode
Sample-accurate cutAny source (incl. WMA) to any dest format — no re-encode of the untouched region

30-Second Quick Start

using EggEncoder;

builder.Services.AddEggEncoder();

// anywhere in the app
public class MediaService(IMediaEncoder mediaEncoder)
{
    public Task<ProbeResult> Inspect(string path) => mediaEncoder.Probe(path);
}

Full Getting Started guide →

Key Features

🎵
Zero External Dependencies

No ffmpeg install, no subprocess — everything runs in-process behind one IMediaEncoder interface.

⚡
100% Pure Managed

Every codec — including MP3, FLAC, and WavPack — is pure managed C#. No native binary, no P/Invoke, anywhere in this project.

📊
Built-in Waveform Generation

WaveformCalculator streams normalized peak windows from any decoded block.

🏷
WAV Metadata Tags

Probe surfaces a WAV file's 'LIST'/'INFO' chunk (title, artist, etc.) as ProbeResult.Tags, keyed by raw chunk ID — and WavWriter.Create can write them back out too.

🏷
MP3 ID3v2 Tags

Probe surfaces an MP3 file's ID3v2.3/2.4 text frames (title, artist, album, etc.) as the same ProbeResult.Tags, keyed by raw frame ID — and Mp3Encoder.Encode/OpenSession can write a fresh ID3v2.4 tag back out too.

💬
FLAC/Opus/Vorbis Comment Tags

Probe surfaces a FLAC, Opus, or Vorbis file's comment tags (title, artist, album, etc.) as the same ProbeResult.Tags, keyed by raw field name — and each format's own Encoder.Encode/OpenSession can write them back out too.

🎵
AIFF Metadata Tags

Probe surfaces an AIFF file's 'NAME'/'AUTH'/'(c) ' text chunks (and an embedded ID3v2 'ID3 ' chunk, if present) as the same ProbeResult.Tags — and AiffWriter.Create can write the three native text chunks back out too.

🔊
EBU R128 Loudness Measurement

Probe surfaces real ITU-R BS.1770-4 / EBU R128 integrated loudness (in LUFS) as ProbeResult.IntegratedLoudness — K-weighted, gated block averaging per the standard, not just a sample-level RMS. See Advanced Features.

🌊
Stream-based Probe

Probe(Stream, AudioFormat) probes a source that isn't a local file — an HTTP response body, blob storage, an in-memory buffer. Every supported format: WAV, AIFF, AU, FLAC, MP3, AAC, WavPack, TTA, ALAC, Opus, Vorbis, WMA, and MOV/MP4.

✂
Sample-Accurate Cutting

Trim any supported source, into any supported destination format, without a full decode→encode round trip on the untouched region.

🛑
Cancellation

ConvertFile/CutFile (and Probe) each have a CancellationToken-accepting overload; ConvertFile/CutFile check it once per decoded block for real, sub-second cancellation. See Advanced Features.

🌊
Stream-based ConvertFile/CutFile

Convert/cut between a source Stream and a destination Stream — any Stream-readable source format into a WAV, AIFF, or AU Stream destination today, PCM transform pipeline included, more destination formats landing incrementally. See Advanced Features.

🔍
MOV/MP4 Probing + Audio Decode

Manual atom-tree walker reads duration, dimensions, and codec four-cc with no native dependency — plus decodes a mono AAC-LC audio track when one's present.

🔌
One-Line DI

services.AddEggEncoder() registers IMediaEncoder — no config required, one optional flag to silence logging.

🎶
PCM Transform Pipeline

Opt-in resampling, gain/peak/loudness normalization, dynamics compression, noise gating, peak limiting, echo/delay, stereo pan/balance, channel remix, bit-depth/float conversion, fades, parametric EQ (biquad + Butterworth), general FIR filtering, mixing, and concatenation — layered onto Convert/Cut without touching the original API. See Advanced Features.

Links