Symphonia
A pure Rust multimedia format demuxing, tag reading, and audio decoding library supporting AAC, FLAC, MP3, Vorbis, and more
Features
Symphonia is designed to be a comprehensive audio decoding solution for Rust applications, offering powerful features with zero unsafe code.Pure Rust
100% safe Rust with no unsafe code, providing memory safety and security guarantees
15+ Codecs
Support for AAC, FLAC, MP3, Vorbis, ALAC, PCM, ADPCM, and more
Multiple Formats
Demux MP4, MKV, OGG, WAV, AIFF, and CAF container formats
Metadata Reading
Read ID3v1/v2, Vorbis Comment, and other metadata formats
Gapless Playback
Full support for gapless playback across supported codecs
Auto Detection
Automatic format and codec detection from media sources
Modular Design
Feature flags for fine-grained control over dependencies
High Performance
Optional SIMD optimizations for maximum performance
Quick Example
Here’s a minimal example of decoding an audio file with Symphonia:Get Started
Installation
Add Symphonia to your Cargo.toml and enable the features you need
Quickstart
Learn the basics and decode your first audio file in minutes
Core Concepts
Understand Symphonia’s architecture and design principles
API Reference
Explore the complete API documentation
Supported Formats and Codecs
- Codecs
- Formats
- Metadata
- AAC-LC - Advanced Audio Coding (requires
aacfeature) - FLAC - Free Lossless Audio Codec (default)
- MP3 - MPEG-1/2 Audio Layer III (requires
mp3feature) - Vorbis - Ogg Vorbis (default)
- ALAC - Apple Lossless (requires
alacfeature) - PCM - Pulse Code Modulation (default)
- ADPCM - Adaptive Differential PCM (default)
- Opus - Opus codec (requires
opusfeature) - WavPack - WavPack lossless (requires
wavpackfeature)
Why Symphonia?
Memory Safety
Memory Safety
Written in 100% safe Rust with no unsafe code blocks, Symphonia provides strong memory safety guarantees and helps prevent common audio codec vulnerabilities like buffer overflows.
Performance
Performance
Symphonia aims to match or exceed the performance of popular C-based implementations like FFmpeg. With optional SIMD optimizations, performance is typically within ±15% of FFmpeg for most codecs.
Modular Architecture
Modular Architecture
Use feature flags to include only the codecs and formats you need, keeping binary sizes small and dependencies minimal. This modular design makes it easy to extend with custom codecs.
Cross-Platform
Cross-Platform
Works seamlessly across Linux, macOS, Windows, and other platforms supported by Rust. No platform-specific dependencies or system libraries required.
Community and Support
GitHub Repository
Star the repo, report issues, and contribute to the project
Examples
Explore working examples and sample projects
Benchmarks
Compare performance against other audio libraries
FAQ
Find answers to common questions