
Opus 1.2 Released - jmvalin
https://jmvalin.ca/opus/opus-1.2/
======
awaaz
Opus is something really, really cool!

My last company (Zip Phone, YC S14) was a direct result of the fantastic work
that the Opus team has done in the last few years. I remember researching
audio codecs around the end of 2013 and stumbling across Opus, and being
amazed at what it could do at extremely low bitrates, _and_ everything was
available completely for free! Spent my fair share of time on the Opus IRC
channel on freenode (shout out to derf, gmaxwell, jmspeex, mark4o) bugging
them with basic queries, and getting excellent support.

Opus rocks.

------
mbebenita
I can't hear the difference between Opus 1.2 @ 32 kb/s and Uncompressed audio.
I'm now excited about Opus 1.2 AND worried about my hearing.

~~~
jzelinskie
If you listen to older versions of Opus @ 32kbps, you'll hear the distortion
more pronounced and then when you slowly upgrade versions you can hear it go
away and then when comparing to uncompressed, you'll notice just because you
know what you're looking for.

Xiph is amazing; I hope Daala actually becomes commonplace, but with the
recent Apple announcements it's looking like a chance to usurp h.265 is
basically gone.

~~~
Scaevolus
Many pieces of Daala are being folded into AV1, which is an industry effort
supported by most large software and hardware companies to produce an HEVC
replacement. This post summarizes the results of the different experiments:
[https://people.xiph.org/~jm/daala/revisiting/](https://people.xiph.org/~jm/daala/revisiting/)

Unfortunately some of the most innovative techniques around frequency-domain
prediction ended up not panning out. :(

~~~
kuschku
Sadly, Google is trying to patent AV1, and only giving a patent license to
users of its implementation.

If you want to build your own implementation, either to implement it in
hardware, or to release it under a different license, then you’ll be fucked.

~~~
TD-Linux
The AOM patent license covers _any_ implementation of the format. It
additionally covers the reference implementation, because the encoder may use
techniques that aren't part of the bitstream format, and it's important to
grant rights to those too.

[http://aomedia.org/license/patent/](http://aomedia.org/license/patent/)

~~~
indolering
Indeed, the whole point of Daala and AV1 is to do a _really_ good job on the
IP front so as to make it much harder for patent trolls to hold everyone
hostage [0].

0:
[https://www.youtube.com/watch?v=u3Yc5Hn9bhQ](https://www.youtube.com/watch?v=u3Yc5Hn9bhQ)

------
JoshTriplett
> Opus defaults to variable bitrate (VBR), but for a variety of reasons some
> people prefer to use constant bitrate (CBR), which it has always supported.

For instance, if you want to encrypt speech, and don't want to leak
information about its contents.

------
pimeys
I'm having all my music stored as Flac and automatically converted as Opus to
my phone. I couldn't be happier to the quality and encoding speed. The only
thing I think I should've done different is to use a lower bitrate than 192
kbps to store more music to the memory card.

I reasoned the additional lossy encoding of Bluetooth would be too much with
lower bitrates, but now I'm not so sure...

~~~
StavrosK
Does Android support Opus natively? One would hope so, given how open Opus is.

~~~
ac29
Yes, since 5.0: [https://developer.android.com/guide/topics/media/media-
forma...](https://developer.android.com/guide/topics/media/media-formats.html)

That claims they need to be in a MKV container, but I just use the output of
opusenc.

~~~
indolering
I heard their implementation was really poor?

------
77pt77
It's really hard to exaggerate the quality of the opus codec.

It's just amazing.

You can throw anything at it. No matter the sample rate and the bitrate and
the output has good quality without any of that narrowband, wideband, ultra-
wideband speex nonsense.

All that is missing is an "hybrid" mode just like wavpack that produces
combined output of roughly the same size as flac.

~~~
microcolonel
I don't know what you're looking for with the wavpack comparison, but 510kbps
approaches the noise floor for most audio that isn't white noise or black
metal. 96kbps is widely considered transparent on speakers (you have to try
quite hard to notice 48kbps), 112-128kbps on headphones (and 96kbps at most
for people older than 15, lol).

~~~
derefr
High-quality lossy files are fine for listening, but lossless is required if
you want to _sample_ the audio to create a remix or DJ set from it, because
you're inevitably going to have to encode the output artifact of _that_ —and
you don't want to be chaining lossy encoding steps, as the loss-function of
most psychoacoustic encodings tends to be exponential when applied repeatedly.

re: wavpack, from wikipedia:

> WavPack also incorporates a "hybrid" mode which still provides the features
> of lossless compression, but it creates two files: a relatively small, high-
> quality, lossy file (.wv) that can be used by itself; and a "correction"
> file (.wvc) that, when combined with the lossy file, provides full lossless
> restoration. This allows the use of lossy and lossless codecs together.

This hybrid encoding format lets you keep files for both purposes (lossless
for audio production and archiving, pre-encoded to HQ lossy for audio
consumption) in less space than would be required to keep e.g. an ALAC file +
a cached lossy M4A encoding of it, the way iTunes does when you specify
"optimize tracks' space-usage for portable devices."

Such a hybrid design is ideal for e.g. the Internet Archive, where they want
to keep lossless archival representations of files for historians to study,
and to _create_ encodings from; but also want to _serve_ usable
representations of those artifacts to users who care more about transfer-speed
and bandwidth cost than perfect fidelity.

~~~
TD-Linux
This has been tried - the problem is that FLAC works by removing redundancies
and correlation in the audio signal. When you subtract an Opus encoding from
the original, the resulting difference file is the difference, which is much
less correlated noise - often it actually compresses worse than the original
FLAC. WavPack gets around this by making its lossy format a subset of the
lossless data, but as a downside the lossy compression is far worse - about 3x
worse than Opus.

Other attempts include Dolby TrueHD and DTS HD - but both of those ended up
larger than just separate FLAC and Opus files.

~~~
77pt77
> often it actually compresses worse than the original FLAC

I made some very crude tests a few minutes ago and got about 15% size increase
in total size (opus + diff.flac vs flac --best)

~~~
derf_
Keep in mind that Opus does not define a bit-exact decoder. That allows it to
have both floating-point and fixed-point implementations, as well as the
flexibility to use different internal resamplers, MDCT implementations, etc.
That flexibility helps to allow efficient implementations across a broad
variety of devices.

However, as a result, the difference between an Opus decode and the original
will only get you lossless reconstruction if you decode with the same build of
Opus on the same machine. Also, since Opus uses IIR filters that ring to
infinity, even on the same machine you only get bit-exact results if you
decode each file from the beginning. It won't work if you seek.

Really, if you're concerned about the disk space required for separate FLAC
and Opus encodes, delete the Opus version. FLAC decoding is extremely fast (5x
faster than Wavpack), and Opus encoding is pretty efficient, too (on the same
order as Wavpack decoding).

~~~
teach
What do you use for your private listening webapp? mpd?

~~~
microcolonel
I'm guessing you meant to reply to my reply.

It's not published yet, though I might. It's pretty simple, just grabs a
static JSON manifest (which is generated by the shell script I run when I add
music to the collection, which adds replaygain tags and transcodes) which
includes basic metadata and the ReplayGain tags so that I can set that
manually in the browser. Uses the standard rule for continuous play and
replaygain: play whatever was in the view when you played the first song then
shuffle play, when the song you're playing is followed by the next song or
follows the previous song on the same album, apply album gain, else apply
track gain.

I have yet to add dynamic features like cross-player play count tracking, and
server-side play counts for the webapp. I think these would be a lot more work
than I put in.

My Github is [https://github.com/xorgy](https://github.com/xorgy) if you want
to follow/check in to see if I publish it.

------
walterbell
If you are sensitive to the quality of encrypted audio calls, a co-inventor of
Opus (Koen Vos of Skype/SILK) now works at [http://wire.com](http://wire.com),
which is taking an open approach to messaging.

~~~
indolering
Oh, when did he get hired? The audio quality sucks and my calls drop all the
time.

------
kernelsanderz
Given that Opus is built into the browser, is the format backwards compatible?
Or will browsers need to update their Opus Libraries to get these changes?

~~~
jmvalin
All Opus releases since 1.0 are fully compatible with the specification (RFC
6716) and all future releases will also be. That's why we have standards. If
we ever decided to make something that's not compatible, it would be called a
different name.

~~~
kernelsanderz
That's so awesome. I guess the webrtc audio encoding libraries would need to
be updated in the browsers to take advantage of these improvements though?

~~~
jmvalin
Even that should happen relatively quickly since so far we've also preserved
API and ABI compatibility (since 1.0). Also, we're working closely with the
Firefox and Chrome teams so they know what's going on with Opus.

~~~
derf_
In fact, libopus 1.2 has already landed in Firefox (including for WebRTC) and
will be available in the next Nightly:
[https://bugzilla.mozilla.org/show_bug.cgi?id=1374870](https://bugzilla.mozilla.org/show_bug.cgi?id=1374870)

------
djmips
My ears still feel that uncompressed is king for several of the test passages
but Opus 1.2 was quite good. The problems with the compressed versions is hard
to describe because I don't have the vocabulary but it was something that was
only discernable on headphones and I would say had to do with phasing between
left and right, a stereo 'presence' that was missing in all the compressed
variations.

------
AstralStorm
Good Lord, they rediscovered integrated rounding! :)

(Re: quantization change in encoder. Also known as statistical or statistician
rounding.)

~~~
tveita
"round to whichever number sounds the best"?

Anyway I assume they're taking their well deserved credit for the
implementation, not necessarily the discovery.

------
someSven
I really hope every Linux distro and all these other OSs will support it from
now on, right from the start. Including recognicing .opus files. It's the
perfect format for podcasts, because it's great with voices even if the
bitrate is low.

~~~
ktzar
I've compressed 30 hours of one of my favourite podcasts in less than 100MB...
And voice parts are almost indistinguishable from the original.

