A fast, parallel batch converter that transforms FLAC files to ALAC (Apple Lossless) format while preserving all metadata and cover art. Built in Rust for maximum performance and reliability.
- 🎵 Lossless conversion from FLAC to ALAC
- 📋 Complete metadata preservation (title, artist, album, genre, etc.)
- 🖼️ Cover art preservation
- ⚡ Parallel processing for fast batch conversion
- 🔍 Bit-perfect verification option (PCM comparison)
- 🖥️ Cross-platform (Windows, macOS, Linux)
- 💻 Dual interface: Command line + GUI
- 📁 Directory structure preservation
- 🛡️ Robust error handling
- FFmpeg must be installed and available in your system PATH
- Windows: Download from ffmpeg.org
- macOS:
brew install ffmpeg - Linux:
sudo apt install ffmpeg(Ubuntu/Debian) or equivalent
git clone https://github.com/yourusername/flac2alac-batch.git
cd flac2alac-batch
cargo build --releaseThe binary will be available at target/release/flac2alac-batch (Linux/macOS) or target\release\flac2alac-batch.exe (Windows).
Launch the graphical interface:
# Linux/macOS
./target/release/flac2alac-batch --gui
# Windows
target\release\flac2alac-batch.exe --guiThe GUI provides:
- Folder browsers for input/output selection
- Progress tracking with real-time updates
- Error reporting with detailed messages
- All conversion options in an intuitive interface
# Convert single file
flac2alac-batch --input song.flac
# Convert entire directory
flac2alac-batch --input /path/to/flac/files
# Specify output directory
flac2alac-batch --input /music/flac --output /music/alac# Use 8 parallel jobs for faster conversion
flac2alac-batch --input /music --jobs 8
# Verify bit-perfect conversion (slower but ensures quality)
flac2alac-batch --input /music --verify
# Dry run (see what would be converted without doing it)
flac2alac-batch --input /music --dry-run
# Handle existing files
flac2alac-batch --input /music --overwrite replace # replace existing
flac2alac-batch --input /music --overwrite skip # skip existing
flac2alac-batch --input /music --overwrite prompt # ask for each fileOptions:
-i, --input <PATH> FLAC file or directory containing FLAC files
-o, --output <DIR> Output directory (preserves structure, defaults to source directory)
-j, --jobs <N> Number of parallel conversion jobs
--verify Enable bit-perfect verification (PCM hash comparison)
--overwrite <MODE> How to handle existing files [default: skip] [possible values: skip, prompt, replace]
--dry-run Simulation mode: show what would be converted without doing it
--gui Launch graphical user interface
-h, --help Print help
-V, --version Print version
- File Discovery: Recursively scans input directory for
.flacfiles - Parallel Processing: Uses Rayon for CPU-efficient parallel conversion
- FFmpeg Integration: Leverages FFmpeg for reliable audio conversion
- Metadata Mapping: Explicitly maps FLAC Vorbis Comments to iTunes-compatible MP4 atoms
- Quality Verification: Optionally compares PCM data to ensure bit-perfect conversion
Metadata Preservation:
- Maps FLAC Vorbis Comments to MP4/iTunes tags
- Preserves cover art as attached pictures
- Maintains all standard fields (title, artist, album, date, genre, track, album_artist)
- Custom fields are preserved when possible
Audio Quality:
- Pure lossless conversion (FLAC → PCM → ALAC)
- No resampling or quality loss
- Optional bit-perfect verification via SHA256 hash comparison
- Preserves original bit depth and sample rate
Performance:
- Parallel processing using all available CPU cores
- Efficient memory usage with streaming conversion
- Progress tracking for long-running batch jobs
The tool uses this optimized FFmpeg command:
ffmpeg -i input.flac \
-map 0:a:0 -map 0:v? \
-c:a alac -c:v copy \
-disposition:v attached_pic \
-map_metadata 0 \
-map_metadata:s:v:0 0:s:v:0 \
output.m4a# Convert your entire music library
flac2alac-batch --input ~/Music/FLAC --output ~/Music/ALAC --jobs 8
# Verify quality for archival purposes
flac2alac-batch --input ~/Music/FLAC --verify --jobs 4# Convert specific album
flac2alac-batch --input "~/Music/Artist - Album (FLAC)"
# Preview what would be converted
flac2alac-batch --input "~/Music/Artist - Album (FLAC)" --dry-run"FFmpeg not found":
- Ensure FFmpeg is installed and in your system PATH
- Test with
ffmpeg -versionin terminal
"No FLAC files found":
- Check that input path contains
.flacfiles - Ensure you have read permissions for the directory
Metadata missing in iTunes:
- This is usually resolved automatically with the current version
- Try re-importing files into iTunes after conversion
Permission errors:
- Ensure write permissions for output directory
- On Windows, try running as administrator if needed
- Use
--jobsparameter to match your CPU core count - Place input/output on fast storage (SSD) for better performance
- For large libraries, consider converting in batches
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.