Created
October 18, 2018 19:02
-
-
Save safareli/ce9c2af5ea7c4f04e8850e7eb3f8d7e2 to your computer and use it in GitHub Desktop.
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
FMT=flac | |
# Create identical directory structure under new "alac" folder | |
find . -type d | while read d; do | |
mkdir -p "alac/$d" | |
done | |
find . -name "*$FMT" | sort | while read f; do | |
ffmpeg -i "$f" -acodec alac -vn "alac/${f[@]/%$FMT/m4a}" < /dev/null; | |
FDIR=`dirname "$f"`; | |
if [ -f "${FDIR}/cover.jpg" ] | |
then | |
AtomicParsley "alac/${f[@]/%$FMT/m4a}" --artwork "${FDIR}/cover.jpg" --overWrite | |
fi | |
if [ -f "${FDIR}/Cover.jpg" ] | |
then | |
AtomicParsley "alac/${f[@]/%$FMT/m4a}" --artwork "${FDIR}/Cover.jpg" --overWrite | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment