[Flac] 7.1 FLAC...But hao?

Nicholas Schell nschell at gmail.com
Mon Jun 11 22:49:25 PDT 2007


I know I've read about it under the FAQ and other various forums a
dozen times, FLAC is able to encode up to 8 channels. But has anyone
actually tried to do this?

I ran across this nifty 7.1 wav sample courtesy of Microsoft.
http://www.microsoft.com/windows/windowsmedia/howto/articles/Multichannel.aspx#link6
For some reason the channel mask was incorrectly set to 0x3f, so I
manually changed it to 0x063f (this should be the correct mask for 7.1
eh?). Now trying to just throw that into the reference CLI I get the
following error
"8_Channel_ID.wav: ERROR: WAVEFORMATEXTENSIBLE chunk with unsupported
channel mask=0x063F."

That made exactly no sense whatsoever...how could that channel mask be
unsupported when I've read time and time again that FLAC supports up
to 8 channels. So after a bit of browsing through the 1.1.4 source, I
found it myself in encode.c. All of the 6 channel masks are defined
but nothing beyond that.

So is it just Wave Ext. is not supported for 7.1? What format do I
need to get the Waves into to be able to encode them to 7.1 FLAC, or
does the reference encoder just not currently support 7.1? I have also
tried using the utility called Wavewizard to output the file as plain
Wave PCM, but then it gives an error along the lines that there are
more then 2 channels and it is not WAVE_FORMAT_EXTENSIBLE, so it
cannot assign channels on its own.

Most confusing part of all is that someone sent me a 7.1 FLAC sample
from a BR movie. For some reason the reference CLI is unable to decode
the file even for experimentation. I get the error
"Inosensu Kkaku kidtai-sample-track2.ogg: ERROR: stream is too big to
fit in a single WAVE file chunk"

The file is in Ogg only because it was extracted from a .MKV
(mkvextract does not output native flac) and the sample itself is only
16 seconds long. I could however decode the sample with CoreFLAC
through directshow and dump to a extensible wav file (which plays
perfectly and seems to still contain all 8 channels). Trying to run
that through the CLI encoder runs up with the same issues of
unsupported channel masks though. So again, what format does the Wave
actually need to be in in order to compress as 7.1?

Here is the 7.1 FLAC sample if you want to check it out. The full .MKV
sample is also in the directory with similar name.
http://www.cccp-project.net/beta/test_files/Inosensu%20Kkaku%20kidtai-sample-Track2.ogg


More information about the Flac mailing list