[flac-dev] Encode wav to uncompressed flac

Erik de Castro Lopo mle+la at mega-nerd.com
Mon Dec 2 00:52:08 PST 2013


Maciej Mączyński wrote:

> File size is not important for me. I need audio data from wav file and 
> metadata in one file.

But FLAC is lossless! When you convert a WAV to FLAC, you get a file
where the decoded audio data is exactly the same as in the WAV file.
Why would you want a larger file that is exactly the same as the
compressed file?

Anyway, like I hinted in my previous email, WAV files contain a single
contiguous block of audio data while FLAC contains multiple chunks of
audio data each with its own header. This is true even when the FLAC is 
uncompressed.

> How to encode a wav file to an uncompressed flac file?

The flac command line parameters are here:

    https://www.xiph.org/flac/documentation_tools_flac.html#encoding_options

but I don't see a way if doing it with what's there.

If you want to mess about with it you can check flac out of git and
grab the revision before this one:

    https://git.xiph.org/?p=flac.git;a=commit;h=fc360735ce4d1aa88a94bfccdd3bea5bdd19a8d6

The versions before that commit do what you want.

Erik
-- 
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/


More information about the flac-dev mailing list