Hacker News new | past | comments | ask | show | jobs | submit login
Opus Interactive Audio Codec v1.1.3 released (opus-codec.com)
169 points by MrZeus on July 22, 2016 | hide | past | favorite | 83 comments



I'm a longtime OGG Vorbis user and upgrading everything to Opus.

From the FAQ: Does Opus make all those other lossy codecs obsolete? Yes. From a technical point of view (loss, delay, bitrates, ...) Opus renders Speex obsolete and should also replace Vorbis and the common proprietary codecs too (e.g. AAC, MP3, ...).


If you're going through all your music and converting everything to Opus, don't. It's another lossy codec and you will lose more sound quality (it will sound worse). Keep what you have. If you're really concerned over sound quality: use something lossless, like FLAC. If you're concerned over space: storage is insanely cheap, and is getting cheaper.


I'm sick of the "storage is insanely cheap" refrain from FLAC proponents.

CDs are 1400 Kbit/s and FLAC might be half that at 700 Kbit/s. I have 50 GB or so of music at 260 Kbit/s AAC. If I were to use FLAC instead, I would need 140 GB of storage. Practically speaking, for a MacBook this means going to the 512 GB storage model instead of the 256 GB storage model, which is an extra $300. For my desktop, this means either dropping $200 on another SSD or going with rotational storage for my music library. For my phone, this means downsizing my library by an additional 60%, and I have already had to trim a lot of music out. Or I could buy another phone and spend $200 to get a model with enough storage for me. (Streaming to the phone is not always an option. I spend time in areas without reception.)

However, since the difference between FLAC and 260 Kbit/s AAC is imperceptible to us mere mortals, I can spend my $500-700 on something more interesting than "insanely cheap storage", and I get to enjoy my music.

Yes, let's not have people transcode music needlessly. But stop saying that "storage is insanely cheap" because cheap storage isn't portable.

FLAC is great for archiving music but that's not something that I do. I don't archive music. I listen to it.


> I'm sick of the "storage is insanely cheap" refrain from FLAC proponents.

It is insanely cheap.

> Practically speaking, for a MacBook this means going to the 512 GB storage model instead of the 256 GB storage model, which is an extra $300.

That's really a issue related to buying and owning a Apple laptop rather then FLAC being too big. You bought something with very limited capacity that costs a huge amount of money to expand.

3TB drives are now about $100. That's _cheap_.

> Yes, let's not have people transcode music needlessly.

I transcode _all_the_time.

It's fun.

Why? Because my music I care about is in flac. So if I want mp3 I can have mp3. If I want AAC I can have AAC. If I want Opus, then everything can be had in Opus.

Some devices don't like AAC. Some don't like MP3 VBR. Many can't play Vorbis, and very few like Opus. But none of that matters to me.

I can stream to my phone over cell network without any major expense because now I can use Opus running at 60Kb/s to match what I used to get with MP3 at 128Kb/s

If I followed your thinking then I would have a great amount of my stuff in 256 Kb/s VBR MP3 LAME, because that was the best and most compatible technology for a long time.

Now where would I be?


I feel like you're just trying to bait me here, so I'll bite.

Surely it must be obvious that different people have different priorities when it comes to purchasing computers? Is there something I'm missing? You want lots of storage for cheap and music encoded as FLAC. I want fast storage (PCIe flash) on a portable device with good battery life and access to my entire music library in a high-quality format.

The fact that you say transcoding is "fun"—well, I'm not sure how to respond to that, because it seems to support the point I was making—that different people have different priorities. I do not enjoy transcoding, I would rather avoid it. Perhaps because I don't enjoy it, I would make different choices. Just a thought.

The comment about converting to MP3 LAME is a bit of a bad joke. MP3 was never sonically transparent. Speaking as someone who did follow my own thinking on the matter, I only have a small handful of MP3s in my library. No other formats (including WAV, FLAC, or physical media) were available for those songs.

All the devices which I use for music playback play AAC. I consider this unlikely to change. AAC is sonically transparent, anyway, so a third generation copy of my library would be fine, if I needed to do it.

