Symphonia
Pure Rust multimedia format demuxing, tag reading, and audio decoding library
Install / Use
/learn @pdeljanov/SymphoniaREADME
Features
- Decode support for the most popular audio codecs with support for gapless playback
- Demux the most common media container formats
- Read most metadata and tagging formats
- Automatic format and decoder detection
- Basic audio primitives for manipulating audio data efficiently
- 100% safe Rust
- Minimal dependencies
- Fast with no compromises in performance!
Additionally, planned features include:
- Providing a C API for integration into other languages
- Providing a WASM API for web usage
Roadmap
Support for individual audio codecs and media formats are provided by separate crates. By default, Symphonia only enables support royalty-free open standard codecs and formats, but others may be enabled using feature flags.
Tip: All formats and codecs can be enabled with the
allfeature flag.
Status
The following status classifications are used to determine the state of development for each format or codec.
| Status | Meaning | |-----------|--------------------------------------------------------------------------------------------------------------------------| | - | In work or not started yet. | | Good | Many media streams play. Some streams may panic, error, or produce audible glitches. Some features may not be supported. | | Great | Most media streams play. Inaudible glitches may be present. Most common features are supported. | | Excellent | All media streams play. No audible or inaudible glitches. All required features are supported. |
A status of Great indicates that major development is complete and that the feature is in a state that would be acceptable for most applications to use.
A status of Excellent is only assigned after the feature passes all compliance tests. If no compliance tests are readily available, then a status of Excellent will be assigned if Symphonia's output matches that of a reference implementation, or ffmpeg, over a large test corpus.
Formats (Demuxers)
| Format | Status | Gapless* | Feature Flag | Default | Crate |
|----------|-----------|----------|--------------|---------|-----------------------------|
| AIFF | Great | Yes | aiff | No | symphonia-format-riff |
| CAF | Good | No | caf | No | symphonia-format-caf |
| ISO/MP4 | Great | No | isomp4 | No | symphonia-format-isomp4 |
| MKV/WebM | Good | No | mkv | Yes | symphonia-format-mkv |
| OGG | Great | Yes | ogg | Yes | symphonia-format-ogg |
| Wave | Excellent | Yes | wav | Yes | symphonia-format-riff |
* Gapless playback requires support from both the demuxer and decoder.
Tip: All formats can be enabled with the
all-formatsfeature flag.
Codecs (Decoders)
| Codec | Status | Gapless | Feature Flag | Default | Crate |
|------------------------------|-----------|---------|--------------|---------|----------------------------|
| AAC-LC | Great | No | aac | No | symphonia-codec-aac |
| ADPCM | Good | Yes | adpcm | Yes | symphonia-codec-adpcm |
| ALAC | Great | Yes | alac | No | symphonia-codec-alac |
| HE-AAC (AAC+, aacPlus) | - | - | he-aac | No | symphonia-codec-aac |
| HE-AACv2 (eAAC+, aacPlus v2) | - | - | he-aac-v2 | No | symphonia-codec-aac |
| FLAC | Excellent | Yes | flac | Yes | symphonia-bundle-flac |
| MP1 | Great | No | mp1, mpa | No | symphonia-bundle-mp3 |
| MP2 | Great | No | mp2, mpa | No | symphonia-bundle-mp3 |
| MP3 | Excellent | Yes | mp3, mpa | No | symphonia-bundle-mp3 |
| Opus | - | - | opus | Yes | symphonia-codec-opus |
| PCM | Excellent | Yes | pcm | Yes | symphonia-codec-pcm |
| Vorbis | Excellent | Yes | vorbis | Yes | symphonia-codec-vorbis |
| WavPack | - | - | wavpack | Yes | symphonia-codec-wavpack |
A symphonia-bundle-* package is a combination of a decoder and a native demuxer.
Tip: All codecs can be enabled with the
all-codecsfeature flag. Similarly, all MPEG audio codecs can be enabled with thempafeature flag.
Tags (Readers)
All metadata readers are provided by the symphonia-metadata crate.
For metadata formats that are standalone and not part of the media container, a feature flag may be used to toggle support.
| Format | Status | Feature Flag | Default |
|-----------------------|-----------|--------------|---------|
| APEv1 | Great | ape | Yes |
| APEv2 | Great | ape | Yes |
| ID3v1 | Great | id3v1 | Yes |
| ID3v2 | Great | id3v2 | Yes |
| ISO/MP4 | Great | N/A | N/A |
| RIFF | Great | N/A | N/A |
| Vorbis comment (FLAC) | Perfect | N/A | N/A |
| Vorbis comment (OGG) | Perfect | N/A | N/A |
Tip: All metadata formats can be enabled with the
all-metafeature flag.
Quality
In addition to the safety guarantees afforded by Rust, Symphonia aims to:
- Decode media as correctly as the leading free-and-open-source software decoders
- Prevent denial-of-service attacks
- Be fuzz-tested
- Provide a powerful, consistent, and easy to use API
Performance
Symphonia aims to be comparable to, or faster than, popular open-source C-based implementations. Currently, Symphonia's decoders are generally +/-15% the performance of FFMpeg. However, the exact range will depend strongly on the codec, which features of the codec are being leveraged in the encoding, the Rust compiler version, and the CPU architecture being compiled for.
See the benchmarks for more information.
Optimizations
All SIMD optimizations are enabled by default. SIMD support will pull in the rustfft dependency.
| Instruction Set | Feature Flag | Default |
|-----------------|-----------------|---------|
| SSE | opt-simd-sse | Yes |
| AVX | opt-simd-avx | Yes |
| Neon | opt-simd-neon | Yes |
Tip: All SIMD optimizations can be enabled with the
opt-simdfeature flag.
Examples
Basic usage examples may be found here.
For a more complete application, see symphonia-play, a simple music player.
Tools
Symphonia provides the following tools for debugging purposes:
- [
symphonia-play](https://github.com/pdeljanov/
Related Skills
himalaya
339.3kCLI to manage emails via IMAP/SMTP. Use `himalaya` to list, read, write, reply, forward, search, and organize emails from the terminal. Supports multiple accounts and message composition with MML (MIME Meta Language).
docs-writer
99.3k`docs-writer` skill instructions As an expert technical writer and editor for the Gemini CLI project, you produce accurate, clear, and consistent documentation. When asked to write, edit, or revie
coding-agent
339.3kDelegate coding tasks to Codex, Claude Code, or Pi agents via background process
tavily
339.3kTavily web search, content extraction, and research tools.
