Considering:
http://www.commandlinefu.com/commands/view/4045/convert-wav-files-to-flac
and
ffmpeg to convert from flac to wav
Out of ffmpeg and flac which should be used to convert wav files to flac? WHY?
Considering:
http://www.commandlinefu.com/commands/view/4045/convert-wav-files-to-flac
and
ffmpeg to convert from flac to wav
Out of ffmpeg and flac which should be used to convert wav files to flac? WHY?
Make FLAC from WAV:
$ ffmpeg -i input.wav ffmpeg.flac
$ flac -o flac.flac input.wav
Compare MD5 hashes of each decoded file:
The input file:
$ ffmpeg -v 1 -i input.wav -f md5 -
MD5=1a567b5d97e62a6656283d24850b707f
ffmpeg output:
$ ffmpeg -v 1 -i ffmpeg.flac -f md5 -
MD5=1a567b5d97e62a6656283d24850b707f
flac output:
$ ffmpeg -v 1 -i flac.flac -f md5 -
MD5=1a567b5d97e62a6656283d24850b707f
This shows that both ffmpeg and flac make the exact same output when decoded, and the decoded output of the FLAC files are exactly the same as the decoded WAV file.
flac was slightly faster in my single, lazyass test, but not significantly.
ffmpeg can decode a huge variety of formats (not that you should be making FLAC files from lossy inputs).
ffmpeg will always attempt to copy any existing metadata (but see --keep-foreign-metadata for flac).
Both are great tools, so use whatever you prefer.