10
5
I have a lot of WAV files that I do not wish to import into iTunes to convert. There are too many. I would like a way to convert these to Apple lossless in the terminal before importing to iTunes.
10
5
I have a lot of WAV files that I do not wish to import into iTunes to convert. There are too many. I would like a way to convert these to Apple lossless in the terminal before importing to iTunes.
16
You'll need to make a short bash for loop in a script (or xargs
) but the command in question you care about is:
afconvert -d alac in.wav out.m4a
More info can be found by running man afconvert
or afconvert -h
.
afconvert
has a pretty limited range of input formats, I'd suggest usingffmpeg
which has the builtin alac encoder too but supports tons of audio formats and it also tries to keep the metadata from the source as much as possible. e.g.ffmpeg -i input.whatever -vn -c:a alac -f ipod output.m4a
– Meow – 2018-03-30T15:09:46.0701Simple one line loop example:
for file in *.wav; do afconvert -d alac "$file" "${file%wav}m4a"; done
– flori – 2013-08-10T13:40:56.823