-
-
Save HashemKhalifa/54e6ec22a1c72ae3656d7ea4020b8147 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