FLAC is for archiving and first-generation copies, and that's just not something I'm in the business of doing.


> 3TB drives are now about $100. That's _cheap_.

Cheap storage exists. Parent's point is that cheap storage isn't portable.


Online storage is not that expensive(i.e. $0.026 / GB / month). I'm not talking about iCloud.


Then you're trading size and storage cost for battery life and cellular bandwidth cost.


I can't help but feel the real elephant in the room here is the assumption that it's valid to expect tens to hundreds of gigabytes of compressed audio to be immediately accessible, and from a laptop no less.


What does "valid" mean here? If somebody wants to do that, and can do it with lossy compression, who are you to say it's "invalid"?

And who are you to tell them they should losslessly compress, even though it means that now they can't have what they want?


What we have is general advice(which is correct) being countered by a someone citing a specific situation, in which all the aspects that make the advice non-applicable are constraints they have imposed on their self.

50 GB of music on a Macbook, which would require upgrading and this cost an extra $300, so it's not cheap. Does everyone need a Macbook? Does everyone need to use a laptop? Does everyone need over 17 days of music immediately accessible? Even if it's immediately accessible, does it need to be locally stored, or is remote access applicable?

The comment starts out with "I'm sick of the "storage is insanely cheap" refrain from FLAC proponents." What I meant by "valid" is does it apply to the majority of the audience the comment was aimed at, or are we hearing about someone's self-imposed problems?

It's sort of like a discussion about driving safety, and someone suggests using a specific high safety rated car which costs a little most, but not too much, and someone else jumping in and complaining how they are tired of that suggestion because the convertible version of that car costs far more. While technically correct, I would argue that the original advice probably wasn't even aimed at that person, but at those who value safety more that having a convertible.

Similarly, here we have someone that may care about quality, but I don't think it's hard to argue from their statements that they care less about quality than a few other factors, such as using an Apple product, using a laptop, keeping their files local, and having a very large store of music. Since the source of this stated "If you're really concerned over sound quality: use something lossless, like FLAC." I think it's entirely valid to point out that self imposed constraints such as the ones in this discussion are definitely something worth looking at when someone calls the usefulness of the comment in question.

That said, I'll fully admit I didn't express that well, and could have come across as preachy (and maybe I still am). I just think the original comment was worthwhile (if you care, keep your originals lossless), and didn't think the counter was very well presented at all.


> Practically speaking, for a MacBook this means going to the 512 GB storage model instead of the 256 GB storage model, which is an extra $300.

I store my library lossless (where available) on a NAS, and then transcode to <lossy codec of the day> for portable use.

I use Beets to manage it: http://beets.io


Yep. FLAC is for archiving and home playback. Lossy formats are king for portable usage, and when I'm using modestly priced IEMs plugged into my phone with the background din or a train or airplane, I'm really not in a position to care about the debatably negligible differences anyways.

(I'm a classical trained musician, I've worked as a recording engineer. I've used great equipment, heard pristine live music in beautiful acoustic spaces, and am totally willing to compromise to "good enough" for portable use). I archive my music in a lossless format simply because I want options later as better lossy codecs like Opus come around.


Beets is awesome. For tagging I also use MusicBrainz Picard. Which music app do you stream beets to? I didn't like Tomahawk.

https://picard.musicbrainz.org/


MusicBrainz Picard is brilliant, and really helped me sort out an unwieldy collection.


Why use Picard for tagging? Does it offer anything beets doesn't?


I dunno, I find they do it a bit differently. I usually tag in Picard first, then beets. shrug


Storage is insanely cheap. A terabyte external hard drive is about $60 on Amazon. You can fill one of those up with more FLAC music than you will ever listen to, then encode what you want for regular listening in the lossy format of your choice. The alternative is committing to a lossy format today and being essentially stuck with it forever; you claim mere mortals can't tell the difference between FLAC and high bitrate lossy (I don't disagree), but I'll bet you can tell the difference between first and second or third generation lossy. When you think about it, you're losing usable space on your devices right now, because 260kb/s AAC can be imperceptibly replaced with much lower bitrate Opus.

