The official "fix" for this is to tell the *decoder* to ignore the feature, and that software should tell the decoder when the output is going to be downmixed. Obviously, nobody does this, it is impossible to do in many frameworks, and it can't account for external downmixing.
-
Show this thread
-
This whole thing was such a mess that the Opus guys had to add *alternate* official decodings to the official spec, because now there are two valid ways of decoding an Opus bitstream: ignoring phase inversion, or not. Which is pretty insane when you think about it.
1 reply 0 retweets 11 likesShow this thread -
I hope they tweak the encoder to use this less aggressively, so it doesn't become a big gotcha for people who aren't aware that Opus kills mono compatibility by default. But now that you know, you can just turn it off yourself.
1 reply 0 retweets 6 likesShow this thread -
Storytime: I noticed this 2 years ago. I had set up an awesome low-latency network stream for
@euskalencounter, using WebRTC and Opus. 70ms end to end latency. It sounded great when I set it up, but later during another event... I noticed really bad audio quality.1 reply 0 retweets 2 likesShow this thread -
It wasn't the mono that I noticed (the audio was coming from some YouTube video on the feed end, it could've just been mono), but rather the artifacts. I thought the source video was bad, but then the next one also sounded bad... and I realized it was my stream.
1 reply 0 retweets 2 likesShow this thread -
I thought Opus was broken until someone on IRC pointed me at this feature. Turns out I had not configured the channel count in my RTP descriptor, and some Chrome update had changed behavior: now it downmixed to mono if not explicitly told the stream was stereo in the descriptor.
1 reply 0 retweets 4 likesShow this thread -
Anyway, I fixed the descriptor, but I also didn't want anyone with a mono path to end up getting crappy audio. At the time gstreamer did not support setting the no phase inversion flag, so I had to patch libopus to turn it off unconditionally.
1 reply 0 retweets 2 likesShow this thread -
Addendum: after a bit of further investigation, this is *particularly* horrible at 2.5ms frame sizes (which I use for the stream to keep latency down) with libopus. This might be a bug, as the RFC makes no mention of frame size affecting the intensity coding threshold.
2 replies 0 retweets 5 likesShow this thread -
So libopus computes one bitrate-equivalent parameter, at 128kbps, as: 20ms: 127600 10ms: 26800 5ms: -7100 2.5ms: -33050 ... I'm pretty sure that's a bug.
1 reply 0 retweets 8 likesShow this thread -
Turns out ((opus_int32)nbCompressedBytes*8*50 >> (3-LM)) should've been ((opus_int32)nbCompressedBytes*8*50 << (3-LM)) Whoops. And this means even at 192kbps or beyond, mono downmixes still sound like crap with 2.5ms frame sizes. After the fix they sound fine.
3 replies 0 retweets 21 likesShow this thread
Now at 128kbps the downmixes still sound way better without phase inversion enabled, but that's at least intended behavior given the way the math was intended to work, and they sound about half as bad as before. This problem was definitely not supposed to exist at 192k though :-)
-
-
3 replies 0 retweets 14 likesShow this thread
-
Update: that fix has been merged into libopus, and an option to disable the phase inversion in ffmpeg's opus encoder has also been merged into ffmpeg.
0 replies 0 retweets 16 likesShow this thread
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.