Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Does Opus at 29 kbps encode in stereo CELT only or it starts at 32 kbps? (Read 4763 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Does Opus at 29 kbps encode in stereo CELT only or it starts at 32 kbps?

https://wiki.hydrogenaud.io/index.php?title=Opus#libopus_v1.1.3
This is not updated I think. I read one year ago a draft on IETF that said stereo encoding is less than 30 kbps.
Serious high quality starts with 54 kbps and more.
With neural synthetis LPCnet can Opus code stereo at less that 29 kbps or improve mono music quality?

Re: Does Opus at 29 kbps encode in stereo CELT only or it starts at 32 kbps?

Reply #1
I'm not sure I entirely understand the question(s).  There is no hard bitrate limit for stereo or mono, or indeed for almost anything in Opus.  Are you asking about what is possible?  What the reference encoder (opusenc) does?  Even then, much depends on bandwidth, whether the bitrate is constrained (or fixed) or not, the desired latency (frame-size), and the type of audio ("speech" or "music") being encoded.  A given track may well switch between mono and stereo almost frame by frame, so if that's what you're really asking about, it probably isn't a question with an answer.

Re: Does Opus at 29 kbps encode in stereo CELT only or it starts at 32 kbps?

Reply #2
I mean true stereo with automatic settings and latest build. I know it will always display stereo because opus is a stereo algorithm even if has both mono and stereo.

 

Re: Does Opus at 29 kbps encode in stereo CELT only or it starts at 32 kbps?

Reply #3
Still not making much sense.  Opus is not inherently a stereo codec, so tools shouldn't always display stereo for Opus tracks.  It is perfectly capable of encoding true mono audio, as well as having support for more than two channels and an implicit ability to output either mono or stereo no matter how many channels are actually encoded.

Assuming you are dealing with two-channel audio, and the channels are coupled, and you don't force anything, libopus will decide to downmix stereo at between 16 and 20 kbps, depending on the type of audio and whether the channels are coupled or not.  This is hard downmixing, only one channel is encoded, although two identical channels may be produced when decoding.  Assuming stereo is not downmixed, then the two channels are likely to be treated as coupled.  There are three types of coupling that can be used in Opus, or two types and no coupling.  Potentially coupled channel pairs may be encoded separately if it is calculated that this will be more efficient.  Otherwise (and usually), mid-side coupling is used for coupling up to a certain frequency, and then intensity stereo for frequencies above that, with the switchover point determined by the bitrate.  Intensity stereo loses phase information and hurts the perception of channel separation, while mid-side coupling is essentially transparent.  Intensity stereo is not used at all above about 130 kbps, and below 35 kbps intensity stereo is used for all frequencies above 1600 Hz, with gradations in between.  You don't really have any control over any of this for normal two-channel audio.  Now what did you mean by "true stereo"?

Re: Does Opus at 29 kbps encode in stereo CELT only or it starts at 32 kbps?

Reply #4
A few clues to which mode Opus might use:
- CELT is chosen when the bitrate is higher than some point interpolated between 10 kbps and 64 kbps, depending on the stereo width and the probability of voice or music.  CELT is preferred at lower bitrates for music, potentially as low as 10 kbps, but SILK may be used for voice up to 64 kbps;
- SILK is strongly preferred for VOIP, and when packet loss is high;
- CELT is forced with small frame sizes;
- hybrid mode is used when SILK would be preferred but the bandwidth is above 8 kHz - the bandwidth may be determined from the input sample rate, from user choice, or from the bitrate, with wideband being chosen for bitrates below about 11 kbps.

So, potentially, CELT-only may be used even at bitrates only a little above 10 kbps, but in practice it is likely to vary a lot depending on the estimation of probability that the audio is music.

Re: Does Opus at 29 kbps encode in stereo CELT only or it starts at 32 kbps?

Reply #5
So about 18 kbps CELT stereo (intensity stereo) with latest build.
Intensity stereo it isn't used at 130 kbps.
So true stereo at less than 128 kbps isn't possible with any codec, neither opus?
I don't think you are right about this but I don't know much of how Opus encodes stereo information.

Re: Does Opus at 29 kbps encode in stereo CELT only or it starts at 32 kbps?

Reply #6
54 kbps is true stereo? Or use intensity stereo? 53 kbps?

Re: Does Opus at 29 kbps encode in stereo CELT only or it starts at 32 kbps?

Reply #7
Please stop this true stereo vs intensity stereo nonsense. Opus uses intensity stereo to *improve* quality at a particular bitrate. It's trivial to make an encoder that never uses intensity stereo and it's just going to sound worse. Like other "tools", intensity stereo is part of a tradeoff between different compression artefacts. If you can't accept that, then you shouldn't be using a lossy codec in the first place.

Re: Does Opus at 29 kbps encode in stereo CELT only or it starts at 32 kbps?

Reply #8
People will forever think badly of intensity stereo, because they were around when several really bad MP3 encoders did a poor job of encoding intensity stereo. Then again, MP3 probably couldn't sound that great at the bitrates where IS would even kick in, but people were horribly optimistic with their bitrate under-estimation back then, as well.

Intensity stereo is a tradeoff, as you said. Either you have some semblance of the original stereo image, synthesized with intensity stereo, or you have mid/side stereo with even worse tradeoffs, possibly including destroying the stereo separation in favor of the overall signal being preserved. Or you could have full left/right stereo and the signal can suffer in different ways.

Really, when you're compressing this damn much, you have to make some compromises to achieve a semblance of quality. If you don't like that, give it more quality/bitrate, and you have less quality loss. But really, at these bitrates, it should be sufficient if you really want to stuff a huge collection on a portable device, and won't be listening to it under "ideal" circumstances, ie. with noise around you, headphones that leak audio so you can still pay attention to the world around you.

Re: Does Opus at 29 kbps encode in stereo CELT only or it starts at 32 kbps?

Reply #9
Well, Opus implements intensity stereo and M-S stereo very differently from MP3. First intensity stereo isn't all-or-nothing for the whole frame and in fact, no frame is ever *entirely* coded with intensity stereo. For example, at 112 kb/s, only frequencies above 16 kHz have intensity stereo. Considering those are hard to hear in the first place, they're unlikely to cause much problem wrt the stereo image.

As for M-S stereo, in Opus it's actually much *safer* than left-right stereo, even at high bitrate. Many people think of left-right as the high-quality option, but in fact it has to be used very carefully because it can lead to stereo unmasking effects (noise becoming audible because it's different in both channels). OTOH, M-S stereo in Opus is always safe to use and can *never* lead to artifacts because of the energy preservation in CELT. The only reason CELT even has left-right at all is as a minor optimization for completely uncorrelated signals. Again, very different from MP3 where M-S can create crosstalk and other side effects.