<mild flamebait>I wish Apple fans would step outside of their computing comfort zone every now and then so that they could realize just how much Apple is ripping them off in certain respects.</mild flamebait>


I have a 1 terabyte SSD in my Mac Book Pro (pre retina), and it cost about $250 on sale from Amazon.

You're running into Apple making a mint off of you, rather than FLAC's being too large.

For the desktop, it's even cheaper. 2TB hard drive is around $100.00 - how many latte's is that? If you can afford to go out and eat a $50 meal (including tips and drinks,etc), that's about 2 meals worth... still very cheap.

Transcoding is an option you know? Keep FLACs as source, and transcode for portable usage.

https://www.amazon.com/SanDisk-Ultra-2-5-Inch-Height-SDSSDHI...

for example this is $228 for 960 gigs and they have these kinds of sales all the time ... if that's not insanely cheap I don't know what your definition is. Note that it's twice as much storage as what you're getting from apple for $300, and speedwise you won't notice a difference unless you're doing hard core file transfers 24/7.

Or this one: $219 for 960 Gigs SSD https://www.amazon.com/dp/B019H3B6SA/ref=psdc_1292116011_t3_...

Storage prices for SSD's are literally crashing all around us if you are in North America. It doesn't make any sense for people to cover their eyes and not see.


I'm not disagreeing with you, but as someone else who's also feeling the sting of having a small built-in HD on my mbp, I can point out that 256G thumb drives are like $60 right now. "Insanely cheap" is of course relative, but I'm not going to call that prohibitive.


Friendly reminder that not everyone lives in a developed country.

$60 (+shipping+taxes+customs+middlemen) can be really prohibitive in a non-developed country.


I think you'd have a bigger problem with the MacBook part of your equation there.


If a person has trouble w/ 60, maybe they got the macbook as a gift. If they got it as a gift, it's not too hard to ask for a 60 dollar thumb drive as well.


> FLAC is great for archiving music but that's not something that I do. I don't archive music. I listen to it.

That sounds very condescending to me. I think no one is advertising saving your music in FLAC on your laptop.

I save all my music (and yes, as FLAC if I can get it) to my Synology NAS on my home network. From there I can transcode it to all devices in what format suits them best and stream it to my computers/stereos while I'm home.

I'm not saying everyone should do this, it's obviously more work than just having AAC on your main/only computer. But it comes with a very high flexibility. The price tag for a Synlogoy with a 4TB drive was something like 300 Euro, not 500-700$.


> on another SSD or going with rotational storage for my music library

oh, what a tragedy.

FLAC for archiving and as a base for new encoding seems like a reasonable middle ground.


> If you're concerned over space: storage is insanely cheap, and is getting cheaper.

Depends on the storage context.

If you want to carry a significant fraction of your music collection on a phone, lossless is not an option. Lossless is what I use for my main storage (a machine with a dozen terabytes-worth of spinning rust), but the music is converted to lossy before being synced to my laptop and phone, and I'd rather have lossy files in these contexts (whose output quality isn't exactly top-of-the-line anyway) than having to juggle external drives.

In that context, converting the lossy versions of the library to OPUS (with master files remaining lossless) makes perfect sense.


I just use Subsonic to transcode on-the-fly and stream my FLAC files. On iOS there's play:Sub and on Android there's DSub.


That is assuming that you don't want your music available offline and you have enough data allowance. Which is not true for many people.


Some people keep both lossless and lossy copies around. It makes sense to have lossless backups on a cheap storage medium, and only carry around lossy versions on your phone. And switching to Opus for your lossy version would make a lot of sense if you're currently using an inferior format.


Sensible advice, but "user" of OGG doesn't mean "I store my gold music library" in OGG.

My gold library is in FLAC but I transcode to MP3 using mp3fs for various uses.


