-
-
Save pltb/244899d900a1b0305467f50e32133cc3 to your computer and use it in GitHub Desktop.
FLAC -> ALAC convesion script with downsampling to 16bit/44100kHz
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
#!/usr/bin/env bash | |
set -e | |
f2a () { | |
if [ -z $1 ]; then | |
echo "usage: $0 dir" | |
return 1 | |
fi | |
for file in "$1"/*.flac; do | |
echo -n "." | |
ffmpeg -i "$file" -sample_fmt s16p -map 0:a -ar 44100 -acodec alac "${file%.*}.m4a" | |
done | |
} | |
f2a $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Was first using this script, then changed it to only use
afconvert
, but then decided to simply useffmpeg