Discussion:
[Flac] Increasing number of channels?
J.B. Nicholson
2016-10-29 01:24:04 UTC
Permalink
Per https://xiph.org/flac/faq.html#general__channels currently FLAC
supports 1 through 8 channels. This is fine for 5.1 surround sound (6
channels). But some of the newer surround sound systems can handle many
more channels. Is it still convenient to have all of the audio channels in
one file for, say, a 16 channel audio track?

I don't know much about the history of FLAC. How did this many channels
come to be the number supported? Is there any interest in increasing the
number of channels?

Thanks for all the hard work on FLAC, I continue to get a lot of use out of
FLAC.
Brian Willoughby
2016-10-29 02:04:54 UTC
Permalink
The stream header only has 3 bits for the channel count, so it's not possible to support more than 8 channels without breaking compatibility with all embedded products that support FLAC, not to mention old and existing software. Part of the benefit of FLAC is that it enjoys such wide support across computer operating systems and embedded devices like audio players and digital recorders - I'd strongly recommend against changing something this low-level just for a little convenience for rare channel counts.

It might be worth losing compatibility with the existing installed base if there were any real advantage to higher channel counts, but there really isn't. FLAC can do extra compression on stereo files, such that one 2-channel FLAC can take less space than two 1-channel FLAC files. However, the compression advantages stop at 2 channels. There is no cross-compression with channels beyond 2. You might as well store separate FLAC files and group them in a directory.

Note that software like ProTools stores each channel in its own file. So, at least the original FLAC format supports more than that. I do often take advantage of the additional compression by converting audio recordings from dual mono files into a single stereo file before compression.

There might still be a solution for you, though. Ogg and other formats can embed FLAC data inside another container, so it might be possible to create a 16-channel "FLAC" in an Ogg container as two 8-channel FLAC files or even as eight stereo FLAC files for maximum compression. I don't know whether Ogg is optimized for streaming such that it could interleave multiple FLAC files this way, but it's worth investigating.

Brian Willoughby
Sound Consulting
Per https://xiph.org/flac/faq.html#general__channels currently FLAC supports 1 through 8 channels. This is fine for 5.1 surround sound (6 channels). But some of the newer surround sound systems can handle many more channels. Is it still convenient to have all of the audio channels in one file for, say, a 16 channel audio track?
I don't know much about the history of FLAC. How did this many channels come to be the number supported? Is there any interest in increasing the number of channels?
Thanks for all the hard work on FLAC, I continue to get a lot of use out of FLAC.
J.B. Nicholson
2016-10-29 07:05:02 UTC
Permalink
Post by Brian Willoughby
There might still be a solution for you, though. Ogg and other formats
can embed FLAC data inside another container, so it might be possible to
create a 16-channel "FLAC" in an Ogg container as two 8-channel FLAC
files or even as eight stereo FLAC files for maximum compression. I
don't know whether Ogg is optimized for streaming such that it could
interleave multiple FLAC files this way, but it's worth investigating.
Thanks for the informative response, I'll look into this. I wasn't aware
any compression advantages don't extend beyond 2 channels.

Please consider switching to a mail client that respects the
Mail-Followup-To header; I had this header set to the list address because
I prefer to pick up my responses on the list. I don't want another copy
sent to me as well. There are some free software mail readers that will
respect the Mail-Followup-To header like Mozilla Thunderbird.

Thanks again for your help.
Martin Leese
2016-10-29 18:53:00 UTC
Permalink
Post by Brian Willoughby
The stream header only has 3 bits for the channel count, so it's not
possible to support more than 8 channels without breaking compatibility with
all embedded products that support FLAC, not to mention old and existing
software.
A second problem is that of interleaving. This
is described in the following 2009 post to the
flac-dev list:
http://lists.xiph.org/pipermail/flac-dev/2009-September/002709.html

...
Post by Brian Willoughby
There might still be a solution for you, though. Ogg and other formats can
embed FLAC data inside another container, so it might be possible to create
a 16-channel "FLAC" in an Ogg container as two 8-channel FLAC files or even
as eight stereo FLAC files for maximum compression. I don't know whether Ogg
is optimized for streaming such that it could interleave multiple FLAC files
this way, but it's worth investigating.
Using OggFLAC with multiple FLAC streams
would also solve the interleaving problem.
However, it creates the problem of where and
how to store metadata describing which FLAC
stream contains what channels.

Regards,
Martin
--
Martin J Leese
E-mail: martin.leese stanfordalumni.org
Web: http://members.tripod.com/martin_leese/
Continue reading on narkive:
Loading...