News for hackers. Stuff that matters.
Re:FLAC – Format overview by Cupertino95014 on Monday September 05, 2022 @05:24PM (#32729663)
My pandemic project was to flac-ify all my music, including the vinyl records. It still fits on a microSD card, so the phone now has everything.

It's funny how often people still assume "on the computer" means "MP3." I don't know why you'd put up with any loss of quality anymore, even if you personally can't hear the difference.

Re:FLAC – Format overview by wheels on Monday September 05, 2022 @05:42PM (#32729840)
I don't have a crazy large music collection, and mine is 85 GB of 192 kbps MP3s. With FLAC that'd be 250-ish GB of music. That's a significant chunk of most modern SSDs.

Why would you use 3x the storage space if you can't hear the difference for a non-trivial percentage of your available storage? Literally, by definition, according to your own terms, it serves no purpose.

I'm a musician and audio developer, and it's only really in my own music, that I've listened to over and over again while creating it, that I notice the degradation in a 192 kbps MP3 – and occasionally in the high-hats of CDs that I listened to hundreds of times in high school.

FLAC's great, and definitely serves a purpose, but I use it mainly for archives, not for casual listening.

Re:FLAC – Format overview by Cupertino95014 on Monday September 05, 2022 @05:51PM (#32729920)
Why would I use it? Because, as I said, it all fits on a microSD card (and that's a 256GB card, which is not the largest you can get). Yours would fit on the larger-sized card with plenty of space left over.

No, I did not say "it serves no purpose." Those are your words. And I didn't say I can't hear the difference, either, I said I don't care if I can't.

My purpose is "you don't throw away information."

Re:FLAC – Format overview by wheels on Monday September 05, 2022 @06:04PM (#32730041)
Sorry, I meant that not being able to discern any difference is literally the definition of useless.

And MP3s get stored on a lot of things that aren't SD cards, so that's a pretty weird metric.

But you're getting dangerously into gold-audio-cable-and-tinfoil-hat territory. Most people (including me, literally an audio expert) can't hear the difference in most cases so you're arguing for the increased space, and significant cost based solely on some notion of purity. That makes sense for archives, where they're being preserved for posterity and potential future processing, but not for casual listening.

Would you prefer that all websites served you only PNGs?

Re:FLAC – Format overview by Cupertino95014 on Monday September 05, 2022 @06:19PM (#32730181)
Gold audio cables? Now you're talking tinfoil hat territory :)

It IS "archival." Maybe when I'm dead and gone, so distant relative will be listening to this. Maybe they'll be able to hear the difference. Who knows?

I don't think the SD card is a weird metric at all. It fits in the phone, so even if, worst case, I'm traveling and rent a car (assuming it has Bluetooth), I still have all the music.

I'd gain absolutely nothing by having them as MP3s, and the price of a TB is only going to keep dropping.

Of course, I'd also gain nothing if you switched to FLACs. You perceive different tradeoffs than I do, so that's fine.

Re:FLAC – Format overview by wheels on Monday September 05, 2022 @06:31PM (#32730268)
I still listen to my dad's classic rock records from the 60s and enjoy the hell out of it. But they sound like shit. ;-) If anyone someday down the line inherits your FLAC collection, they'll be listening to it out of nostalgia, not for the pristine audio quality.

You started with "I don't know why you'd..." and the answer is "because it's a waste of money" and "because you (mostly) can't hear a difference" and "because they work in my car".

As a side note, I have a phone that does take an SD card (in part because I like having my complete music collection there), but most people don't.

Re:FLAC – Format overview by selfhoster11 on Monday September 05, 2022 @11:16PM (#32732364)
> I still listen to my dad's classic rock records from the 60s and enjoy the hell out of it. But they sound like shit. ;-)

You know why they sound like that? Because sound recording and copying technology was also shit. Garbage in, garbage out.

FLAC was made 50+ years after these records, and is basically indistinguishable from the real thing when made from something close to the original WAV masters, and played back on decent but affordable equipment. Until recently, this wasn't possible.

Not only that - with sufficient care, it will literally never degrade even by a single binary bit when it's being copied or stored, no matter how many times it's played or duplicated.

I have no problems listening to a FLAC now, or when I'm 90. I'm sure my descendants, if they care about my taste in music, wouldn't mind listening to the same files (possibly transcoded to another lossy format, or somehow improved by [REDACTED]) well into the 22nd century.

Re:FLAC – Format overview by Cupertino95014 on Monday September 05, 2022 @06:57PM (#32730471)
> If anyone someday down the line inherits your FLAC collection, they'll be listening to it out of nostalgia, not for the pristine audio quality

I beg to differ on that. The 30s jazz records that are so wonderful musically still sound like shit nowadays. That's a major deterrent to playing them.

> I have a phone that does take an SD card ... but most people don't.

I can't say about the numbers, but I didn't have much trouble finding a phone that took them in April 2021.

In general terms: over the last 50 years, it's never been a terrible move to waste CPU cycles or disk storage. Especially if it's a permanent choice.

Re:FLAC – Format overview by JohnBooty on Monday September 05, 2022 @09:02PM (#32731374)
One particular reason why you might want to preserve the lossless original is because: what if you want to re-encode it later? Including wireless transmission via Bluetooth.

I don't have great hearing, and I don't try to pretend to hear the difference between one well-enoded lossy file and the next. I can't.

However, audio that's been through multiple lossy encoding steps is generally not good.

    > Sorry, I meant that not being able to discern any difference is literally the definition of useless.
This seems rude.
Re:FLAC – Format overview by wheels on Monday September 05, 2022 @09:39PM (#32731640)
That you think you might later re-encode is absolutely an argument for lossless formats. I'm not arguing that there's no use for lossless formats. The comments I was originally replying to was questioning why they're not universal. The reason they're not universal is because you need a special reason for them to make any sense.

> This seems rude.

I meant it tautologically: literally the definition of useless is a difference which has no measurable impact.

Re:FLAC – Format overview by Cupertino95014 on Tuesday September 06, 2022 @11:26AM (#32738425)
> This seems rude

As the recipient: I've decided to cut @wheels some slack. You should, too. It's difficult to tell whether your online interlocutor is really a jerk, or just guilty of occasional jerk-seeming behavior. Who of us can say they've never done the latter?

Re:FLAC – Format overview by wheels on Monday September 05, 2022 @06:57PM (#32730467)
Just to add to the fun, here's the Xiph founder arguing for lossy data formats:

https://people.xiph.org/~xiphmont/demo/neil-young.html

The arguments for lossy codecs vs. dithering / bit reduction aren't identical, but it's a pretty good indictment of the SAVE ALL THE BITS argument. On the same domain as the parent article.

Re:FLAC – Format overview by crtasm on Monday September 05, 2022 @08:07PM (#32730967)
They're arguing against selling albums in high bitdepth + sample rate, that's not the same as arguing for lossy formats.

> Unfortunately, there is no point to distributing music in 24-bit/192kHz format. Its playback fidelity is slightly inferior to 16/44.1 or 16/48

Also see the 'Lossless formats' paragraph.

Re:FLAC – Format overview by Cupertino95014 on Monday September 05, 2022 @08:26PM (#32731097)
Amusingly enough, I did buy 3 classic albums that I didn't already own, in 24/192 format, and I even have an outboard D/A converter so I can at least tell myself it's not wasted.

But yeah, it's probably wasted.

Re:FLAC – Format overview by JohnBooty on Monday September 05, 2022 @09:03PM (#32731382)
Wow, no. They aren't the same arguments at all.

The article is about Redbook CD audio (44.1/16) vs. "HiRes" lossless audio. It's about the limits of the human ear, and the engineering tradeoffs available for supporting resolutions and depths > 44.1/16.

That's not what the FLAC vs. lossy discussion is about, at all.

Re:FLAC – Format overview by wheels on Monday September 05, 2022 @09:28PM (#32731555)
It actually is. The major "hack" in lossy formats is psychoacoustics. It's literally about removing the things you don't hear. At lower bitrates, it's about removing the things you hear less.

The argument Montey is making for 44.1/16 vs. 192/24 is partly about the hardware and distortion of higher formats, but he spends a lot more time in there talking about what we don't hear.

The real point is: what we hear is the important quantifier for audio formats. Arguments from data purity are almost entirely the same quasi-religious stuff that the hi-fi world has been producing since at least the 70s.

(And again, it's weird: there's nothing similar in images: lossless photos just don't make sense for general consumption; they're only useful for archival and post-processing purposes. But there are immeasurably less imagephiles than audiophiles. My guess is that it's because there was a time when being an audiophile was a class signifier.)

Even the original thread author was mostly making an argument from purity rather than from audio quality. Audio quality is the only thing that matters.

FLAC is great for some stuff (again, where you may need to reencode, where you're creating archives, etc.), but for casual listening, it's entirely pointless. For the same reason Montey spends most of that article on: because you can't hear a difference.

Montey is the creator of Vorbis. He's spent a lot of time thinking about what people do and don't hear. The reasons people don't hear differences in 192 kHz and 44.1 kHz are different than the reasons people don't hear the difference between a 256 kbit MP3 and a FLAC (at 256 kbps, virtually noone can hear a difference), but it's still an appeal to ears being the important instruments in measuring audio quality, not bits, or gold plated cables, or other esoteric things that seem to beleaguer impassioned audio hobbyists.

Re:FLAC – Format overview by Cupertino95014 on Monday September 05, 2022 @07:53PM (#32730872)
Thanks, glanced at it. tl;dr

I know that Neil Young's "solution" went nowhere. I have all my music now, and I'm certainly not going to convert it all just to save some GBs. But you've certainly eliminated any temptation on my part to evangelize. Happy listening.

Re:FLAC – Format overview by aqwsde on Monday September 05, 2022 @06:12PM (#32730116)
For god's sake, there is opus. I just don't understand, why people stick with their 90s codecs.
Re:FLAC – Format overview by wheels on Monday September 05, 2022 @06:20PM (#32730184)
Do you mean Ogg Vorbis? Opus is a codec for speech.

I hate pulling rank so fiercely, but I literally wrote the second (i.e. first non-reference) implementation of the Ogg container format (which Opus, Vorbis and sometimes FLAC use). I know these codecs.

Ogg Vorbis and AAC hit similar levels of quality as a 192 kbps MP3 around 160 kbps. (That actually depends a fair amount on the MP3 encoder. The LAME VBR is particularly good.)

But I have an 11 year old receiver and a 12 year old car that can't play them. Hell, even iTunes can't without third-party codec plugins. MP3s are about as universal as it gets. Being able to play my files everywhere is pretty high up on my list of concerns.

Re:FLAC – Format overview by cageface on Monday September 05, 2022 @07:13PM (#32730593)
Opus is a codec for speech.

Opus also is very good on music, better than Ogg. At higher bitrates (~160) any of the lossy codecs will do fine but Opus sounds good under 100.

https://wiki.hydrogenaud.io/index.php?title=Opus#Indicative_...

Re:FLAC – Format overview by joecool1029 on Monday September 05, 2022 @07:09PM (#32730563)
>Opus is a codec for speech.

As I understood things Xiph intended for it to replace both speex (for low-bandwidth low-latency voice) and vorbis (for medium bitrate lossy audio). Is this understanding wrong?

>Ogg Vorbis and AAC hit similar levels of quality as a 192 kbps MP3 around 160 kbps. (That actually depends a fair amount on the MP3 encoder. The LAME VBR is particularly good.)

While this is true there's a bit of nuance to add. Some people really don't like the sound of vorbis's artifacts on difficult to compress audio. Maybe it's growing up with fried mp3 recordings being common, but mp3's artifacts are less jarring.

Re:FLAC – Format overview by camgunz on Tuesday September 06, 2022 @04:49AM (#32734580)
Opus is meant to obsolete every other lossy audio compression [0]. You make a good point about hardware support, but technically it's the winner for generic use, not just speech.

[0]: https://wiki.xiph.org/OpusFAQ#Does_Opus_make_all_those_other...

Re:FLAC – Format overview by aqwsde on Tuesday September 06, 2022 @07:51AM (#32735833)
> MP3s are about as universal as it gets.

The same holds true for cassette tape decks in old cars.

> even iTunes [...]

That's Apple's policy. Personally I wouldn't use the word "even" here. It's like saying "Not even the butcher sells vegetables!".

Apart the Apple ecosystem, opus is as established as it gets. Android supports it natively since 2013(?) (Android 5.0).

So, yes, if you want TeX-like backward-compatibility, it might be a good choice.

For all others: knock knock The new millennium arrived!

P.S. I do think that I don't have the worst hearing and kind of decent listening equipment and I can nearly half the file size using opus at a comparable quality.

Re:FLAC – Format overview by Cupertino95014 on Monday September 05, 2022 @06:32PM (#32730279)
MP3 is indeed universal, and iTunes doesn't support FLAC. However, on my Mac there are any number of third party players that do (e.g. I have Elmedia Player at the moment), and on the Android almost every music player app supports FLAC.

I don't know about an iPhone. I assume you can find apps that support it.

Re:FLAC – Format overview by joecool1029 on Monday September 05, 2022 @07:12PM (#32730582)
I actually went digging for a bit on information about audio codecs being decoded in Qualcomm's hexagon DSP. I'm no expert but it seems like recent generations of the platform (anything post-2013 or so) don't bother with hardware decoding for audio codecs (except for in voice calling with AMR and EVS). It appears to be all software codecs for many generations now. Makes sense as even the efficiency cores on modern mobile devices are way overkill for audio.
Re:FLAC – Format overview by PapuaNewGuinea on Monday September 05, 2022 @06:36PM (#32730318)
Lossy codecs suck at gapless playback. Some have support via vendor-specific extensions, but it’s hit or miss whether a particular player will support it. With FLAC you can always be 100% sure that your album is gapless.
Re:FLAC – Format overview by edflsafoiewq on Monday September 05, 2022 @07:04PM (#32730528)
That's just MP3, Vorbis and Opus don't have that problem.
Re:FLAC – Format overview by aaaaaaaaaaab on Wednesday September 07, 2022 @07:32AM (#32749228)
Nope. Opus and Vorbis are better, but they still don't support 100% gapless playback.

E.g. create a full-scale sine wave, split it into two files, then convert them to "gapless" Opus. Now open the files in Audacity and you'll see that there's a small amount of ringing at the boundary, so it is not truly gapless.

If you try the same with AAC using Apple's gapless metadata (i.e. iTunSMPB) you'll find that the boundary is perfectly continuous.

Re:FLAC – Format overview by edflsafoiewq on Wednesday September 07, 2022 @01:16PM (#32753386)
AFAIK iTunSMPB just tells you where playback should start/end, which is also all the Ogg metadata does for you. MP3s can have iTunSMPB too, it's just a matter of if a player supports it. Is there any specific feature of AAC that makes gapless playback possible?
Re:FLAC – Format overview by aaaaaaaaaaab on Wednesday September 07, 2022 @02:06PM (#32753996)
Nope, there’s nothing special to gapless playback. But as it stands, libopus cannot produce truly gapless files right now. Is it a bug in libopus? Most likely.
Re:FLAC – Format overview by blibble on Monday September 05, 2022 @05:49PM (#32729902)
> With FLAC that'd be 250-ish GB of music.

at current prices that's about $25 of SSD

Re:FLAC – Format overview by wheels on Monday September 05, 2022 @06:10PM (#32730097)
It's about $50 for a Macbook Pro. And I have my music on 4 devices. Sure, I could throw $100-200 at music storage that I can't hear any difference in, but why the fuck would I? Again, this is golden-speaker-cables stuff.
Re:FLAC – Format overview by joecool1029 on Monday September 05, 2022 @07:15PM (#32730616)
Why carry it around on portable device? I've been streaming FLAC from a NAS for close to 10 years originally over sshfs and then later via plex. In 3G era I just used Google Music which transcoded my FLAC collection to 320kbps mp3 and I streamed it this way on the go. This was feasible around as early as 2009?
Re:FLAC – Format overview by wheels on Tuesday September 06, 2022 @07:38AM (#32735698)
I only have 3 GB of data in my data plan, which is always more than enough for me, unless I'm working over my cell connection. I could get more data, but doing that just to stream music (when I already have a working solution for such) seems silly. I think in the US people often have much more expensive and large data plans than elsewhere. (My entire cell phone bill is €12/month, including 3 GB data, and unlimited calls and texts.)

I also very regularly go places with mediocre cell service: country side, airplanes, boats, and festivals.

Re:FLAC – Format overview by Cupertino95014 on Monday September 05, 2022 @07:38PM (#32730778)
> Why carry it around on portable device?

Well, because you're carrying the portable device around anyway. And it doesn't require a network connection, so it works even when you have no cell coverage.

I don't quite understand how your "streaming it this way on the go" worked?

Re:FLAC – Format overview by joecool1029 on Tuesday September 06, 2022 @02:01AM (#32733456)
It's pretty rare I go anywhere that lacks good enough cell service to stream FLAC with. I don't even live in a city, but I get it if you're really remote or can't afford cell service.
Re:FLAC – Format overview by Cupertino95014 on Tuesday September 06, 2022 @11:29AM (#32738480)
It's rare for me, too, but just last week I was up near Volcano, CA, and there's no Verizon there.
Re:FLAC – Format overview by doubleunplussed on Monday September 05, 2022 @06:07PM (#32730071)
One cannot simply add more SSDs to one's laptop, regardless of price.
Re:FLAC – Format overview by Cupertino95014 on Monday September 05, 2022 @06:40PM (#32730343)
But one can buy a multi-TB drive that plugs into the laptop's USB 3.0 port. The "multi" part of it keeps getting larger, for the same price.

And you can keep an extra one at another site in case your house burns down.

Re:FLAC – Format overview by ThePadawan on Tuesday September 06, 2022 @07:11AM (#32735469)
...or $150 if you want to store it on your phone.
Re:FLAC – Format overview by BuildTheRobots on Tuesday September 06, 2022 @06:52AM (#32735337)
Depending on context, you can tell the difference; especially on larger sound systems. 192kbps MP3s played through a 2 kilowatt sound system in a club don't just sound bad, but they feel bad as well.

I've got a couple of DJ friends that have taken to ripping their collections (CDs and vinyl) to WAV files as most DJ software didn't support FLAC playback at the time.

Re:FLAC – Format overview by wheels on Tuesday September 06, 2022 @07:32AM (#32735635)
That's questionable. Again, I don't believe anyone who claims things about sound unless they're doing a blind test with well-encoded files. You need to make a stronger argument than "they feel bad". Why? What frequencies are not being reproduced accurately and why do you think that makes them sound bad?

A "2 kW" sound system doesn't have any special properties by nature of its wattage, but a club does have a sound system which can reproduce frequencies that are below that what a typical home (or studio) system can. MP3s are usually encoded with a high-pass filter (usually around 20 Hz), and some club systems can get down close to that range (more often 30 Hz), but it's very questionable that they're hitting border.

It is true though that on those types of systems, you're more likely to expose the effects of doing things like double lossy encoding, use of bad encoders, etc.

Re:FLAC – Format overview by dTal on Tuesday September 06, 2022 @09:28AM (#32736815)
The further away from the "ideal" reference listening case of high fidelity headphones in a quiet room, the less likely that the assumptions behind the psycho-acoustic model used in the lossy codec are valid. Frequencies can be missing because of shitty speakers, room cancellation, or deliberate post-processing, and expose sounds that the codec thought would be masked. On my surround sound, the difference between a 320kbps mp3 and a FLAC is not only audible but obvious when played in Pro Logic 2 mode, which exploits phase information to place different sounds in different speakers.
Re:FLAC – Format overview by thirdsun on Tuesday September 06, 2022 @02:04AM (#32733467)
So you manage a lossless and a lossy library? That sounds like a lot of work.

My collection is lossless and nearing 2 TB in size. Too large for mobile usage on iOS, where I don't really need that kind of fidelity anyway. However I still don't want to manage a second lossy library and keep them both in sync. Luckily Apple's Music app can be configured to transcode your lossless audio to a lossy format on the fly whenever you sync your collection to your iPhone. That way I can have my whole collection in my pocket without having to manage it.

Re:FLAC – Format overview by moffkalast on Monday September 05, 2022 @05:43PM (#32729844)
Because my music collection would otherwise take up more space than the 128 GB of internal storage my phone has? FLACs are nice, but they're also a few MB per track.

Maybe in another decade.

Re:FLAC – Format overview by mkl on Monday September 05, 2022 @06:01PM (#32730021)
> FLACs are nice, but they're also a few MB per track.

So are MP3s, unless you compress them to crap. FLACs are more like low 10s of MB, about 2.5× high quality MP3s in my experience.

Re:FLAC – Format overview by DiogenesKynikos on Monday September 05, 2022 @06:14PM (#32730131)
For most music, it's already very difficult to notice any degradation at 128 kbps with modern codecs/encoders.

You have to know what to listen for, and even if you do, why should you care? It's a small price to pay for being able to store several times as much music on your phone, or for saving on bandwidth while streaming.

Re:FLAC – Format overview by mkl on Monday September 05, 2022 @06:17PM (#32730164)
Sure, but even 128kbps is about 1MB/minute, so still "a few MB per track".
Re:FLAC – Format overview by brewdad on Tuesday September 06, 2022 @12:35AM (#32732881)
I just checked a few of my latest CD rips. The FLAC rip is 9-10x as large as the Opus 128bit files. One EP was 338MB as FLAC and 33.1MB as Opus.

On the go, the listening environment is far from perfect, so Opus is fine. I still want the FLAC files on my NAS as an archive or for listening in a better environment in my home.

Re:FLAC – Format overview by Cupertino95014 on Monday September 05, 2022 @05:52PM (#32729925)
Check out microSD card prices.
Re:FLAC – Format overview by moffkalast on Tuesday September 06, 2022 @05:45AM (#32734907)
Check out all of those phones with SD card slots these days. It's going the way of the headphone jack.
Re:FLAC – Format overview by Cupertino95014 on Tuesday September 06, 2022 @11:36AM (#32738576)
I got one just 17 months ago (it also has a headphone jack).

I can't predict what manufacturers will do, of course, but with headphones, you have Bluetooth. What's the corresponding substitute for the SD slot?

Which, btw, is another unconventional observation of mine: you no longer need the newest, fanciest phone from Samsung, Apple, or Google. At one time you did. The cheaper ones are more than adequate nowadays and most likely you'll be replacing it every couple years anyway. YMMV.

Re:FLAC – Format overview by bobsmooth on Tuesday September 06, 2022 @12:05AM (#32732698)
320kbps MP3 is indistinguishable and much smaller.
Re:FLAC – Format overview by npteljes on Tuesday September 06, 2022 @03:58AM (#32734265)
~128kbps VBR OPUS is also smaller, and similarly indistinguishable.