The optimal solution is probably lossless for archival, lossy for portable playback. I ripped my whole CD collection to FLAC and gave away the CDs. Now if I want to try something like Opus I can easily re-rip from FLAC. As you hint at, you shouldn't rip from lossy, that makes no sense.


>If you're going through all your music and converting everything to Opus, don't. It's another lossy codec and you will lose more sound quality (it will sound worse). Keep what you have. If you're really concerned over sound quality: use something lossless, like FLAC.

I'm buying music in FLAC, and store it as master copy. Then I convert it to Opus for actual playback. If better free codec will come out, I'll do the same thing, using FLAC as a source. So FLAC has its usage.


He probably doesn't mean that he is simply reencoding his already lossy OGG files with OPUS.


> you will lose more sound quality (it will sound worse)

If you want good sound, treat your room. Then buy _good_ speakers or headphones. Then buy a good sound interface. And only after that should you start worrying about signal qualities above 320kbps mp3.

Given as majority of people don't actually hear the difference form the first of these steps, advice about flac is only relevant to a really small amount of people, who are not only capable of hearing the difference, but also have gone through all previous steps.


Firefox (50 Nightly) just updated its copy of Opus to 1.1.3:

https://bugzilla.mozilla.org/show_bug.cgi?id=1288091



It's a shame that the browser support for Opus isn't great yet. Hopefully that changes soon. I still recommend VP9 video + Vorbis audio for now.

http://caniuse.com/#feat=webm


I thought the main selling point of Opus was always low latency, so better for real time and things such as Teamspeak?

I long ago stopped caring about lossy formats for music as everything is FLAC on the NAS. For audiobooks and similar squeezing another couple of percent compression just isn't worth the effort nowadays, so they can stay in whatever format they came in, preferably MP3. When you've a few TB of space it mostly doesn't matter any more.


> The format has three different modes: speech, hybrid, and CELT. The basic speech mode is pure SILK, up to 8 kHz, while the hybrid speech mode combines SILK for the speech and uses CELT for the frequency range above 8 kHz, allowing an easy fallback to pure SILK at very low bitrates.

> Opus combines the speech-oriented linear predictive coding SILK algorithm, and the lower-latency, MDCT-based CELT algorithm, switching between or combining them as needed for maximum efficiency.

https://en.wikipedia.org/wiki/Opus_(audio_format)#Features


The main selling point of Opus is low latency. They just accidentally ended up with something than offered better compression and quality than the established high latency codecs as well.


The compression codecs for OPUS are fantastic. Some users in a chatroom I frequent were trying to see how the sound held up at <10kbps, and the ranges were about on par with cassette quality for songs. My favorite one we tested was Ace of Spades - Motorhead, where it sounded almost identical for a 200kb size file versus the 9mb source. I know transcoding like this frowned upon, but it was a fun experiment.


Yeah, Opus is known to compress noisy rock/metal-like audio pretty well, even at low bitrates. The stuff it finds harder to do is tonal content, though it assigns more bitrate to help itself out. See the Tonality Estimation section here: https://xiph.org/~xiphmont/demo/opus/demo3.shtml


I've encoded audio books with Opus at 32 kbps and they sound good. I wouldn't vouch for music at such a low bitrate, but it's nice to have a set of 14 CDs only take up a quarter gigabyte on an SD card.


The Watson speech services default to Opus, and it's a great choice - high quality for the bandwidth, fairly easy to work with, and no patent encumbrance.


How is Opus decoding performance coming along compared to Vorbis? I'd love to use Opus in my mobile games (which need more simultaneous channels than the phone's one hardware decoder). But, decode perf is a serious concern. Even decoding once on load is serious business because it affects start-up time and/or frame rate hitching.


It is slower than Vorbis, but faster than AAC. On my 900MHz rpi2, decoding at 48khz uses about 10% of one core, so you should be alright.


This mailing list post has some old numbers: http://lists.xiph.org/pipermail/opus/2014-September/002706.h... The "tremolo decoder" is an ARM optimized Ogg Vorbis decoder.

