Live data from Hacker News

Opus Audio Codec – FAQ

wiki.xiph.org

61–70 of 81 posts

Re: Opus Audio Codec – FAQ

#61
post #17
post #15

Earlier quoted context omitted.

Yes, but with opus, that only put's the audio in a .opus container, which isn't as widely compatible as the .ogg container.

It is literally the same bits. Feel free to change the extension if that helps (it does on some old Android versions, for sure). Source: I am a co-author on RFC 6716 and RFC 7845.

Oh, good to know, thanks :)

Re: Opus Audio Codec – FAQ

#62
post #19
post #8

The only point in lossy encoding is to save space / bandwidth . Opus excels at getting good sound quality at lower bitrates. If there's a talk or lecture on Youtube that you're about to grab, try the 50kbps Opus version and save your limited space for more important things, but you might need to remux from webm to an ogg container for compatibility. e.g. youtube-dl -f249 $URL --exec 'ffmpeg -i {} -vn -c:a copy {}.ogg…

If you have youtube-dl and ffmpeg installed together on linux or both executables in the same directory on windows, youtube-dl automatically remuxes "incompatible" formats into an mkv file.

Yes, that's great for videos, but many audio players don't support matroska containers. Putting the opus audio in an ogg container seems to be most effective to get a playable file for most people, so that's my default suggestion.

Re: Opus Audio Codec – FAQ

#63
post #8

The only point in lossy encoding is to save space / bandwidth . Opus excels at getting good sound quality at lower bitrates. If there's a talk or lecture on Youtube that you're about to grab, try the 50kbps Opus version and save your limited space for more important things, but you might need to remux from webm to an ogg container for compatibility. e.g. youtube-dl -f249 $URL --exec 'ffmpeg -i {} -vn -c:a copy {}.ogg…

> e.g. youtube-dl -f249 $URL --exec 'ffmpeg -i {} -vn -c:a copy {}.ogg' Why not just `youtube-dl -x` ?

See my reply above.

Re: Opus Audio Codec – FAQ

#64

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

When I connect my headset to my android phone I get some marketing fluff notification about the codec.. and I cant dismiss this notification! so much for it being my phone.

Re: Opus Audio Codec – FAQ

#65

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

APT-x is very good, low latency codec. It's been around a long time and is not marketing fluff. Some AAC codecs are also very well made for specific purposes. Opus is too high latency for headphones.

Re: Opus Audio Codec – FAQ

#66

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 fo…

Yep, I've read all that before. I didn't mean to focus the discussion on the resampling--what I was trying to get across is, this codec acts differently than codecs that have been extensively tested and ABXed at high bitrates for years. I didn't even mention other factors like how it injects noise into bands on purpose (where you can also find references claiming that's a benefit and not a downside, of course). It was about a year ago, but beyond my own ABX testing I looked around quite a bit, and didn't see many high-bitrate tests out there. All the focus seemed to be on the 64kbit range.

This should not matter to me personally, as I have proven to myself that pretty low bitrates are transparent to me, regardless of the codec. But... I have the same psychosis that a lot of people have, where I think I can hear differences when I know which is which.

If space were an issue I'd use 90kbit/s opus (that was the threshold for me in my testing). It's actually pretty amazing, but since I have the storage space, I archive FLAC and carry around 256kbit/s vorbis, and don't even question the quality. It's easier to use more space than to fix my faulty perception!

Re: Opus Audio Codec – FAQ

#67

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

APT-x is very good, low latency codec. It's been around a long time and is not marketing fluff. Some AAC codecs are also very well made for specific purposes. Opus is too high latency for headphones.

The lowest number I can find for "low-latency Apt-X" is 32 ms end-to-end over Bluetooth. Opus frames default to 20 ms wide but can be configured as small as 2.5 ms, so I don't think it's going to slow things down very much.

Re: Opus Audio Codec – FAQ

#68

Earlier quoted context omitted.

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…

Yeah the forced interpolation nags me, even though it shouldn't, but also: if I'm going to encode 128 kilobits per second, I can either use those bits to produce 44k samples or I can use them to produce 48k samples. That's 9% more samples per second that need to come out of the same number of compressed bits. I'm sure there are reasons (like the high correlation between adjacent samples) why that doesn't matter. But, would you resize a 4400px image to 4800px before compressing it to a jpeg? No way, because if you target the same file size either way, you'd encode more bits per pixel from the 4400px original.
Post reply on HN