[opus] FEC and Stereo
Jon Lederman
jon at soniccloud.com
Fri Jan 27 17:41:38 UTC 2017
Thank you. Very helpful.
> On Jan 27, 2017, at 12:40 PM, Jean-Marc Valin <jmvalin at jmvalin.ca> wrote:
>
> On 27/01/17 12:29 PM, Jon Lederman wrote:
>> Thank you. Yes, we do need both channels independent. So, if we
>> encode each channel separately, we will be sacrificing the
>> compression ratio we would achieve with stereo encoding, correct?
>
> Not necessarily. Stereo makes two assumptions:
> 1) It assumes the two channels are somehow correlated
> 2) It assumes the two channels are meant to be listened to using
> headphones or speakers setup for stereo listening
> If instead you have (e.g.) two different people talking in each channel
> and both are meant to be listened to independently, then pretending it's
> a stereo stream will actually hurt compression significantly.
>
>> 1) If we use fec, we can reduce cross-talk but increasing bitrate.
>> However, that should result in higher packet loss due to higher
>> bitrate.
>
> Packet loss may or may not be related to the bitrate. It depends on the
> network and I'm not the best person to help you about that.
>
>> 2) If we don’t use fec, we can have no crosstalk. However,
>> then we have significant chance of packet loss.
>
> Possibly.
>
>> 3) We could encode
>> each channel separately. In this case, we would have no crosstalk,
>> but we would have a lower compression rate/efficiency.
>
> If you have a stereo music file, then coding independently will makes
> things worse. For as I said earlier of the two channels are independent,
> you'll be much better off using two separate streams.
>
> Cheers,
>
> Jean-Marc
>
>> Thanks.
>>
>> -Jon
>>
>>> On Jan 27, 2017, at 12:24 PM, Jean-Marc Valin <jmvalin at jmvalin.ca>
>>> wrote:
>>>
>>> On 27/01/17 12:16 PM, Jon Lederman wrote:
>>>> When you say that with fec enabled, the threshold is increased,
>>>> do you mean the bitrate - i.e., you need higher bitrate with fec
>>>> enabled to suppress crosstalk?
>>>
>>> Correct. Another effect I forgot to mention is that Using FEC will
>>> actually force SILK/hybrid rather than CELT, so it's possible that
>>> disabling FEC makes you use CELT, which tends to have wider stereo
>>> separation for lower bitrates.
>>>
>>>> Also, can you make any recommendations to decide whether to use
>>>> fec or not? We are trying to tune the parameters appropriately.
>>>> Audio quality and reduction of crosstalk are critical for us.
>>>
>>> In general, I would say that if you know the decoder is able to use
>>> FEC, then you should enable it in the encoder. The encoder will
>>> decide by itself when to actually use it depending on bitrate and
>>> other parameters. As for reducing cross-talk, I guess it comes down
>>> to the *reason* you want to reduce cross-talk. Normally the encoder
>>> will whatever will result in the best quality, so it must be
>>> thinking that reducing cross-talk is good. Now, if your reason is
>>> that your two channels carry completely independent information,
>>> then the fix would be to simply code two separate channels. It's
>>> hard to say more considering that you haven't said anything about
>>> your signals and why the stereo separation is so important for
>>> you.
>>>
>>> Cheers,
>>>
>>> Jean-Marc
>>>
>>>> Thanks again.
>>>>
>>>> Jon
>>>>
>>>> Sent from my iPhone
>>>>
>>>>> On Jan 27, 2017, at 11:38 AM, Jean-Marc Valin
>>>>> <jmvalin at jmvalin.ca> wrote:
>>>>>
>>>>> Hi Jon,
>>>>>
>>>>>> On 27/01/17 08:31 AM, Jon Lederman wrote: We are trying to
>>>>>> use Opus in a VoIP environment for sending stereo audio. We
>>>>>> have noticed a phenomenon where when FEC is enabled and
>>>>>> packet_loss_percentage>0, that there is a mixing of audio
>>>>>> from the left channel into the right channel and vice versa.
>>>>>> That is, rather than hearing each channel in its pristine
>>>>>> form as it was in the file, there is a combination of right
>>>>>> and left channels that is heard on the left and right
>>>>>> playback.
>>>>>>
>>>>>> First, is this the correct behavior? If so, why does this
>>>>>> occur?
>>>>>
>>>>> It is the correct behaviour, at least to some extent. Opus may
>>>>> deliberately introduces cross-talk between the channels to
>>>>> make the signal easier to code when it doesn't have enough bits
>>>>> to do a good enough job with the original stereo audio. If you
>>>>> increase the bitrate, then that cross-talk with be reduce and
>>>>> eventually disappear. Now the only difference that FEC does is
>>>>> that it increases the threshold for the cross-talk.
>>>>>
>>>>>> Finally, is there a way to prevent this other than disabling
>>>>>> FEC (which we don’t want).
>>>>>
>>>>> Well, obviously if you're not going to use the FEC, then you
>>>>> shouldn't waste bits to encode it.
>>>>>
>>>>> Cheers,
>>>>>
>>>>> Jean-Marc _______________________________________________ opus
>>>>> mailing list opus at xiph.org
>>>>> http://lists.xiph.org/mailman/listinfo/opus
>>
More information about the opus
mailing list