Why doesn't opusenc have a quality setting?

2018-12-07 14:12:49

Why doesn't opusenc have a quality setting? You can either accept the default quality, or you can set the bitrate, but there's no option to select a quality level. Seems very weird...am I missing something?

(To explain further, 1 channel at 128Kb/s is not the same quality level as 8 channels at 128Kb/s. So, the bitrate option is not a substitute for a quality selection option when encoding mixed sources.)

Re: Why doesn't opusenc have a quality setting?

What would you like a quality setting to mean? Just be a proxy for some sort of bitrate? A bitrate per channel? A whole bunch of different bitrates for mono/speech/couple channels, etc.? Something even more complex aiming for a level of transparency for each track? There is a default bitrate and you can set a different one if you want. The default is different per single channel or coupled pair, so reasonably scalable.

It is worth noting that giving a VBR bitrate to opusenc effectively is a quality setting. Rather than produce output with that bitrate, it will encode with parameters that it knows on average will give that bitrate for a track, but those parameters on your track may use a considerably lower or higher bitrate to hopefully get a similar level of transparency.

Re: Why doesn't opusenc have a quality setting?

have a "constant quality" mode so e.g. mono speech and 5.1 surround fullband music can be encoded with the same settings and be expected to achieve similar quality (quality as measured by e.g. ABC/HR, MUSHRA, etc). Opus devs have in the past talked about this as "fullband stereo equivalent bitrate."

Still under consideration, though not so high on the priority list.

This is unfortunate; even outside of surround sound situations there would be benefits of having such a mode. The VBR scheme has not really sufficed to avoid the fact that opusenc --bitrate XX will yield rather different subjective quality on mono speech vs stereo music. But being paid by Mozilla and working hard on the AV1 video format mean that time spent on Opus is limited and somewhat more directed towards WebRTC and other streaming use cases rather than towards end users encoding at-rest files.

Re: Why doesn't opusenc have a quality setting?

If you're worried about surround quality, here's a cool thing you should know about opus: there's a lot of techniques for optimizing stereo and surround inside opus that have been in development since the vorbis era, and they're pretty good. You can check a demo with some of it here and see that bits are only allocated where needed. (This is a demo of 1.1, we are currently on 1.3 and there are also other cool demos from newer versions on this same website)

Also, if 256 kb/s is enough for encoding good ambisonics that take way more channels than common surround, I wouldn't worry that much about it.

Re: Why doesn't opusenc have a quality setting?

I appear to be the only one who made a good faith attempt to understand what was being asked before leaping in with an irrelevant answer.

There's a clear difference between "quality" - measurable by e.g. ABC/HR, MUSHRA, etc - and either bitrate or bitrate per channel/pair. A 7.1 surround file at 80kbps will score much lower in subjective testing than a stereo file at 80kbps; you're throwing a lot more information away and will have more artifacts. A 7.1 surround file at 400kbps - which is 80kbps per channel/pair (three paired, center, LFE) will score higher than a stereo file at 80kbps; there are correlations, masking effects, etc which make it so 7.1 doesn't demand the bitrate of 5 stereo tracks.

If you stick to music with the same number of channels, the idea that bitrate is a perfect alias for quality is close enough to true, because that's what the VBR allocation does. If you have a mix of music and speech and/or a mix of channel counts, you're going to have to classify your tracks according to those distinctions and specify a different bitrate for each class. This can be a pain, and a real quality option - again, you could call it a "fullband stereo equivalent bitrate option" if that tickles your fancy- would be a boon.

Re: Why doesn't opusenc have a quality setting?

Caring about evaluating bitrates is annoying if you just want to have an ensured good-balanced output (bits<>transparency).If it's music only, then it might be a bit more simple, but mixed content and more then 2 channels?Forget it. It might also never give you the potential and gain you are aiming at.Therefore people invented vbr and a quality-setting, to get the feature of variability/dynamic and something that expresses your demand/intent/purpose.If so it definitely makes sense to ask this question.Opus got a detector, but maybe jmvalin might spend a note to that question.

Re: Why doesn't opusenc have a quality setting?

The only thing hard coded into the encoder and decoder is the resampling quality, which is set at 5. I have made custom builds with this number changed to 10. I don't think the developers will change this behavior soon as they think that 5 is enough, but still internally at the code, it can go up to 10.

Re: Why doesn't opusenc have a quality setting?

The only thing hard coded into the encoder and decoder is the resampling quality, which is set at 5. I have made custom builds with this number changed to 10. I don't think the developers will change this behavior soon as they think that 5 is enough, but still internally at the code, it can go up to 10.

Re: Why doesn't opusenc have a quality setting?

Higher resampling quality means higher latency, probably an issue for Opus devs. Probably not an issue for most people reading this. Not that quality 5 should be anything other than transparent anyway.

Re: Why doesn't opusenc have a quality setting?

Opus works very well encoding multichannel audio at low bitrates. I have encoded Pink Floyd's Dark Side of the Moon in 5.1 using Opus at 128 and 160 kbps and there is really very little difference between the low bitrates and going to 256kbps. Opus is able to use the channels to mask lower bitrates.