-
-
Save pltb/4e75f0f5a69603c7027ee6bba1cb1a8d to your computer and use it in GitHub Desktop.
Convert FLAC to ALAC with downsampling
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 -ar 48000 -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