Andrew P. Lentvorski
2017-Sep-25 17:24 UTC
[opus] Force Opus/CELT to encode 2 mono instead of 1 stereo
Hi, folks, I have an old CELT thing that I'm updating to Opus and I'm trying to get individual pieces upgraded. My first task is upgrading the CELT encoder to Opus. The old CELT thing treated the L and R channels as independent mono streams, encoded them somehow with CELT to form one bitstream, sent one bitstream across, and then unpacked it manually after the decoder. Can I do that with Opus? Right now, I'm choosing OPUS_APPLICATION_RESTRICTED_LOWDELAY in order to only use the CELT subsystem. However, I'm getting a lot of bleedthrough on the stereo channels which I didn't get before. Is there a magic setting to adjust this? Thanks, -a
Ralph Giles
2017-Sep-25 17:43 UTC
[opus] Force Opus/CELT to encode 2 mono instead of 1 stereo
On 2017-09-25 10:24 AM, Andrew P. Lentvorski wrote:> The old CELT thing treated the L and R channels as independent mono > streams, encoded them somehow with CELT to form one bitstream, sent one > bitstream across, and then unpacked it manually after the decoder.You can try calling `opus_encoder_ctl(enc, OPUS_SET_FORCE_CHANNELS(2))` on the encoder context. That will prevent the encoder from producing mono packets when it thinks that's a more efficient representation of the signal. Does upping the bitrate help? In general, I suspect the answer is no. The opus encoder expects to exploit correllations between the two channels when given them, so it's not too surprising there's bleed-through at low bitrates. The general expectation is that applications will use distinct codec contexts for uncoupled streams, or for coupled streams with more that two channels. -r
Jean-Marc Valin
2017-Sep-25 18:15 UTC
[opus] Force Opus/CELT to encode 2 mono instead of 1 stereo
At very low bitrate (e.g. < 32 kb/s) the encoder can't preserve all the stereo width. But if you're encoding at higher bitrates, then there should be absolutely no energy leakage across channels (it's actually enforced by the bitstream(. Jean-Marc On 25/09/17 01:24 PM, Andrew P. Lentvorski wrote:> Hi, folks, > > I have an old CELT thing that I'm updating to Opus and I'm trying to get > individual pieces upgraded. My first task is upgrading the CELT encoder > to Opus. > > The old CELT thing treated the L and R channels as independent mono > streams, encoded them somehow with CELT to form one bitstream, sent one > bitstream across, and then unpacked it manually after the decoder. > > Can I do that with Opus? > > Right now, I'm choosing OPUS_APPLICATION_RESTRICTED_LOWDELAY in order to > only use the CELT subsystem. However, I'm getting a lot of bleedthrough > on the stereo channels which I didn't get before. Is there a magic > setting to adjust this? > > Thanks, > -a > > _______________________________________________ > opus mailing list > opus at xiph.org > http://lists.xiph.org/mailman/listinfo/opus >