News for hackers. Stuff that matters.
Re:Apple Music Announces Spatial Audio and Lossless Audio by marcan_42 on Monday May 17, 2021 @10:06AM (#27183556)
This is largely because MP3 is a crappy, old format. Try high-bitrate Opus on most samples and you're a lot less likely to get above-chance results on an ABX test, pretty much ever, at high bitrates.

Ultimately though, lossy compression is always program-dependent ("program" here means the song, not the app). The encoders use psychoacoustic algorithms, and there is no way to prove they will perform well on all samples. So you will always be able to find corner cases where an encoder or format does worse and results in more audible artifacts; some of these might be encoder bugs, some might not. Therefore, it is fair to say that you might not want to rely on lossy compression for archival. But it is perfectly reasonable to use it to put music on devices to actually listen to.

You say good mastering makes it easier to notice encoding artifacts, but actually, bad mastering can do that too. Over-compressed stuff (in dynamic range) with inter-sample peaks above 0dB can clip and distort after getting run through a lossy codec.

As for lossless formats, though, anything above 48kHz 16 bits is complete nonsense for final delivery to consumers. All the "high resolution" stuff with higher sample rates and bit depths is just marketing bullshit, and this has been repeatedly demonstrated in trials (the well-designed ones anyway; there are plenty of terrible ones - no, comparing the 96kHz download to the 48kHz download of a song is not how you test this properly).

Bit depths above 16 are useful during production (because quantization noise accumulates and is boosted by things like dynamic range compression); in practice you want to record at 24 bits for headroom reasons, and process in 32-bit float because there's no reason not to with modern computers (and many practical advantages, e.g. ~infinite dynamic range). Sample rates above 48kHz are less so; the main reason to use them is to avoid aliasing artifacts, but it is usually much more effective to do that with well-designed DSP algorithms that include internal oversampling, as opposed to just doing everything at a higher sample rate. Unless you're doing extreme pitch shifting; then higher sample rates may make sense.

Videos everyone interested in audio production should watch:

https://xiph.org/video/vid2.shtml https://www.youtube.com/watch?v=-jCwIsT0X8M

The little tidbit at the end of the second video about how 48kHz is, in some respects, twice as good as 44.1kHz, is quite neat and not something I'd realized before.

Re:Apple Music Announces Spatial Audio and Lossless Audio by KozmoNau7 on Monday May 17, 2021 @11:14AM (#27184380)
> "This is largely because MP3 is a crappy, old format. Try high-bitrate Opus on most samples and you're a lot less likely to get above-chance results on an ABX test, pretty much ever, at high bitrates."

I'll add to this that "high bitrate" for Opus can reasonably be considered as 128kbps or above, generally 160 or 192kbps are comfortably beyond what is needed to achieve audible transparency.

For anyone who's used to MP3 and just doing everything at -V0 or 320kbps, it's extremely impressive to hear how good Opus is, and how low bit rates you can get away with. Even at 24kbps it's serviceable for music, it sounds no worse than a slightly worn cassette tape.

It's a seriously impressive codec, both for speech and musical content.

Re:Apple Music Announces Spatial Audio and Lossless Audio by 77pt77 on Monday May 17, 2021 @11:39AM (#27184698)
> it's extremely impressive to hear how good Opus is, and how low bit rates you can get away with

24kpbs is perfectly adequate for voice/podcasts/audiobooks

Re:Apple Music Announces Spatial Audio and Lossless Audio by fomine3 on Monday May 17, 2021 @09:16PM (#27190294)
I wish Apple devices support Opus.
Re:Apple Music Announces Spatial Audio and Lossless Audio by acdha on Monday May 17, 2021 @10:40AM (#27183966)
> This is largely because MP3 is a crappy, old format. Try high-bitrate Opus on most samples and you're a lot less likely to get above-chance results on an ABX test, pretty much ever, at high bitrates.

This is such a key point: MP3 has known weaknesses with certain common sound profiles (e.g. sharp transitions such as a cymbal or snare drum) which aren't really fixable. For me the threshold was AAC 256kpbs where I stopped noticing artifacting.

Re:Apple Music Announces Spatial Audio and Lossless Audio by bscphil on Monday May 17, 2021 @06:07PM (#27189007)
> This is largely because MP3 is a crappy, old format. Try high-bitrate Opus on most samples and you're a lot less likely to get above-chance results on an ABX test, pretty much ever, at high bitrates.

On the whole your comment is great, but I think this point might be revealing of either your age or the last time your looked at mp3 encoders. LAME has been great for at least a decade now. Other than (possibly) extremely rare killer samples, you're unlikely to be able to ABX a LAME encoded track at 256 Kbps. I certainly can't, and I have pretty decent gear and have been listening to (and working on) music for a very long time.

Back in the 90s, all mp3 encoders were shit. Xiph's Monty, in the post you link, mentions being able to distinguish between them using only their results as a party trick. Even in the early 2000s you needed 256-320 Kbps to have a shot at transparency. But now, most music is transparent at `lame -V2` settings, which gives approximately 192 Kbps results. I can still ABX a very small number of songs (last I tested), but even these go away by `lame -V0`, which is the highest quality VBR mode. HydrogenAudio, a trustworthy source as far as "audiophile" claims go, says that anything from `-V0 to -V3` should be transparent under most conditions. https://wiki.hydrogenaud.io/index.php/LAME

AAC and Vorbis are certainly better codecs, achieving transparency most of the time at closer to 160 Kbps. Opus is even better. I've never been able to ABX a 128 Kbps track, and music sounds great even at 96 Kbps (for stereo!). There are supposed to be killer samples for all four, forcing them to require a higher bitrate to achieve transparency, but interest in finding these seems to have dropped.

Re:Apple Music Announces Spatial Audio and Lossless Audio by marcan_42 on Monday May 17, 2021 @08:38PM (#27190055)
LAME is great, and in fact it's better than e.g. the ffmpeg AAC encoder at equal bitrates, which is telling. But the MP3 format has fundamental limitations that no encoder can fix, and Opus is unquestionably better in every way. What I'm saying is I'm pretty sure you can find killer samples for 320k LAME (under very good listening conditions), while that's a lot less likely for something like Opus.
Re:Apple Music Announces Spatial Audio and Lossless Audio by arbaal on Monday May 17, 2021 @10:47AM (#27184046)
Yeah, 96kHz/24bit is only really useful for production, since it makes it more foolproof and harder to mess up your recording.

But storing music over 48kHz and 16bit for comsumption is really just waste of storage space and pure snake oil. 16 bit give a dynamic range of 96dB and I'm not aware of any recording outside of experiments that take advantage of it. Even the most expensive speaker / headphones will distort terribly if you play them on the loudness level where this dynamic range would matter...

And most "high quality" recordings with a high frequency range (96kHz+) only really add ultrasonic sound and mostly noise artefacts that don't correlate to the music recorded (and that no speaker / headphones can even reasonably, without high distortions, reproduce, if they even pass the LPF of the reproduction chain).

So yeah, I also think that 48/16 is all we need for optimal consumption. If the format is lossless, it's also nice for archival reasons.

Re:Apple Music Announces Spatial Audio and Lossless Audio by picardythird on Monday May 17, 2021 @02:46PM (#27186719)
You may find this interesting. The author argues against 96khz+ sample rates, but pegs the optimal rate to be around ~60hkz (which of course doesn’t exist in practice).

http://www.lavryengineering.com/pdfs/lavry-white-paper-the_o...

Re:Apple Music Announces Spatial Audio and Lossless Audio by andybak on Monday May 17, 2021 @10:29AM (#27183830)
MP3 with a good compressor and reasonable bitrate has repeatedly shown to be indistinguishable from uncompressed. The reason to avoid mp3 is to be able to squeeze the bitrate and save on storage bandwidth - but that has mattered less year on year.

I'm personally baffled and irritated by this move from Apple. They'll be selling healing crystals next.

Re:Apple Music Announces Spatial Audio and Lossless Audio by marcan_42 on Monday May 17, 2021 @10:36AM (#27183913)
> MP3 with a good compressor and reasonable bitrate has repeatedly shown to be indistinguishable from uncompressed.

With most samples, yes. The issue, as I said, is that psychoacoustic codecs are basically heuristic by definition, and so you can pretty much always find counterexamples. It's possible to say 320kbps MP3 is indistinguishable from uncompressed for most samples; it is not possible to say it is indistinguishable for all samples, present and future.

It's also the case that lossy encoding is a bad idea if you're going to be further processing the audio in any way; repeated transcodes definitely start bringing out the artifacts more. So lossless music is always something worth having as an option.

Now, when you start talking about "high-resolution" 96/192k 24b stuff... yeah, that's just as good as healing crystals.

Re:Apple Music Announces Spatial Audio and Lossless Audio by andybak on Monday May 17, 2021 @10:46AM (#27184032)
> it is not possible to say it is indistinguishable for all samples, present and future.

Are there likely to be real-world cases where this happens - and the effect is detrimental enough to actually matter to anyone?

Surely we're debating "when is it good enough for anyone sane and reasonable?" not "when could a hypothetical oracle be fooled 100%"?

Re:Apple Music Announces Spatial Audio and Lossless Audio by nitrogen on Monday May 17, 2021 @05:21PM (#27188606)
I've commented in the past about a song that is annoyingly altered in 320k MP3: https://hn.algolia.com/?dateRange=all&page=0&prefix=false&qu...
Re:Apple Music Announces Spatial Audio and Lossless Audio by marcan_42 on Monday May 17, 2021 @09:34PM (#27190402)
Do you have a FLAC of that around or know where I can buy one? I'm quite curious to try it myself, and see if I can figure out what happened. I wonder if it's an encoder bug, a real format limitation, or a problem with the original song (e.g. a clipping ISP issue, which would be solved by slightly reducing the volume before encoding).
Re:Apple Music Announces Spatial Audio and Lossless Audio by andybak on Monday May 17, 2021 @06:47PM (#27189323)
That's actually quite interesting.
Re:Apple Music Announces Spatial Audio and Lossless Audio by marcan_42 on Monday May 17, 2021 @10:54AM (#27184136)
It is useful to make the distinction, because some people do want to have the highest available quality (and this is not, inherently, a bad thing) - having a hard line that separates out the minor, but nonzero effects, from the pure snake oil, is useful.

And as I said, really, the main reason to avoid lossy compression at this point is due to generational loss and post processing. Lossy compression should be considered a final processing step - what you do to store music that is then going to be delivered directly to a listener, unaltered. If you're going to do anything else, you'd do much better with a lossless version.

That is not to say, of course, that if all you have is a lossy version, it is a major problem :-)

For the record, my lossy format of choice for e.g. putting stuff on my phone is 96kbps Opus. Even that much is excellent for casual listening. But I much prefer to keep lossless FLACs as my primary archival storage - not just because that way I can take advantage of better compression formats as they come (e.g. how I moved from ~130k Vorbis to ~96k Opus), but also because compression makes a massive difference with certain kinds of processing and editing which I sometimes enjoy doing. All the psychoacoustics go out the window if you start doing things like subtracting instrumental mixes from full mixes to get vocal tracks out.

Re:Apple Music Announces Spatial Audio and Lossless Audio by eh9 on Monday May 17, 2021 @11:21AM (#27184459)
While I can understand the frustration, it’s worth noting that they’re not increasing the price of subscription and giving people additional options. To me, it’s more like trying to tell people with 4K screens to watch 8K content, but what do I know.