Convert audio file to FLAC with ffmpeg?

Forget the FFmpeg version that's included within ffmpegX – it's really old. Obviously it wasn't compiled with FLAC support.

You could:

  • Download a static build from the FFmpeg homepage. Just download the archive, extract it to some folder, then navigate to that folder and run it from there (./ffmpeg), or add it to your $PATH.
  • Install it using Homebrew, a package manager for OS X.
  • Install it from source. Here's a compilation guide for OS X.

Then, just try it again:

ffmpeg -i audio.xxx -c:a flac audio.flac

on linux 12.04 lts desktop this

ffmpeg -i audio.xxx -c:a flac audio.flac

has this error

" Unrecognized option 'c:v' Failed to set value 'flac' for option 'c:v' "

this works without error

ffmpeg -i input.flv(mp4)  output.flac