Live data from Hacker News

Opus Audio Codec – FAQ

wiki.xiph.org

31–40 of 81 posts

Re: Opus Audio Codec – FAQ

#31

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

ALAC (Apple Lossless) was specifically designed to be power efficient, hence its use in AirPlay.

Interestingly one of the most power efficient lossy codecs is still ATRAC, Sony's MiniDisc codec, specifically designed to sip lightly at your AA batteries.

Re: Opus Audio Codec – FAQ

#32
post #4
post #3

Site has been hugged. On another point, is Opus a popular format, given that alot of people now stream stuff mostly? IIRC, some of the Quake engines support it.

I have never seen an Opus file in the wild. MP3 and FLAC are by far still dominant. Ogg is still popular I. It’s niche (eg game sounds, and I think Spotify uses it too)

Opus is used by basically every company with an integrated product that they control, who doesn't own patents for inferior formats. That includes basically ~all VoIP software, games, YouTube on Chrome and other supporting browsers, messaging apps with audio features, etc. Basically anyone whose main business isn't audio. Because it's the best codec and it's free. It's be dumb not to use it. And if you control your entire product, you can just add support and use it without worrying about compatibility.

Unfortunately, the companies whose business is audio invariably have some sort of relationship with patented, shittier formats like AAC or even more obscure stuff that only exists to collect royalties like aptX, so they aren't going to market Opus to you as a consumer of audio formats or a feature in audio related products, nor promote support and compatibility across devices. And so you pay more, and get an inferior product :-)

Re: Opus Audio Codec – FAQ

#33
Opus is great. I encode all my music in Opus for playback (after buying it in FLAC).

Are all browsers supporting it now? I remember in the past Apple staunchly refused to support Opus and Ogg container. Is it better now after they joined Alliance for Open Media?

Re: Opus Audio Codec – FAQ

#34
post #12

Earlier quoted context omitted.

Opus is the standard audio codec in WebM, alongside VP9 or AV1 video.

AV1 does not appear to have been added yet

... as far as this source is concerned at least: https://www.webmproject.org/docs/container/#video-codec

Re: Opus Audio Codec – FAQ

#35
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 vorbis for high-bitrate CD rips, just so I don’t have to wonder if artifacts are hiding somewhere. I think most of the testing by far has been on the low-bitrate encoding where it really excels.

Edit to add: I had my whole collection encoded with Opus at one point, and could never discern it from the FLACs in a few ABX tests I ran. It’s only theoretical problems that were nagging at me that made me switch back, nothing I actually heard.

Re: Opus Audio Codec – FAQ

#37

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

Re: Opus Audio Codec – FAQ

#38

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

Re: Opus Audio Codec – FAQ

#39

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…

If you worry about artifacts introduced by sample rate conversion, you shouldn't use a lossy format in the first place. The sample rate converter used by Opus (i.e., the speex resampler used in the opus-tools library) is completely transparent and does not introduce any audible artifacts. As per [1], the distortion caused by any lossy codec even at the highest bitrates is larger than that caused by re-sampling.

As for playback, most likely your sound card is already running at 48kHz; 44.1kHz may actually not be supported properly by your DAC (I guess since it requires a higher quality anti-aliasing filter). As [1] continues to explain, Opus is essentially shifting the burden of resampling to the encoding rather than the decoding side of things.

That being said, Opus technically supports odd sample rates such as 44.1kHz, but this has to be signalled in a side-channel. See [1] downwards.

[1] https://wiki.xiph.org/OpusFAQ#What_is_Opus_Custom.3F

edit: clarity

Re: Opus Audio Codec – FAQ

#40

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

ALAC (Apple Lossless) was specifically designed to be power efficient, hence its use in AirPlay. Interestingly one of the most power efficient lossy codecs is still ATRAC, Sony's MiniDisc codec, specifically designed to sip lightly at your AA batteries.

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
Post reply on HN