[opus] advantage of OPUS_SET_FORCE_CHANNELS(1)?

Phil Karn karn at ka9q.net
Mon Oct 23 03:31:36 UTC 2017

On 10/22/17 19:19, Timothy B. Terriberry wrote:
> Phil Karn wrote:
>> This works well, but then I noticed the SET_FORCE_CHANNELS option. Is
>> there any advantage to my detecting identical left and right channels
>> and setting this to force mono? Or does the Opus encoder already do this
>> internally in the AUTO mode?
> No, the automatic setting should be fine. The purpose of this setting is
> for the case where you know the receiver will only use a mono decoding
> path. This is common in some VoIP applications. It lets you avoid coding
> a stereo signal even when you have stereo input, e.g., because you know
> through out-of-band means that the receiver will discard the stereo
> image anyway.

Got it, thanks. So I guess I can strip out my experimental code that
compares samples and forces mono when pairs of samples are identical,
and the only effect will be that my decoder tool will indicate stereo
when the sound is actually mono.

Again, I'm *very* pleasantly surprised at how exceptionally well this
codec works even at low bit rates and in what I'd think would be weird
corner cases. E.g., single sideband is inherently mono, but if you
select "stereo" reception in my receiver the right channel will be the
Hilbert transform of the left channel. This produces an interesting
subjective pseudo-stereo effect in headphones, which the Opus codec
seems to preserve quite nicely even at low bit rates. I find it can
relieve some of the auditory fatigue that can come with listening to a
mono signal boring a hole in the center of your brain for a long time,
e.g., during a ham radio contest.

And the price is certainly right. Thanks again!


More information about the opus mailing list