A shell script to batch-convert FLAC audio files to ALAC (Apple Lossless Audio Codec) format.
FLAC and ALAC are both lossless audio formats — converting between them results in no quality loss. ALAC is natively supported by Apple devices and iTunes/Music, making it the preferred format for Apple ecosystems.
- macOS
- ffmpeg
brew install ffmpegchmod +x flac-alac-converter.sh
# Convert all subdirectories that contain FLAC files
./flac-alac-converter.sh
# Convert a specific album directory
./flac-alac-converter.sh "/path/to/AlbumName"
# Convert a single FLAC file (output placed next to source)
./flac-alac-converter.sh track01.flac
# Preview without writing any files
./flac-alac-converter.sh --dry-run
./flac-alac-converter.sh -n "/path/to/album"
./flac-alac-converter.sh --dry-run track01.flacFor each album directory, a sibling directory is created with ALA appended (e.g. AlbumName ALA). FLAC files are converted to .m4a (ALAC); .jpg and .cue files are copied as-is. Embedded cover art is preserved.
MIT — see LICENSE for details.