Skip to main content

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, used here as an output option, excludes video streams such as cover-art streams from the output.

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.

Use the ffprobe reference to inspect streams and container metadata before and after conversion. Its show_streams and show_format options help check the actual audio codec, sample rate, channels, and tags, rather than inferring them from a filename extension.

Explore connectionsOpen network