This issue came up in #4209. It's maybe a good idea to disable "phase inversion" in the Opus encoder and decoder to prevent terrible audio artefacts when downmixing from stereo to mono.
See also
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/409
for an explanation and audio example.
This would be set by
opus_decoder_ctl(enc, OPUS_SET_PHASE_INVERSION_DISABLED(1))
opus_encoder_ctl(enc, OPUS_SET_PHASE_INVERSION_DISABLED(1))
Do you know what phase-inversion is used for at all?
As far as I understand it, it is some psychoacoustic voodoo magic for low-bitrates. Here is a in-depth explanation: http://dirkmittler.homeip.net/blog/archives/7999
The good news: since libopus 1.3 phase inversion is automatically disabled, if the decoder is configured for mono output:
https://github.com/xiph/opus/blob/d8b1fd4ad0233fc69a58ac6f91e1d154f22c481b/celt/celt_decoder.c#L167
Yeah I guess we can disable that. Could you submit a PR for this? :)
I think this argument starts to make some sense to me. I will try enable this flag in #4209 , but just to remind you guys that the mono down mix now is of pretty good quality so I doubt how much improvement this idea may achieve.
Most helpful comment
As far as I understand it, it is some psychoacoustic voodoo magic for low-bitrates. Here is a in-depth explanation: http://dirkmittler.homeip.net/blog/archives/7999
The good news: since libopus 1.3 phase inversion is automatically disabled, if the decoder is configured for mono output:
https://github.com/xiph/opus/blob/d8b1fd4ad0233fc69a58ac6f91e1d154f22c481b/celt/celt_decoder.c#L167