Slashdot Mirror


Opus — the Codec To End All Codecs

New submitter jmv writes "It's official. The Opus audio codec is now standardized by the IETF as RFC 6716. Opus is the first state-of-the-art, fully Free and Open audio codec ratified by a major standards organization. Better, Opus covers basically the entire audio-coding application space and manages to be as good or better than existing proprietary codecs over this whole space. Opus is the result of a collaboration between Xiph.Org, Mozilla, Microsoft (yes!), Broadcom, Octasic, and Google. See the Mozilla announcement and the Xiph.Org press release for more details."

36 of 327 comments (clear)

  1. Obligatory by Anonymous Coward · · Score: 4, Funny
    1. Re:Obligatory by plover · · Score: 5, Funny

      That's the nice thing about standards. There are so many to choose from!

      --
      John
    2. Re:Obligatory by jmv · · Score: 5, Informative

      See the "listening tests" part of our comparison page. These are all tests that were performed by other folks, independently from us.

    3. Re:Obligatory by Teancum · · Score: 5, Interesting

      What would make an audio codec something worth using that would make you switch?

      I would assume that widespread support among major applications would be an issue. You could also throw in the ability to compact an audio stream better than alternatives might be useful in some applications. Simply having content in that codec would be very useful as well.

      I would say being patent and license free (aka it can be incorporated into a GPL'd application) would be pretty far down the list, but not needing to pay a licensing fee might make the difference for some marginal applications or for start up groups needing some sort of audio playback where even a few extra dollars in royalties can end up costing more than it is worth (such as is the case for the current MP3 format).

      Then again that is sort of what pushed the VHS format over Betamax in the video tape format wars.... small independent producers could mass produce VHS tapes cheaper than the Betamax tapes, and for marginal videos (*cough* porn movies *cough*) that made all of the difference.

      The problem here is that audio codecs are pretty entrenched and as you've suggested that even free alternatives are available. Unless there is something substantially different being done by this codec that even a non-techie can notice and suggest that this new algorithm is substantially better, I really have a hard time seeing this being adopted widely. There might be some niche applications if the compression algorithm is even a few percentage points better, such as perhaps a transmission protocol for audio on the Iridium satellites. Something like that may even be useful to have an on the fly codec converter depending on how it is used.

    4. Re:Obligatory by Lumpy · · Score: 5, Insightful

      "What would make an audio codec something worth using that would make you switch?"

      A car stereo that supports it, phones that support it, etc... There is a reason that mp3 is still the king, it can be played on 98,543,221.5 different brand sof devices and another 800 are created that support mp3 every 6 seconds.

      Ogg? 5 devices.
      Apple's codec? 5 devices.

      mp3 will be around for another 10 years simply because I can buy a $0.25 chip and make the toaster my company is making play mp3's.

      --
      Do not look at laser with remaining good eye.
    5. Re:Obligatory by mug+funky · · Score: 5, Informative

      what's with the FUD, dude? pre-release Opus was included in the hydrogenaudio listening tests months ago alongside all the relevant (not shit) implementations of HE-AAC. just because it doesn't say "plus" doesn't mean it doesn't include SBR (or PS or any of the other bells and whistles).

      SBR is good for perceptual "niceness", but as far as _sounding like the original_ goes, it's often quite harmful. all these things are accounted for with the hydrogenaudio listening tests - they're an extremely anal community and wouldn't dare let prejudice through without a long and protracted flamewar. they're actually very trustworthy.

    6. Re:Obligatory by jensend · · Score: 5, Informative

      aacplus was just the early CT-proprietary version of HE-AAC. They did test against the two best publicly available HE-AAC encoders, which have improved quite a bit since the aacplus days. Opus was better, by a statistically significant margin.

      Opus has band folding, which is in some ways similar to SBR but considerably superior. Halfway down Monty's two-year-old CELT demo page there's some explanation and a visual of what this looks like on a spectrogram in low-bitrate situations. (Opus used technology from CELT but is considerably improved.)

      If you really think HE-AAC type codecs sound like CD at 32kbps and so forth you are extremely insensitive to coding artifacts. Unless you meant mono for all of those.

    7. Re:Obligatory by Anonymous Coward · · Score: 5, Funny

      No, blind people can't hear very well -- that's why you need to raise your voice when talking to them.

    8. Re:Obligatory by Anonymous Coward · · Score: 5, Funny

      We blinded each subject ourselves. Yes we take pride in our work.

  2. Opus?!? by ackthpt · · Score: 4, Funny

    What's wrong with Bill the Cat?

    --

    A feeling of having made the same mistake before: Deja Foobar
    1. Re:Opus?!? by jfengel · · Score: 5, Funny

      Transmission reliability problems. Even when a packet got lost, it would still ACK.

  3. Patents by K.+S.+Kyosuke · · Score: 4, Insightful

    Cue MPEG-LA calling for a patent portfolio to be created and licensed for hard cash, under their gracious auspices, of course.

    --
    Ezekiel 23:20
  4. Re:No Loseless support? by plover · · Score: 5, Funny

    They also left out n-channel support. You get mono or stereo, but that's it. No 7.1 surround encoding. That would have made it the one true codec for everything. That and lossless encoding. The two true codecs for everything.

    Oh, and support in the iPhone. That would have made three true codecs. Among the many true codecs... oh bugger, I'll start again.

    --
    John
  5. Re:No Loseless support? by Volanin · · Score: 4, Insightful

    Opus has support for up to 255 channels. Indeed, lossless was the most glaring omission, but considering the obsolescence of MP3HD, I think they must had good reasons to leave it out.

    --
    If I clone myself, can I call it a thread?
    If a girl winks to us, can I call it a race condition?
  6. It's awesome by LSD-OBS · · Score: 5, Interesting

    About 9 months ago, I implemented Opus in our VoIP products, replacing G722 and Speex. It kicks a whole lot of ass. Compared to speex, It's far better coded, uses far fewer CPU cycles, and sounds vastly better (even to me, and I have shitty hearing). Similarly, we replaced all our old audio DSP pipeline, based on the Speex library (thanks Xiph.org, etc) with the low-level components from WebRTC (thanks Google!) and things have never sounded better.

    --
    Today's weirdness is tomorrow's reason why. -- Hunter S. Thompson
  7. Many people missing the point: HTML5, VOIP, etc by jensend · · Score: 5, Informative

    It's true that Opus does better than AAC and Vorbis at CD-quality bitrates and thus would be an improvement for music players etc.

    But the improvements there are fairly small- in fact, Opus wasn't originally targeted at that kind of use at all, and the authors were quite surprised that it outdid those kinds of high-latency codecs. Opus is a very low-latency codec, and it combines Skype's speech compression technology and more music-oriented technologies (those introduced in CELT) to allow interactive speech and music over the Web.

    Gaining marketshare in the high-bitrate stored music market against dominant formats like MP3 and AAC is hard, even when you outperform them substantially. But there's not really any established players in low-latency Internet audio. Opus blows all the other low-latency and/or low-bitrate codecs out of the water when competing in those other codecs' bitrate-latency "sweet spots", is the only codec which can compete across that kind of a range, is now a standard, is royalty-free, and is already implemented in Firefox.

    Those who are saying "meh, only audiophiles will care" or "this won't get marketshare against AAC" are missing the point. This codec will change the face of the Web.

    1. Re:Many people missing the point: HTML5, VOIP, etc by jensend · · Score: 5, Informative

      No. You're confusing transmission latency with algorithmic latency. If you're encoding music to store on an mp3 player, the format can use larger transform windows (usually MDCT) and other methods which mean the encoder looks at a larger number of samples before sending any output and the decoder has to read a larger amount of data before outputting any audio.

      For codecs like mp3, AAC, etc, even if you had an infinitely fast computer and infinitely fast transmission, adding an encoder and decoder between the recording and the playback adds ~200ms of latency. That's fine for storing files on an mp3 player but totally unacceptable for real-time communication. Opus, by default, has 20ms of algorithmic latency, and it can be configured to go as low as 2.5ms.

  8. Re:Oh boy! by Russ1642 · · Score: 5, Insightful

    Audiophiles? Really? The only format they care about is original wax drums rubbed with a diamond and amplified by analog equipment connected by gold cables soaked in unicorn tears. They want nothing to do with digital audio codecs.

  9. Getting it right the second time! by bill_mcgonigle · · Score: 4, Interesting

    Kudos to the folks working on this. We were all rooting for ogg/vorbis/xiph, but they had some lessons to learn. Positives that I see for Opus:

    • libopus is available now
    • it has an integer-only compile flag
    • it's BSD licensed
    • patent grants from big industry players
    • doxygen API docs
    • big open source projects already support it
    • orchestrated PR

    still could use some love:

    • apparently it's CPU/power efficient but that's not bragged about (and many would suspect otherwise).
    • some of the documentation is just a link to slide decks from conferences
    • there is test code, but I didn't see sample code explicitly. Yeah, you can grab ffmpeg source or whatever, but purposeful sample code is written to be as explanatory as possible. Maybe it's in the tarball, but if it is, say so on the download page.

    Still, an order of magnitude better than the last attempt at gaining industry acceptance of free codecs. This one might just work out!

    --
    My God, it's Full of Source!
    OUTSIDE_IP=$(dig +short my.ip @outsideip.net)
    1. Re:Getting it right the second time! by jmv · · Score: 5, Informative

      there is test code, but I didn't see sample code explicitly.

      Well, we have code snippets for the encoder and the decoder. Otherwise, there's always the code for opus_demo.c and opusenc.c/opusdec.c. Let me know what you think is missing and we can try improving that.

  10. Re:No Loseless support? by jensend · · Score: 5, Informative

    It can support up to 255 channels. The two-channel maximum is per stream. Multiple streams can be packed into single frames, but for >2 channels the mapping and coupling has to be signaled at the container level.

    The standard tools available at opus-codec.org use Ogg as a container for "at-rest files," and Firefox, foobar2000, and gstreamer-supporting apps (like Opera on Linux) all play Opus-in-Ogg files. VLC and Rockbox will soon release versions with playback support for these too. Though RTP etc is a primary focus, the "at-rest file" support is ahead of the interactive support at this stage of the game.

    A Matroska mapping is still in progress. Most likely, for the time being, Opus files will be predominantly Ogg, while the Matroska mapping will be more important for using Opus with video streams (esp. vp8, improving on the webm vp8+vorbis+matroska combination).

  11. Re:No Loseless support? by Anonymous Coward · · Score: 4, Informative

    Despite what the wiki page says, the RFC page states mono or stereo, and indeed the reference source code checks for channels equal to 1 or 2.

          if((Fs!=48000&&Fs!=24000&&Fs!=16000&&Fs!=12000&&Fs!=8000)||(channels!=1&&channels!=2)||
                  (application != OPUS_APPLICATION_VOIP && application != OPUS_APPLICATION_AUDIO
                  && application != OPUS_APPLICATION_RESTRICTED_LOWDELAY))
          {
                if (error)
                      *error = OPUS_BAD_ARG;
                return NULL;
          }

    I think the 255 reference was probably a left over from the Vorbis definition. It's too bad that multi-channel isn't naively supported, as multiplexing multiple mono or stereo streams will be a bit of a pain.

  12. Re:Sorry, nope. by jmv · · Score: 4, Interesting

    Bitrates below 16 kb/s are irrelevant on the Internet. Just the overhead (IP+UDP+RTP headers) of sending packets every 20 ms is 16 kb/s. At that point, you might as well transmit some real quality.

  13. Re:No Loseless support? by Requiem18th · · Score: 5, Funny

    File a DMCA take down notice against your comment.

    --
    But... the future refused to change.
  14. Re:No Loseless support? by jmv · · Score: 4, Informative

    the standard does not specify a recommended container format

    See the Opus Ogg mapping for more details. Of course, if people want to use other containers, we're not a container police.

  15. Re:No Loseless support? by jmv · · Score: 4, Informative

    A quick look at the graph shows that they stop at 128kbps, which would mean it's a great codec for high-quality real-time audio telephony rather than as a codec to span the spectrum of low end real time to lossless audio.

    The reason the graph stops at 128 kb/s is that things become uninteresting at that point -- because nobody's able to actually tell the difference. With VBR, we've never had anyone report audio not being transparent above 200 kb/s. There's a reason people don't want to organize listening tests at 128 kb/s and (especially) above. It's indeed the case that we don't support lossless. That one is already covered very well by FLAC and there was no point adding completely different algorithms to handle that. Otherwise, Opus can replace MP3/AAC/Vorbis at rates above 128 kb/s too.

  16. Some indications that it's not "Fully Free" ...yet by smoothnorman · · Score: 4, Informative

    none other than Bruce Perens (Open Source champion) points us to these: https://datatracker.ietf.org/ipr/1520/ https://datatracker.ietf.org/ipr/1741/ wherein we learn that Opus is "possible royalty/fee". this is not consistent with "Fully Free" to any patent troll waiting for broad adoption before jumping.

  17. It fills a needed niche by pavon · · Score: 5, Informative

    To me the biggest difference is that Vorbis was competing head on with a strongly entrenched codec (MP3) and it's official successor (AAC). Opus on the other-hand fills niche in the audio encoding world that doesn't have an established winner; that is high-quality low-latency codecs. This area has largely been driven by cellphone market, and has focused on encoding voice signals at toll-quality, that is as good as an analog long-distance signal (8kHz mono). There really hasn't been much focus on creating a low-latency codec that can encode full-band (music signals), and Opus does that incredibly well. It also sounds much better encoding speech at the bitrates that are used for VoIP (rather than the lower ones used by cellphones).

    The internet community has never really been happy with the performance of ITU specified codecs that have been primarily used for SIP and other VoIP applications in the past, and there is no good reason from them not to support Opus. The patent grants are there, the vender support is there, and there is no real competitor codec worth mentioning. I'm convinced this will make much deeper inroads than Vorbis did.

  18. Re:No Loseless support? by sconeu · · Score: 4, Funny

    One Codec to rule them all
    Once Codec to find them
    Once Codec to bring them all
    And in the RIAA's darkness bind them

    --
    General Relativity: Space-time tells matter where to go; Matter tells space-time what shape to be.
  19. Codec latency, not network latency by cbhacking · · Score: 5, Informative

    When applied to a codec, "latency" (obviously) refers to stream latency, not network latency (the latter has nothing to do with a codec, obviously). The problem with codecs like MP3 for streaming purposes is that they encode fairly large "frames" of audio, and these frames must be recorded before they can be encoded, encoded before they can be transmitted, received before they can be decoded, and quite possibly also decoded (fully) before they can be played. It may be possible to begin playing before the decoding is complete, which would help a lot, but it also might not - it depends on the codec.

    Suppose you've got a "high latency" codec (such as MP3) that uses a 250ms frame and requires full decoding (this is an example; I don't know the actual numbers for MP3). Then suppose you have a low-latency codec (like Opus) with a 15ms frame size. In both cases, your network latency is going to be the same (let's say 100ms). You want to stream audio over this connection. It's pretty high bandwidth and you've got a decent audio processor, so any codec can be encoded, transmitted, and decoded in 10ms or less.

    At t=0, begin recording an audio (such as voice) segment.

    Codec1 (high-latency):
    At t=250ms, you've filled the frame and can begin compression.
    At t=360ms, the frame has been encoded, transmitted, received, and decoded.
    Total latency before playback can begin: almost 3/8 of a second after recording began.

    Codec2 (low-latency):
    At t=15ms, you've filled an audio frame and can begin compression.
    At t=125ms, the frame has been recieved and decoded by the other end, and playback can begin.
    Total latency: 1/8 of a second over the same network connection.

    1/8 of a second can be perceived, but barely, and almost all of that is simply an inherent cost of the network transmission. 360ms is not only easy to perceive, it's quite enough to be annoying (think intercontinental call via satellite). There's tons of demand for low-latency codecs.

    --
    There's no place I could be, since I've found Serenity...
  20. Re:Oh boy! by Lumpy · · Score: 4, Funny

    Pffft, you say ordinary diamonds. real audiophiles only listen to BLUE diamonds that were polished on the thighs of virgins.

    --
    Do not look at laser with remaining good eye.
  21. Re:No Loseless support? by ZorinLynx · · Score: 4, Interesting

    Actually generic data compression algorithms don't work very well on audio files. Lossless audio codecs like ALAC and FLAC do waveform analysis and "know more" about the nature of audio files so that they can be compressed more than your typical compression algorithm like gzip would do.

  22. Re:No Loseless support? by socceroos · · Score: 4, Informative

    jmv and I both work for Mozilla and are on the Opus team.

  23. Re:No Loseless support? by jmv · · Score: 5, Interesting

    I don't think silicon support for audio codecs is really useful anymore. Audio codecs have such a low complexity compared to video that modern smartphones can run them really easily.I haven't measured exactly, but I'd say you can probably decode an Opus stream with about 2% CPU on the latest Android phone. Not worth paying for extra silicon.

  24. Re:Some indications that it's not "Fully Free" ... by Bruce+Perens · · Score: 5, Interesting
    The developers are adamant that the patents claimed by Qualcom and Huawei don't apply to their code. But at the moment, those two companies are claiming their patents could apply, and are asking for RAND terms with possible royalties.

    I asked Qualcom if they'd consider changing their declaration to royalty-free. I don't know anyone at Huawei.

  25. Re:No Loseless support? by jmv · · Score: 4, Informative

    What Monty mostly regretted were some decisions that caused a large increase in the amount of *RAM* required. We were actually careful about that. Another improvement compared to Vorbis is that we don't have these codebooks that you need to carry in the headers. This means you can join an ongoing Opus stream with no signalling whatsoever.