🎉 Smart AAC Encoder Detection
This release introduces automatic AAC encoder detection with intelligent fallback, solving compatibility issues across different platforms and FFmpeg builds.
✨ What's New
Automatic Encoder Detection
- Smart fallback chain:
aac_at(Apple Silicon) →libfdk_aac(Fraunhofer) →aac(FFmpeg native) - Works out of the box on all platforms - no manual configuration needed
- Solves GitHub Issue #1: Linux users with
libfdk_aacnow work seamlessly - Thread-safe lazy detection with caching (runs once per process)
New CLI & Configuration
- New CLI flag:
--aac-encoderfor manual encoder overrideaudiobook-forge build --aac-encoder libfdk_aac
- New config option:
advanced.aac_encoderadvanced: aac_encoder: "auto" # or "aac_at", "libfdk_aac", "aac"
Enhanced Check Command
The check command now shows available encoders:
✓ FFmpeg
AAC Encoders: aac_at (selected), libfdk_aac, aac
🔧 Improvements
- Better error messages with encoder-specific guidance
- Backward compatibility - old
use_apple_silicon_encoderconfig still works - Platform-specific intelligence - automatically selects best encoder for your system
- Encoder-aware threading - different threading behavior per encoder type
🏗️ Technical Details
- New module:
src/audio/encoder.rs(163 lines, 7 passing tests) - Performance: ~50-100ms one-time detection cost, cached for process lifetime
- Files modified: 14 files across audio, config, CLI, and validation modules
- Tests: All encoder-related tests passing (7/7)
🌍 Platform Support
- macOS with Apple Silicon: Auto-selects
aac_athardware encoder - macOS Intel: Falls back to
aacorlibfdk_aacif available - Linux: Auto-selects
libfdk_aacif available, otherwiseaac - Windows: Uses
aac(universal fallback)
📦 Installation
Cargo:
cargo install audiobook-forge --forceFrom source:
git clone https://github.com/juanra/audiobook-forge
cd audiobook-forge
cargo install --path .🙏 Acknowledgments
Thanks to @for-coursera for reporting GitHub Issue #1 and providing detailed logs that helped identify and solve this compatibility issue!
Full Changelog: https://github.com/juanra/audiobook-forge/blob/main/CHANGELOG.md