Home /Modules/codecs/CODECS.md

CODECS.md

codecs/CODECS.md · 82 line(s) · markdown

SLeeLa Codec Standards Registry

Date: 2026-09-28

1. Purpose

This document establishes the major audio-codec coverage expected by SLeeLa and separates codec identification from actual encode/decode implementation.

2. Registry

IDStandardExtensions / containerPrimary useCurrent handler
PCM_WAVPCM / RIFF WAVE.wavUncompressed PCMNative
AIFFAudio Interchange File Format.aif, .aiffPCM/containerRecognized
FLACFree Lossless Audio Codec.flacLosslessBackend
ALACApple Lossless.m4a, .cafLosslessBackend
MP3MPEG Layer III.mp3LossyBackend
AACMPEG AAC.aac, .m4aLossyBackend
HE_AACHigh-Efficiency AAC.aac, .m4aLow-bitrate lossyBackend
VORBISOgg Vorbis.oggLossyBackend
OPUSOpus.opus, .ogg, .webmSpeech/musicBackend
SPEEXSpeex.spx, .oggSpeechBackend
WMAWindows Media Audio.wmaLossy/lossless familyBackend
AC3Dolby Digital AC-3.ac3MultichannelBackend
EAC3Enhanced AC-3.eac3, .ec3MultichannelBackend
AMR_NBAMR Narrowband.amrSpeechBackend
AMR_WBAMR Wideband.awbSpeechBackend
G711_MULAWITU-T G.711 μ-law.au, .ulawTelephonyBackend/interop
G711_ALAWITU-T G.711 A-law.au, .alawTelephonyBackend/interop
MIDIMIDI.mid, .midiMusical eventsEvent format
MATROSKA_AUDIOMatroska.mkaContainerContainer
WEBM_AUDIOWebM.webmContainerContainer

3. Capability Semantics

The registry distinguishes:

This distinction is required for reliable capability reporting.

4. Implementation Order

  1. Establish common handler ABI and registry.
  2. Keep PCM/WAV on the native Audio API path.
  3. Add lossless codecs: FLAC and ALAC.
  4. Add common lossy codecs: MP3, AAC/HE-AAC, Vorbis, and Opus.
  5. Add speech codecs: Speex and AMR-NB/AMR-WB.
  6. Add telephony G.711 A-law/μ-law.
  7. Add multichannel AC-3/E-AC-3.
  8. Add WMA through a separately qualified backend where licensing/platform constraints permit.
  9. Add container adapters for AIFF, Matroska, and WebM.
  10. Add conformance fixtures for every codec actually implemented.

5. Security and Correctness

Every future decoder must:

6. Licensing

Codec support must not imply that a patent, trademark, proprietary SDK, or third-party implementation is included in SLeeLa. Each external backend must be reviewed for its license and distribution terms before it becomes a bundled dependency.

7. Status

The registry establishes coverage and dispatch contracts. It does not claim that every listed codec already has an in-tree encoder/decoder.

The next implementation work is codec-by-codec conformance, beginning with lossless formats and then the common lossy/speech families.