FFmpeg Recipes
Convert FLAC to ALAC
Run this inside a directory containing the source .flac files. It creates adjacent .m4a files and leaves the originals untouched. -vn excludes embedded video streams such as cover-art video tracks.
for file in *.flac; do
ffmpeg -i "$file" -vn -acodec alac "${file%.flac}.m4a"
done
Test one file before converting a large collection, especially when metadata and cover art must be preserved.
See the official FFmpeg command-line documentation when adding options or adapting the recipe to another container.