Hi All, It is possible to make Opus/CELT a lossless coder if I allow a sufficiently high bit rate? We considered using FLAC, but FLAC's latency is well beyond the acceptable range. Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/opus/attachments/20120822/60c69469/attachment.htm
On Wed, Aug 22, 2012 at 7:15 PM, LiZ <liz at miraxlabs.com> wrote:> It is possible to make Opus/CELT a lossless coder if I allow a sufficiently > high bit rate?No, sadly.> We considered using FLAC, but FLAC's latency is well beyond > the acceptable range.Flac can have latency as low as you like? e.g. you can code 64 sample frames. You do lose compression efficiency in doing this, however.
LiZ wrote:> Hi All, > > It is possible to make Opus/CELT a lossless coder if I allow > a sufficiently high bit rate? We considered using FLAC, but FLAC's > latency is well beyond the acceptable range.No. The PVQ codebook used in the MDCT layer never includes code points at exact integer values at any rate, the allowable allocations for the bands aren't sufficient achieve 16 bits of depth should they contain enough energy to require this, the MDCT itself is not perfectly reversible (due to truncation and rounding in the arithmetic), and frequencies above 20 kHz are never encoded, to name just a few issues. There are similar amounts of truncation and rounding in the LPC layer that prevent it from being exactly reversible, as well.
On Wed, Aug 22, 2012 at 5:09 PM, Gregory Maxwell <gmaxwell at gmail.com> wrote:> Flac can have latency as low as you like? e.g. you can code 64 sample > frames. You do lose compression efficiency in doing this, however.For more info on how to do this see encoder_set_blocksize: http://flac.sourceforge.net/api/group__flac__stream__encoder.html#ga21 However, for low-latency lossless audio, you may actually want use uncompressed PCM (like WAV). With a lossless compressor like FLAC, there is no guarantee that the audio will be made smaller (it can even become larger), so you will need enough bandwidth to send uncompressed audio anyway. if you rely on the compression to work, then your system will break on the occasional incompressible block. For low-latency lossless audio, compression only makes sense if you have a lot of available peak bandwidth, but for some reason (e.g. ISP quota) are trying not to use it.