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

21 of 327 comments (clear)

  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: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
  3. 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
  4. 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.

  5. Re:Opus?!? by jfengel · · Score: 5, Funny

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

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

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

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

    File a DMCA take down notice against your comment.

    --
    But... the future refused to change.
  9. 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.

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

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

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

  13. 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...
  14. 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.
  15. 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.

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

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

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

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

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

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