Note this is from before 1.1.1 and 1.1.3 (above) which each contained ARM optimizations so perhaps quite a bit better?


JACK audio transport streams are in Opus format by default. Those of us who have been playing in the audio production field have been spoiled for quite a while now.


I'm puzzled by this. I'll do my homework, but for the moment, are you saying JACK transcodes its input into Opus to move it around from app to app, then transcodes it again on the way out?


Yeah. Opus is the default transport codec, and, should you wish to transcode to mp3 or otherwise, is converted after the fact.

One of the nice side effects of this is that transport streams are really low-bandwidth. If I set up a JACK master server, and, say, six slave laptops recording input, I can stream/mix over 802.11g without latency, whereas other solutions will fully saturate a gigabit switch.


But surely when I use JACK to record the audio output of VLC into Audacity (easiest way to record a short clip of what you're watching, IMHO, because you can apply a quick clean+edit immediately), it sends the audio lossless? (that is, a lossless copy of the VLC decoding of the probably lossy audio stream).

Otherwise I might have to rethink that trick...


Are there any audio quality comparisons with other codecs at higher bitrates? Their chart[1] only goes to 128kbps, with a couple cited tests at 96kbps and 64kbps.

1: https://opus-codec.org/comparison/


All codecs get great results out of high bitrates. The strength of Opus is that it get less-crappy results out of lower bitrates.


No need. Most codecs achieve transparency at and above 128 kbps.


with "most" excluding mp3, which does that at around 192kbps.


Your definition of transparency is obviously different from mine. I don't find even "good' codecs like AAC and Vorbis to be transparent until quite a bit higher than that - high enough that one might as well just use FLAC and be done with it.


Unless you passed a well-made ABX test, it's BS.


Thank you for that Wikipedia tangent, sir.


HydrogenAudio also has nice info: http://wiki.hydrogenaud.io/index.php?title=ABX , there's also some reports of actual ABX tests being done (probably by people with "golden ears"), you can find on the HydrogenAudio forums (sorry I can't provide a link right now).

Plus (heh, I'm not even sure if you're reading this 11 days after, so I pinged you with an upvote to increase the odds :p) if you care about audio quality stuff and whether humans can hear it or not, highly recommend checking out this video: http://www.xiph.org/video/vid2.shtml the guy does a great presentation, it's an enjoyable watch IMO. it's about sampling rates, bit rates and dithering, so not really about lossy compression, but it's still useful background knowledge to have, also when reasoning about lossy.


Whatsapp uses opus for voip, hoping to see an update soon.


Is there documentation of this somewhere? I try to use WhatsApp calling as much as I can because the sound quality is so amazing.


When you share a voice message on Android to another app, it results in a .opus file :)


The "better than MP3, AAC, and Vorbis" part of the title is apparently editorializing by the submitter, because I don't find any references to any of those formats in the OP.


Touché, the comparison tests are at http://opus-codec.com/comparison/


Yes, was it "this version" that made it better than MP3? I'd have thought the title would say what was new. Guess not...


Opus has always been better than MP3. Another big benefit of Opus over AAC and MP3 is that Opus is royalty-free for all uses whereas AAC and MP3 require the payment of patent licensing fees.


The last of the US patents covering MP3 should expire next year.

http://www.tunequest.org/a-big-list-of-mp3-patents/20070226/


It's under the "Comparisons" link


So, when will Apple's browsers support Opus (in Ogg container) in the audio tag?


It's a lossy compression, so xiph.org's free lossless audio codec is still my #1 when it comes to audio compression: https://xiph.org/flac/


Lossless and lossy compression have different use cases. Hell, even different kinds of lossy compression could have different use cases, for example encoding for voice vs music. Though offhand I can't think of any lossy use-case which Opus is not currently best for.


That is clear: voice over network, I don't care about some loss of fidelity, but for my audio collection, I absolutely do care.


I don't have any specialization in audio so I'd like to know how you can measure "quality"

It appears in some of the graphs on the comparison page. Is that just the closeness to the original audio sample?


