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.
-
Show 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 -
Replying to @marcan42
Wow... Is LM usually 3 or is noticing bugs in lossy codecs just really hard?
1 reply 0 retweets 0 likes
LM is 3 by default, which is what you want for offline encoding. LM represents the log of the frame size, 20ms being 3. So this only happens for smaller frame sizes, which are only useful for low latency streams.
-
-
I can see why nobody noticed, because most VoIP apps are probably feeding mono mic audio down the line anyway. Few of us are doing very low latency *stereo* streaming.
0 replies 0 retweets 2 likesThanks. Twitter will use this to make your timeline better. UndoUndo
-
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.