Live data from Hacker News

Opus Audio Codec – FAQ

wiki.xiph.org

51–60 of 81 posts

Re: Opus Audio Codec – FAQ

#51

I really wish Opus would make it into wireless speakers and headphones. From what I've read, it might not be the most power-efficient format, however, and those tiny earbuds need to be /really/ efficient. But I also suspect that popular wireless codecs (i.e. Dolbly's AptX, MPEG's AAC, and Samsung's Scalable) are powered by marketing fluff. I'd love an informed opinion :D

Opus decoding in earbuds is totally doable. I've been working on an Opus mode for Bluetooth A2DP, it is a bit of work getting two implementations going, but I don't think Opus on earbuds is any more unreasonable than AAC.

One big benefit to Opus on Bluetooth devices is that a lot of content, particularly Spotify, YouTube, and Netflix, is already in Opus; so presumably if one application is playing then it should be possible to just proxy the frames right over the wire without reencoding; switching to decoding and mixing when system sounds play is also pretty straightforward in that case.

AptX HD is probably the most reasonable Bluetooth codec deployed right now, but it is proprietary to Qualcomm. LDAC is by far the silliest codec, it is very Sony, and designed for audiophools, but at least it's free and deployed on every Android device.

Re: Opus Audio Codec – FAQ

#52

Earlier quoted context omitted.

Doesn't seem to be the case at least in Rockbox, ATRAC is less efficient than Vorbis or MP3: https://www.rockbox.org/wiki/CodecPerformanceComparison

Maybe ATRAC was designed for the purpose of being efficient when using dedicated hardware without making the hardware expensive to manufacture? It's from the minidisc era so I'm not sure it would have been common for them to use general-purpose CPUs to decode audio by then

Indeed. Sony made ATRAC ASICs, and I doubt there's one in anything Rockbox supports.

Re: Opus Audio Codec – FAQ

#53

I really wish Opus would make it into wireless speakers and headphones. From what I've read, it might not be the most power-efficient format, however, and those tiny earbuds need to be /really/ efficient. But I also suspect that popular wireless codecs (i.e. Dolbly's AptX, MPEG's AAC, and Samsung's Scalable) are powered by marketing fluff. I'd love an informed opinion :D

Opus decoding in earbuds is totally doable. I've been working on an Opus mode for Bluetooth A2DP, it is a bit of work getting two implementations going, but I don't think Opus on earbuds is any more unreasonable than AAC. One big benefit to Opus on Bluetooth devices is that a lot of content, particularly Spotify, YouTube, and Netflix, is already in Opus; so presumably if one application is playing then it should be p…

As a point of reference, I'm designing some ear buds that have pretty big batteries (~300mAh Li-Ion) and at that power budget the idle current for the battery power controller chip is sufficient to drain the battery in about a month (or several hours of active use).

I don't know if that's good enough to satisfy someone who purchases them, but it is what it is... I think you're probably right about active current consumption though, especially if you're using a modern MCU.

Re: Opus Audio Codec – FAQ

#54
I had good times with Opus.

We have been capturing then encoding audio using Opus from a low-power chip (nRF52840) then sent encoded data through BLE.

Worked liked a charm! Encoding used 50% of the CPU time.

Re: Opus Audio Codec – FAQ

#55

Opus is weird because it can use fewer bits to encode complex sounds, and more bits on simple sounds. MP3/Vorbis/AAC all do the opposite. I’ve read it is because it has relatively poor frequency precision, for which it gains excellent time precision. So, on purer sounds it has to use more bits to maintain accuracy. But it’s so counterintuitive, that when I also consider it can’t do a 44.1k sample rate, I stick with v…

That actually does make some sense to me, the same thing is done for video encoding, sort of.

If there's a static scene it encodes it at super high quality (but makes up for it by saying "don't change" for a while).

But if there's a fast scene a lot of details can get smudged without anyone noticing. I think people only tend to notice block artifacts with steps in luminosity during dark scenes, but I think you have to have a really bad encoding for that to be an issue in 2020.

Re: Opus Audio Codec – FAQ

#56

Earlier quoted context omitted.

> that when I also consider it can’t do a 44.1k sample rate Why is that an issue? I don't think you'll hear any difference if the Opus encoding is resampled to 48khz.

I didn’t hear a difference, and some even claim it’s a benefit since a lot of cheap hardware only speaks 48k, so it’s better to encode for it in advance than resample during playback. But, what can I say? It nagged at me in a totally unscientific way that I can encode without a resample to vorbis, but opus makes me resample.

You're probably noticing that the two numbers are not multiples of one another and time samples are discrete so the only way to convert sample rates between 44.1kHz and 48kHz is by interpolating. Going from 96kHz to 48kHz is easier, you just drop half the samples.

Obviously with low pass filtering for artifacts due to the nyquist frequency. But you are correct that it won't be a one-to-one correspondence between the audio samples like you'd get if it divided evenly.

If you had 24kHz encoded music would it bother you if it got upsampled to 48kHz? What if it was 26kHz? I think the prior would bother me less because I know the samples are synchronous in the two time bases.

Re: Opus Audio Codec – FAQ

#57
20 years ago we all wanted 128Kbps MP3 Quality at half the bitrate, AAC-LC ( Yes they somehow market it that way ), MP3 Pro, HE-AAC etc. And yet 20+ years later no single Codec can produce MP3 128Kbps quality at 64Kbps.

It was hard to imagine then, but not only do we now have cheap enough storage to store more music that you will ever listen, bandwidth and Internet speed has becomes so cheap we can now afford to stream it.

So in an interesting turn of event, the major usage is now 128Kbps and above. So often I see lots of 1-2Mbps Video Files having 256Kbps AAC within it. ( Normally you would put 128Kbps Audio and save those bitrate for Video ) And bandwidth and Data are only going to be cheaper in the coming 10 years.

In terms of Standard 128Kbps bitrate and above, AAC-LC in on par with Opus. And AAC-LC is officially patent free, as all patent has expired. HE-AAC v1 will be patent free as well in 3 years time.

Unless you are doing anything that focus on sub 64Kbps, you have an Audio Codec that is not just royalty free with patent grant, but free of patents, and it is extremely good.

I hope one day we would have a decent patent free video codec too.

Re: Opus Audio Codec – FAQ

#59
post #57

20 years ago we all wanted 128Kbps MP3 Quality at half the bitrate, AAC-LC ( Yes they somehow market it that way ), MP3 Pro, HE-AAC etc. And yet 20+ years later no single Codec can produce MP3 128Kbps quality at 64Kbps. It was hard to imagine then, but not only do we now have cheap enough storage to store more music that you will ever listen, bandwidth and Internet speed has becomes so cheap we can now afford to stre…

> So in an interesting turn of event, the major usage is now 128Kbps and above.

Do you have any statistics to underpin this weird claim?

Opus is the obvious choice for a wide range of applications that don't want transparent music reproduction and couldn't afford 128kbps if they wanted to.

Down below 6kbps where Opus can't go there's Codec 2 (down to a few hundred bits per second) but I don't see that on the Internet.

Re: Opus Audio Codec – FAQ

#60
post #57

20 years ago we all wanted 128Kbps MP3 Quality at half the bitrate, AAC-LC ( Yes they somehow market it that way ), MP3 Pro, HE-AAC etc. And yet 20+ years later no single Codec can produce MP3 128Kbps quality at 64Kbps. It was hard to imagine then, but not only do we now have cheap enough storage to store more music that you will ever listen, bandwidth and Internet speed has becomes so cheap we can now afford to stre…

Youtube has tons of videos with 50-70kbps Opus.
Post reply on HN