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.
Install
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 process | None |
| Setup | Nothing — 100% pure managed, no native binaries at all |
| Platform support | Windows, Linux, macOS — CI builds and tests on all three |
| Format coverage | AAC, 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 cut | Any 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);
}
Key Features
No ffmpeg install, no subprocess — everything runs in-process behind one IMediaEncoder interface.
Every codec — including MP3, FLAC, and WavPack — is pure managed C#. No native binary, no P/Invoke, anywhere in this project.
WaveformCalculator streams normalized peak windows from any decoded block.
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.
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.
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.
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.
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.
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.
Trim any supported source, into any supported destination format, without a full decode→encode round trip on the untouched region.
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.
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.
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.
services.AddEggEncoder() registers IMediaEncoder — no config required, one optional flag to silence logging.
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.