7

Both ALAC and FLAC are lossless audio formats and files will usually have more or less the same size when converted from one format to the other. I use ffmpeg -i track.flac track.m4a to convert between these two formats but I notice that the resulting ALAC files are much smaller than the original ones. When using a converter software like the MediaHuman Audio Converter, the size of the ALACs will remain around the same size as the FLACs so I guess I'm missing some flags here that are causing ffmpeg to downsample the signal.

  • ffmpeg generally needs the -acodec for any destination to be sure you get the conversation done right. There are lots of front ends that use ffmpeg but I've noticed many do not include ALAC as an output option. – Vegan Fanatic Aug 21 '18 at 18:07
14

Ok, I was probably a little quick to ask here but for the sake of future reference here is the answer:

One should pass the flag -acodec alac to ffmpeg for a lossless conversion between FLAC and ALAC:

ffmpeg -i track.flac -acodec alac track.m4a

  • 4
    To explain what's happening here: .m4a is an Apple variant of the MP4 file format. FFmpeg and most other s/w will default to the AAC encoder when outputting to mp4 or m4a, hence the express -acodec option is needed. – Gyan Jan 8 '18 at 7:15

protected by Community Nov 9 '18 at 8:17

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.