Closeness to the original audio sample doesn't tell you anything, really. These codecs try to drop information in such ways that it's specifically as inaudible as possible to humans.

So, you could easily have an encoding which sounds worse than a different encoding, even though it's actually bitwise closer to the original.

For example, humans hear very bad above 20 kHz, so you can pretty safely drop any information about sounds above that. A bad codec would keep that information around and instead drop something in the usually audable range. And then it'd sound worse, even though it's really close bitwise to the original, from all the information it didn't drop above 20 kHz.

So, yeah, you actually need humans to rate the quality.


You get actual people to do listening tests for you and they subjectively rate it. There's no good way to automate it, unlike SSIM for video.


Seems really opinionated, in a bad way:

> rates are internally converted to 48 kHz

> only frequencies up to 20 kHz are encoded.

> In particular, software developers should not use Opus Custom for 44.1 kHz support

There are times when I need to not drop non-audible frequencies. Like when my microphone is on one system and my voice recognition is on another, voice recognition needs the full spectrum for accuracy. There are times when I need 44.1kHz and not 48 kHz, like on an embedded system with everything running at that and no performance left for converting or extra PCM channels for playing with different settings at once.

They keep saying it is designed for the internet, but did they miss the fact that all major players now have voice assistants like Siri, Google Assistant, Cortana? Did they miss the fact that more and more sensors are cheap embedded throwaway IoT devices? It's like it is designed for the internet of the 90s.


Voice recognition is very accurate on Opus (especially when trained on it). Commentary from an eng at a big voice rec house to me was that switching to opus _improved_ accuracy on their testing.

> There are times when I need 44.1kHz and not 48 kHz, like on an embedded system with everything running at that and no performance left for converting or extra PCM channels

Unfortunately we live in an interoperable world. And there are _many_ devices running at 48kHz without the resources to resample. Your devices would be unable to interoperate.

Being "opinionated" in this way is specifically to accomplish the goal of guarenteeing interoperability in a world with cheap throwaway IoT devices.

> the fact that all major players now have voice assistants like Siri, Google Assistant, Cortana?

You might want to look at how these systems are sending audio...


Good points, but I just wanted to point out that we are only missing a 4 kHz range (20-24 kHz) as the highest frequency a 48 kHz digital signal can represent is 24 kHz (Nyquist sampling theorem).

MP3s actually tend to have a worse cutoff depending on encode settings, with values from 20.5 down to 16 kHz [1].

[1] https://www.whatinterviewprep.com/prepare-for-the-interview/...


I agree but

> voice recognition needs the full spectrum for accuracy

do you have a source for this? Voice signals are conventionally low-bandwidth; 16kHz is usually "good enough" for human-human transmission. Formant frequencies top out around 3kHz [1] and upper vocal harmonics are not really important outside musical applications. Consonants are a bit more complicated but I'd be interested to know what voice information is present above 20kHz.

[1] https://en.wikipedia.org/wiki/Formant#Formants_and_phonetics


yeah, i can't hear anything past 13.5kHz and can understand speech just fine. can't imagine why a computer couldn't.


Opus works great for speech recognition but I wanted to point out how your argument doesn't support the conclusion logically.

Lets imagine that human speech had a nearly unique property of having another whole copy of the speech in the form of ultrasonic overtones at 10x the normal frequency at a loud volume.

You couldn't hear them and yet you hear speech fine. But a computer could make good use of the ultrasound portion-- and maybe understand speech much better than you as a result.

This isn't how it works in reality, but it does show a flaw in your logic.


The argument is that if a human brain can recognise speech accurately without needing your hypotehtical ultrasonic overtones, why would a computer need them? Not to mention that most mid-range microphones won't pick up such overtones anyway. There isn't a flaw in their logic, you're just arguing that there might be more information that a computer can use -- but the fact that we don't need it leads to the conclusion that a computer doesn't need it either.


They're likely thinking of people talking to people over the Internet (Skype/Mumble/Discord), not talking to machines (Siri/OK Google).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: