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."

make as much use of lookahead as possible

allow people to give a hint to the classifier via --speech or --music

include other reasonable settings presently only available via --set-ctl, such as MAX_BANDWIDTH_REQUEST. Forcing the encoder to use higher bandwidths than it thinks optimal is a bad idea, but allowing users to select lower bandwidths is not a bad idea, and along with allowing users to ask for LP/SILK modes can save considerable power on constrained decoders e.g. Rockbox.

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."

This is now possible (by default!) using the libopusenc library, which makes it easy to encode Ogg Opus files. We're planning on having the next version of opus-tools use libopusenc, which would automatically add lookahead by default.

include other reasonable settings presently only available via --set-ctl, such as MAX_BANDWIDTH_REQUEST. Forcing the encoder to use higher bandwidths than it thinks optimal is a bad idea, but allowing users to select lower bandwidths is not a bad idea, and along with allowing users to ask for LP/SILK modes can save considerable power on constrained decoders e.g. Rockbox.

The Opus library is currently smart enough to detect the bandwidth of the signal so that if you upsample a wideband (16 kHz) signal to 48 kHz, it will still only encode it as wideband. I think that handles most of the uses for MAX_BANDWIDTH_REQUEST.

As an Opus fan, I can't be happier to see 1.2 released!Congratulations to the developers--wishing you guys (and the codec) more success in the future!You guys are awesome! Now let me download this and play with it, then re-encode songs for my phone

2. Opus was getting much better with music files, but there was a fundamental flaw: the frequency had to converted from 44.1 kHz to 48.1 kHz.

I've just done a little testing with Foobar 1.3.15 & libopus 1.1.5 and I get 44.1 kHz from a 44.1 kHz ordinary music file. Therefore, from what I can see, this problem has been fixed.

Primo, it's still resampling behind the scenes. Encoder writes original sample rate to Opus file and resamples to 48 kHz. Decoder reads that information and resamples back to the original sample rate. So if you encode 44.1 kHz file, you decode 44.1 kHz file.Secundo, it shouldn't be a problem. See my earlier thread.

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."

Primo, it's still resampling behind the scenes. Encoder writes original sample rate to Opus file and resamples to 48 kHz. Decoder reads that information and resamples back to the original sample rate. So if you encode 44.1 kHz file, you decode 44.1 kHz file.

I'm pretty sure that this is false. Opus re-encodes everything to 48kHz and the music player just reads a tag saying that the original music file's sample rate was 44.1kHz, 8kHz or whatever.

If your OS or music player is set to always give 44.1kHz output, that's not related to the Opus codec

IME, at very low bitrates (under 32kbps) AAC is still clearly better for music, especially when you go down to like 16kbps.For speech it's closer, but Opus can go a bit lower with less annoying artifacts.I didn't compare them at 32+ bitrates lately.

Primo, it's still resampling behind the scenes. Encoder writes original sample rate to Opus file and resamples to 48 kHz. Decoder reads that information and resamples back to the original sample rate. So if you encode 44.1 kHz file, you decode 44.1 kHz file.

I'm pretty sure that this is false. Opus re-encodes everything to 48kHz and the music player just reads a tag saying that the original music file's sample rate was 44.1kHz, 8kHz or whatever.

If your OS or music player is set to always give 44.1kHz output, that's not related to the Opus codec

I was curious about your statement and I decided to open my converted opus file in Audacity: in fact, it says it's sampled at 48 kHz. I don't understand why MediaInfo says it's 44.1 kHz.

I was curious about your statement and I decided to open my converted opus file in Audacity: in fact, it says it's sampled at 48 kHz. I don't understand why MediaInfo says it's 44.1 kHz.

Apparently, the original sample rate is stored in the Opus file's header, and MediaInfo uses that instead of the correct "48kHz" rate.

Actually, I would say "44.1" is the right thing to display about the file. Obviously, it carries more information than saying "48 kHz" on all files, but there's also the fact that there's a big misconception about sampling rates and lossy codecs. First, Opus pretends to always do 48 kHz to make it easier for applications, but that's not necessarily what's going on. The same bit-stream can sometimes combine 16 kHz SILK information with 48 kHz CELT information. Even at the CELT layer, the MDCT is really a way to resample the signal to 960 different signals sampled at 50 Hz each... unless it's a transient in which case you have 120 different 400-Hz signals. Oh, and ever heard of SBR in HE-AAC, the encoder will resample the signal down to (e.g.) 22.05 kHz and then encode it along with some description of the higher frequencies. Yet the codec will tell you it's 44.1 kHz because that's the most convenient. And then HE-AACv2 will actually lie about your file being stereo because it just encoded a mono stream plus some side information.

The bottom line is that codecs just represent information in whatever way is most efficient despite what they pretend is the sampling rate. Your Opus file being listed as a 44.1 kHz file is just as correct as your HE-AACv2 file pretending to be 44.1 kHz stereo. The information essentially tells you what the input file was and what a "decode to file" operation will produce. That's about it. The rest is a lie -- for all codecs -- just get over it.

IME, at very low bitrates (under 32kbps) AAC is still clearly better for music, especially when you go down to like 16kbps.For speech it's closer, but Opus can go a bit lower with less annoying artifacts.I didn't compare them at 32+ bitrates lately.

I am not knowledgeable about the psychoacoustics of how AAC and Opus works, but I just tested both at 16kbps, and while I won't say the difference is huge, I prefered Opus here since AAC (of course mono SBR) has some high-end frequencies lost and sounds generally more gritty (can't find the right word--harsh, or rough, I guess?) than Opus. It also has some really annoying metallic gurgling sounds around the cymbals part of the spectrum (can't check the frequencies--I don't use spectograms). It also feels as if a lowpass filter is being toggled on and off every 20 seconds or something. Also, when the China cymbals start to play (to non-drummers, it's basically cymbals but are more on the lower frequencies, so instead of a "tssss" sound, it sounds more like "tshhhhhh"), the whole spectrum starts to sound distorted and all metalic. Extremely annoying.

On the other hand, Opus retained most if not all of the high end, and while the bass drums are not as "punchy" as it is in AAC, I prefer the retained high-end frequencies and the overall cleaner sound. The problems I mentioned that affected audio quality on AAC are not found, or at least inaudible to me.

I don't have an ABX result to prove this, but the difference is too audible for me to even ABX it.

Also, please do note that this is my preference, and that I may be different from most people XDWhat surprised me is that even when I thought Opus sounded better, the Opus file was 58 kilobytes smaller than the AAC file, so I suppose AAC had more bits to work with (dunno--it could be MP4 container overhead) but I still didn't prefer its sound XD

Track: Yaksa - "I Hate You" (metalcore)Opus: 1.2AAC: 7.10.9.0

[EDIT]Just so I don't get called unscientific or something then get banned from a forum I really love, here's the ABX result XDI had to resample Opus to 44.1kHz then save as WAV so I can compare it with AAC without making my soundcard adjust samplerates every time I change tracks.

I just tried with this track (off Youtube) and I agree with you, Opus sounds better.But then with some "cleaner" sounding music like classical piano music or some pop music, AAC wins, Opus distorts too much.

BTW, I'm using FDK AAC in Foobar, because it's the only one that actually encodes to 16kbps for me (12kbps is the lowest, but it botches the beginning of a track).How did you get apple/qaac to encode to 16kbps?

I just tried with this track (off Youtube) and I agree with you, Opus sounds better.But then with some "cleaner" sounding music like classical piano music or some pop music, AAC wins, Opus distorts too much.

BTW, I'm using FDK AAC in Foobar, because it's the only one that actually encodes to 16kbps for me (12kbps is the lowest, but it botches the beginning of a track).How did you get apple/qaac to encode to 16kbps?

And I also agree with you The guitars in Opus (the solo parts, not the palm muted 5th chords) were indeed distorted, to the point that they sometimes disappear into the noise of the drums, but then, I'd listen to that any day, considering it's 16kbps and it doesn't sound like a bunch of metal wires scratching against each other (like AAC LOL)

I also ran into that problem, but since I noticed that AAC requires at least 40kbps per channel if the audio is not stereo, I figured out that I need to encode mono audio so that it will allow me to go as low as 16kbps, so I just dropped in a Stereo -> Mono downmixer. This is also fair, since Opus also encodes audio in mono at 16kbps, anyway.

So because of curiosity, and I guess also fairness, I also tested Opus and AAC @ 16kbps on a pop-like electronic song. Okay, I'll tell the song, but please don't judge me LOL It's Sphere - "HIGH POWERED", from the opening theme of an anime, so you can guess what it's like--cute and fun Anyway, I chose the song because it has some really busy high-end action. Crash cymbals are in stereo, sharp attack hi-hat cymbals, and it's a pretty busy track in general.

My general impression would be--people shouldn't encode music in 16kbps LOL But OK, for the record, this time, AAC did have the benefit. While it did lost some high frequencies noticeably, the frequencies that it did retain are not as badly distorted as they are in Opus. I guess it wasn't obvious on the metal track, since metal songs are already pretty distorted XD

Honestly, though, the only reason I might even dare use 16kbps for music is for my phone, with bad earbuds, while I am commuting home for work, and either way, be it Opus or AAC, I bet I wouldn't mind or even notice the quality difference--as long as there's music playing on my earbuds, I'm happy.

Honestly, though, I am surprised that both codecs can go as low as 16kbps and reproduce full bandwidth audio (okay, not AAC, since it's more like wideband, but anyway...) How far human technology has come. I'm a programmer myself, and while I still won't say I have the brains to make stuff like lossy audio codecs, I aspire to be as good as the guys who develop Opus in the future, and I hope to be able to contribute to the quality of lossy audio codecs in the near future. People who make magical software like these is one of my inspirations

=========== EDITI seems that as long as there is no constant white noise on the background of the audio (for example, on metal songs, cymbals are constantly being hit, creating a wall of white noise, but on pop songs or classical ones, the background is pretty much clean--no "wall of white noise"), AAC performs better than Opus AT 16KBPS. I WOULDN'T KNOW ABOUT OTHER BITRATES. Fortunately for me, I'm a metalhead, and while I also listen to many other music genres like rock, chiptune, and others (except for modern pop music--I honestly can't come to like them), I mostly listen to metal and rock, so Opus should work best for me, and for the other tracks where AAC does sound better, it'd be a hassle to use a separate encoder for them so I guess I'll just keep on using Opus anyway I don't encode audio at 16kbps anyway, and I don't know who will XD I use Opus @ 48kbps usually.

This is a bit annoying to post in a thread about Opus 1.2, but if you are comparing it against AAC at low bitrates, please use FhG encoder and HE-AACv2 mode. It allows encoding stereo material as is and supports 16 kbps.