this post was submitted on 24 Jan 2025
819 points (99.6% liked)

Programmer Humor

20140 readers
1569 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 66 points 2 days ago (3 children)

Opus! It's a merge of a codec designed for speech (from Skype!) with one designed for high quality audio by Xiph (same people who made OGG/Vorbis).

Although it needs some more work on latency, it prefers to work on bigger frames but default than Bluetooth packets likes, but I've seen there's work on standardizing a version that fits Bluetooth. Google even has it implemented now on Pixel devices.

Fully free codec!

[–] [email protected] 11 points 2 days ago (1 children)
[–] [email protected] 17 points 2 days ago* (last edited 1 day ago) (3 children)

Nobody needs lossless over Bluetooth

Edit: plenty of downvotes by people who have never listened to ABX tests with high quality lossy compare versus lossless

At high bitrate lossy you literally can't distinguish it. There's math to prove it;

https://en.wikipedia.org/wiki/Nyquist%E2%80%93Shannon_sampling_theorem

At 44 kHz 16 bit with over 192 Kbps with good encoders your ear literally can't physically discern the difference

[–] [email protected] 1 points 1 day ago

for bluetooth to be a proper replacement for wired audio it needs to support 56kbps dial up.

[–] [email protected] 11 points 2 days ago

The minute lossless becomes available wirelessly I’ll ditch my ridiculous headphone cable.

[–] [email protected] 2 points 1 day ago (1 children)

Nobody "needs" to listen to music over Bluetooth at all, but why not make it sound like it's supposed to?

[–] [email protected] 7 points 1 day ago* (last edited 1 day ago) (1 children)

Why use lossless for that when transparent lossy compression already does that with so much less bandwidth?

Opus is indistinguishable from lossless at 192 Kbps. Lossless needs roughly 800 - 1400 Kbps. That's a savings of between 4x - 7x with the exact same quality.

Your wireless antenna often draws more energy in proportion to bandwidth use than the decoder chip does, so using high quality lossy even gives you better battery life, on top of also being more tolerant to radio noise (easier to add error correction) and having better latency (less time needed to send each audio packet). And you can even get better range with equivalent radio chips due to needing less bandwidth!

You only need lossless for editing or as a source for transcoding, there's no need for it when just listening to media

[–] [email protected] 1 points 1 day ago (1 children)

This has strong "nobody needs a monitor over 120Hz because the human eye can't see it" logic. Transparency is completely subjective and people have different perceptions and sensitivities to audio and video compression artifacts. The quality of the hardware playing it back is also going to make a difference, and different setups are going to have a different ceiling for what can be heard.

The vast majority of people are genuinely going to hear zero difference between even 320kbps and a FLAC but that doesn't mean there actually is zero difference, you're still losing audio data. Even going from a 24-bit to a 16-bit FLAC can have a perceptible difference.

[–] [email protected] 7 points 1 day ago* (last edited 1 day ago)

The Nyquist-Shannon sampling theorem isn't subjective, it's physics.

Your example isn't great because it's about misconceptions about the eye, not about physical limits. The physical limits for transparency are real and absolute, not subjective. The eye can perceive quick flashes of objects that takes less than a thousandth of a second. The reason we rarely go above 120 Hz for monitors (other than cost) is because differences in continous movement barely can be perceived so it's rarely worth it.

We know where the upper limits for perception are. The difference typically lies in the encoder / decoder or physical setup, not the information a good codec is able to embedd with that bitrate.

[–] [email protected] 8 points 2 days ago (1 children)

Ah yes, good old TS3 and Mumble times.

[–] [email protected] 6 points 2 days ago

discord also uses opus

[–] [email protected] 2 points 2 days ago (1 children)

is opus the one that allows high quality mic and headphone at the same time over Bluetooth?

[–] [email protected] 6 points 2 days ago

That's more than a codec question, that's a Bluetooth audio profile question. Bluetooth LE Audio should support higher quality (including with Opus)