Created
December 7, 2021 10:26
-
-
Save jj1bdx/87fab88a0e6a3342379660e1586b835e to your computer and use it in GitHub Desktop.
Convert FLAC to ALAC in batch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# https://sound.stackexchange.com/questions/26633/free-batch-conversion-from-flac-to-apple-lossless-alac | |
# https://stackoverflow.com/questions/55429909/could-not-find-tag-for-codec-h264-in-stream-0-codec-ffmpeg-flac-to-alac-conver | |
for name in *.flac; do \ | |
ffmpeg -nostdin -i "$name" -c:a alac -c:v copy "${name%.*}.m4a" && \ | |
ffmpeg -nostdin -i "$name" -vf "crop=((in_w/2)*2):((in_h/2)*2)" \ | |
"${name/%flac/jpg}" && \ | |
AtomicParsley "${name/%flac/m4a}" --artwork "${name/%flac/jpg}" --overWrite; \ | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment