11 ms·
How cheap does storage have to get before people stop bothering to use FLAC? By my calculations, $65 will buy you a 4TB hard drive which can hold over 6,000 ho
by corysama 5y ago
How cheap does storage have to get before people stop bothering to use FLAC?
By my calculations, $65 will buy you a 4TB hard drive which can hold over 6,000 hours of uncompressed CD quality PCM. With FLAC you might squeeze 9,000-12,000 hours in. But, is that really worth the bother?
I know it’s not obviously relevant to consumers, but an uncompressed PCM .wav file is a format that any high school coder can figure out completely. FLAC on the other hand has had decades of work put into it. It is an engineering marvel. I just wish people would think simpler than “engineering marvel” when it comes to archival formats when the simplest conceivable format works just about as well… :$
Edit: Many people are bringing up MP3/Ogg/Opus, compressing podcasts, how silly it would be to toss out all forms of audio compression.
To be clear, MP3/Ogg/Opus make perfect sense to me. They are complicated. But, in return you get 8-12x the content at great (not perfect) quality. FLAC on the other hand
Is at least as complicated, has a lot less widespread support and has an ROI of 1.5-2x…
As a consumer, I can see that 2x in return for a modest amount of hassle can be an OK deal in constrained situations -like price-gouged mobile storage. As an engineer who has maintained software systems over many years, the complexity of FLAC compared to trivial PCM as an archive format makes me a sad, cranky, old greybeard.
- xorcist 5y agoThere is no inherent advantage to bigger files. You could losslessly upsample those wav files of yours to some insane precision if all you wanted was bigger files. If the argument instead is that raw audio is a simpler format, the answer is that everybody wants some sort of container that carry metadata.
- poink 5y agoPeople will stop bothering with FLAC the instant they care about the specifics of the file format more than saving even the most trivial amount of space on their devices. Never, in other words.
- raverbashing 5y ago"complexity of FLAC"? As complex as gzipping a file Sounds like the people who are surprised at their end of month AWS bill because they couldn't bother to optimize anything.
- corysama 5y agoOptimization is about trade offs. My career has been data processing pipelines for commercial game engines. I’m quite familiar with the trade offs of compressing all kinds of formats, including audio. FLAC is at least as complex as OGG+gzip. That’s reasonable to deal with because there are libraries with many thousands of hours of effort put into them freely available. But, trivial is trivial. Anyone who has had to deal with format support rot will sing praises of trivial. My argument is that it’s a disappointing archive format given that any teenage coder can come within 30-50% of it in an afternoon by doing the most trivial thing possible. Expectedly, few people here are arguing with me about archives. Instead we’re talking about streaming podcasts over 4G. Even for for high-end music, saying your personal bandwidth ethics/budget necessitates FLAC but not Opus seems more than a bit of a stretch, in my opinion.
- raverbashing 5y agoI see If your point is that most users of FLAC would be happier with AAC/Opus etc I agree (and with a more significant savings) And yeah if you're looking at longer archival times, PCM probably makes more sense. But I think FLAC suffers way less rot than, for example WMA
- astrange 5y agoFLAC bitrots less than WAV, because WAV doesn't have checksums.
- rakoo 5y agoIf you're concerned about bitrot (and I feel everyone should be), you're going to checksum at the filesystem level, so it doesn't make a difference
- astrange 5y agoThe more the better. Sometimes there's a bit flip on the way to the streaming server… https://news.ycombinator.com/item?id=25335936 https://news.ycombinator.com/item?id=25335936
- ksec 5y ago> It is an engineering marvel There are lots lossless audio compression. Each with different set of priorities and trade offs. From Compression Ratio, Decoding and Encoding Speed etc. I agree FLAC is a very good codec, especially for consumers. But I am not entirely sure it is a "marvel". Arguably WavePack does somethings better, especially when doing it patent free. ( Sort of irrelevant now at this point in time ) The world has moved to streaming, and it is only a matter of time when lossless becomes a standard. Like both Apple and Spotify are planning. 5G will improves capacity, so by the end of 5G migration sometimes in 2030? This is sort of off topic but HN on one hand dont understand 5G and suggest not upgrading to 5G but on the other hand wants to have more Data for the same price and start doing lossless streaming. Well you cant have both. While I wish we could research and push the lossless ratio down to 33%, or push 128kbps lossy audio codec to be truly transparent. But much like modern audio codec all research are now going to low latency and real time. Which seems to be a much much harder topic.
- kevin_thibedeau 5y agoGotta give the audiophools lossless so they can listen over compressed Bluetooth audio.
- ksec 5y agoLOL I didn't write that part since HN has a long and what I think is pointless argument last time we discussed bluetooth and audio.
- denton-scratch 5y agoThe reason this "audiophool" uses FLAC is because I want my music collection to be stored at the same quality it was when I paid for it; and FLAC is more conservative with storage than PCM. I don't stream it; and I don't use it on a phone. If I ever need to do those things, I can convert from FLAC to lossy, knowing that I'm starting with something that is as accurate I can get. That is, I'm implicitly using FLAC as an archive format. Gzipped PCM would work, except that I can't play that directly in a music player. I don't care about a bit-flip rendering a FLAC unplayable; my collection is backed-up. Basically, I'm not going to pay for a CD full of bits, and then immediately throw away a lot of those bits.
- bayindirh 5y ago> How cheap does storage have to get before people stop bothering to use FLAC? Having cheap storage is not a valid reason to not to use that space efficiently. With today's, even last decade's processors, encoding FLAC at ripping speed is not even a CPU saturating task, and decoding is merely a blip on processor's queue. If I can store the same bitstream on a smaller space, why shouldn't I? If we're not compressing anything, why not forego lossless compression completely? Let's not GZ/XZ our log files. These 20MB files will become 30-40GB, but heck, a 4TB drive is just $65. Similarly, let's not compress gigabytes, even terabytes of genomic data, scientific outputs and other stuff. They're just ASCII or Unicode strings, a high-schooler can figure these out. Why invest time in lossless compression tools like XZ and ZStd? They just use CPU cycles needlessly.
- corysama 5y agoI’m not clear how you are jumping from “30% of a few hundred gigs is a bad complexity trade off” to “100000% of terabytes is worthless” :p Thanks for at least arguing against the use case I argued for. Even if you were a bit hyperbolic. I get that I’m being a cranky old engineer. As someone who has spent a couple decades optimizing and maintaining bespoke high performance file formats, the particular use case of FLAC as an archive format still seems like a bad complexity vs benefit trade. I’d rather have something that’s trivial for any software to work with everywhere forever. I know FLAC feels like forever. But, so did a lot of dead formats I used to work with.
- astrange 5y agoFLAC isn't an unmaintainable "engineering marvel", the algorithm is pretty simple and all the data is checksummed. That's enough to make it a better archival format than WAV.
- mnw21cam 5y agoChecksumming isn't enough to make something a good archival format. You need to go beyond being able to detect data corruption to being able to correct or cope with data corruption. For a FLAC file, if you flip a bit in the file, then the checksum will detect that the file has been corrupted, but that chunk of the file will be unrecoverable. If you flip a bit in PCM data, likely you won't even hear the difference. If you want to know whether corruption has occurred, you can always run md5sum on it. For FLAC, if you want to be able to cope with data corruption, you'll need to create something like par2 recovery data.
- citrin_ru 5y agoMost desktops nowadays use SSD and the price of 4Gb SSD converted to dollars is about $500 where I live while salaries are significantly lower than in the US. Why not to use FLAC given that decoding doesn't require too much processing power?
- black_puppydog 5y agoAs a consumer you might really not bother, that's your choice of course. As a developer I'm working with large amounts of data totalling some dozens of TB compressed. I don't have the option of lossy-compressing it since bit-by-bit reproduction is part of the constraints. I don't want to store it uncompressed since that also increases I/O times. CPU is simply not the bottleneck anywhere along this line. And flac works great. :)
- topranks 5y agoWAV can’t deal with metadata / ID3s, cover art etc. Meanwhile everything bar Apple now supports FLAC natively. No way in hell we ever switch to WAV.
- reassembled 5y agoThe problem could be solved by placing PCM audio into some other container format. WAV proliferates for historical reasons but perhaps we need a slightly more modern audio container format that will accept any kind of bit stream + metadata, etc. I suppose MKV could fit the bill today. Are there any other good candidates?
- dangravell 5y agoIt can - it has supported RIFF INFO from the start, and ID3 support exists. If software writers choose to not extract metadata from WAVs that's up to them... but I guess it amounts to the same thing if you only want to use software that doesn't read tags in WAVs.
- ZekeSulastin 5y agoIn a pinch you can play FLACs using the built-in Files app, actually. Still better off using a different playback app for any long listening, though.
- kstenerud 5y agoThere are a number of reasons: * Most FLAC tools support metadata. For the more "bare" formats that's not the case. When converting to a lossy format, I want my metadata intact. * FLAC can be played directly on most media players (with metadata). * The format may be complicated, but the source is open and actively maintained, and there's support everywhere. Using FLAC in your software project is a breeze. * 2x compression is nothing to sneeze at. My archival collection takes up 1TB on my mirrored, backed up NAS. I like that better than it taking up 2TB (which would be 1/6 of my space). Someday when I look at 1TB the way I look at 100GB today, this won't be a concern anymore.
- corysama 5y ago> Someday when I look at 1TB the way I look at 100GB today, this won't be a concern anymore. And, there it is. Thank you.
- kstenerud 5y agoYou missed the other points. This one point is the weakest of them all. FLAC is simply better supported for the things people care about. JPEG2000, for example, never caught on because nobody cares enough about the storage savings, and there were no other compelling features that anyone cared about. But for audio, we want our metadata. Had WAV been built with strong metadata support, FLAC wouldn't have gotten very far. But that ship has sailed.
- mindslight 5y ago> Someday when I look at 1TB the way I look at 100GB today, this won't be a concern anymore. I'm halfway there, 1TB collection on a 30TB array. When I repurpose a previously used drive, I've got a bad habit of making a multi-TB image in case I forgot to copy anything off, and then forgetting about it. (I'm in the middle of writing some tools to sort through those.) Still, what would be the advantage to moving to WAV? There is zero experience-overhead to FLAC. This isn't like some proprietary crapware format that becomes hit or miss due to patents or poor licensing. It's a Free format so common players all seamlessly support it. We're talking like 300kB of binary code, in a world where stuffing 300MB CRUD apps at users is normal. If I want to transcode to MP3 for some bespoke device, then the FLAC compression makes that process quicker via saved IO bandwidth. There's literally no end-user complexity that I would save by moving to WAV. And if I wanted to develop software to read an audio file, then I'd import the FLAC library just as how one would generally import a WAV library. OP might as well advocate for storing audio as textual numbers line by line, so it could be easily processed with awk.
- mixedbit 5y agoIPhone 13 Pro starts from 128GB and you need to pay extra 500$ to get 1TB. For portable players 2x reduction in storage space is still significant.
- gugagore 5y agoI'd argue (I think many would) that FLAC is substantially less complicated than MP3. Perceptual compression, the frequency domain, and things like the FFT are more complicated in implementation and in the math than Run-Length, residual / delta encoding, linear predictive coding. And perceptual compression schemes use both "classes" of compression tools anyway (broadly speaking).
- Aachen 5y agoRight about the time where computers are finally fast enough where we can just have all software run with Electron without caring about the performance hit. Just because we can doesn't mean we should waste ssd/cpu when there are absolutely no benefits, aside perhaps from saving a few kilobytes of extra decoder code to save multiple megabytes per song.
- tasha0663 5y ago$RESOURCE might be cheap and plentiful today. In the greybeard world you would have been right because everything was trending towards more-for-less. In 20XX you could wake up tomorrow and find out that some bullshit caused a global supply chain issue at the same time that a Proof of $RESOURCE blockchain is causing a scramble for it.
- mcronce 5y agoFor me, it's mostly about being able to stream it over a poor quality 4G connection in a speeding car/train. I could care less about the storage; I've got over half of a 120TB array unused, but halving the bandwidth requirement for crappy client connections without having to deal with transcoding is nice. The storage savings are relevant when I consider cached audio on my phone, but... I'm not really sure how relevant.
- LeoPanthera 5y ago> How cheap does storage have to get before people stop bothering to use FLAC? It's not about the storage, it's about the transfer. Streaming services are only just beginning to support lossless at all. Improved lossy codecs like Opus provide indistinguishable-from-lossless audio at 128Kb/s, so the formula is store the audio losslessly, then transcode it to lossy (on the fly, even) for streaming.
- dale_glass 5y agoI found an use for lossless streaming: A weakness in the open source landscape I found is that there's a lack of fast codecs. If you want to encode in real time (eg, streaming speech or an artist playing in the moment), and encode per client for positional audio in a 3D world, then Opus becomes a bottleneck. FLAC according to some preliminary tests helps by being faster than Opus to encode.
- magicalhippo 5y agoWhat are the use-cases for pre-baked positional audio? Ie where the client can't do the positional audio processing itself.
- dale_glass 5y agoNot pre-baked. I work on https://vircadia.com/ https://vircadia.com/ -- it has to give every user their own audio mix to account for their 3D position. This means codec costs add up fast. You can't just encode once and stream the same thing to a dozen people.
- magicalhippo 5y agoOh right, I read that wrong. Thought you did per-voice 3D positional encoding on server but mixing on client. Interesting use-case, got my brain racing off to find silly solutions.
- boolemancer 5y ago
- porker 5y agoPortable devices have to come with more internal storage before file size doesn't matter. I'm still converting to MP3 before adding to my phone for that reason (used to be ogg which I remain convinced sounded better, but player compatibility wasn't there) because 128GB of expanded internal storage isn't much.
- lazyjeff 5y agoI'm surprised to hear this perspective. I feel like FLAC is to PCM as PNG is to BMP. Why not just work with FLAC directly? Half the file size in exchange for negligible processing time. As a practical use case, FLAC is the only way I can fit my song library on my phone. Flagship phones today come with 128GB of storage, about 90GB is actually usable. Every additional 128GB is $100 more.
- masklinn 5y agoFLAC also has no metadata interop issues since the flac container always specified vorbis comments.
- account42 5y ago> Every additional 128GB is $100 more. Your phone doesn't support some kind of SD cards?
- ChuckNorris89 5y ago>Flagship phones today come with 128GB of storage IMO, one of the biggest scams in the mobile space currently. My old OnePlus 3T flagship from 2016 came with 128GB of storage and it "only" cost €480. Also, best phone I ever owned by far BTW. Today, nearly 6 years later, Apple and Samsung flagships (I'm staying away from OnePlus nowadays) are charging huge markups for more than the base 128GB of storage, on phones that already cost €1000+, despite flash storage getting significantly cheaper since 2016. This is beyond insulting, especially since modern flagships also lack microSD expansion.
- Cthulhu_ 5y agoThe market decides; people pay those rates even though there's alternatives available.
- ChuckNorris89 5y agoThere is not much choice when the giants in the space with the majority market share are all pulling the exact shame shenanigans.
- lultimouomo 5y agoIsn't the 4TB hard drive an engineering marvel itself? Worse, it's an engineering marvel that costs each time its produced, while FLAC is mostly done.
- hulitu 5y agoThere is also other storage like memory cards for cars or portable players.
- corysama 5y ago…which is more expensive than $65 for 4TB. Thus, the question is framed around price.
- dwoxctbvgq 5y agoBesides the other good points people have made, I would just like to add that this is the kind of mentality that I really dislike to see. Just because resources are cheap, do we really need to waste it all? Computers and smartphones are faster than ever, yet there are always websites that I find completely unusable on my phone. And some of these websites I actually need to use because they are required by the government... Looking at you, MitID! I'm inclined to call this The Javascript Mentality, though I don't mean to insult JS users. JS definitely has its place, it's just very much abused, unfortunately.
- worik 5y agoI think of it as the Python Mentality
- dwoxctbvgq 5y agoRight, that's not too far either. I guess the difference is that the abuse of Python doesn't hurt me in my daily life in an obvious way, unlike Javascript.
- theplumber 5y agoOk so what exactly is better than FLAC? I'm not aware of any "usable" lossless encoding algo. Truth is "nobody" bothers to develop open source lossless audio codecs. Of course you can always buy Dolby because there seems to be the "efficiencies" that you are looking for along with locked-in hardware and locked-in software.
- dwoxctbvgq 5y agoBy "resources" in this case I was referring to storage space. I could have written my comment more clearly, sorry. I do really like FLAC for saving space, and I hate websites that have 20+ seconds of interaction latency. Edit: Of course websites being slow has nothing to do with storage space, but it has everything to do with wasting resources – whether that's storage space or CPU cycles.
- thealig 5y ago
- Dylan16807 5y agoI need an SD card on my phone just to happily fit my highly compressed podcasts, so I don't think we're anywhere near the point of skipping compression. Even somewhere you don't want to use FLAC because you're worried about the complexity, you should at least throw gzip at your files. PCM is a waste in any kind of computer scenario.
- grumpyprole 5y agoWhat would make life simpler is the industry standardising on at least one format. For example Apple doesn't actually support FLAC, despite it being the most popular lossless format.
- LeoPanthera 5y agoCore Audio added support for FLAC in High Sierra, macOS 10.13, in 2017. Apple has supported "ALAC" for longer, which unlike FLAC uses only integer math and is therefore less power hungry on mobile devices. You can transcode losslessly between FLAC and ALAC.
- grumpyprole 5y agoThe FLAC decoder has been almost completely integer for a long time (and may now be completely so). Apple Music and iOS still do not play FLAC, which is one significant reason why I won't buy an iPhone. Transcoding my entire music library certainly isn't "just works".
- autoexec 5y ago> Apple Music and iOS still do not play FLAC, which is one significant reason why I won't buy an iPhone. You can't just install VLC on an iphone?
- LeoPanthera 5y agoYou can.
- astrange 5y agoiOS supports FLAC, you can play it in Safari and the Files app. It's true you can't add it to the Music app, but you can use another app. Also, the $9 Apple headphone dongle is objectively superior to most audiophile DACs, which isn't surprising since it has a larger R&D budget than that entire industry. (Same goes for Google's IIRC.)
- at_a_remove 5y agoMetadata. FLAC allows for metadata. Those .wav files? Nope.
- corysama 5y ago.wav files are really just https://en.m.wikipedia.org/wiki/Resource_Interchange_File_Format https://en.m.wikipedia.org/wiki/Resource_Interchange_File_Fo... It’s trivial to put a metadata chunk into that. And, trivial to ignore or blindly carry it along if your software doesn’t specifically support it.
- chungy 5y agoIt's that last statement that makes it completely impractical. There isn't even a de facto standard for metadata with wav files. Most players/software don't even bother at all. FLAC pretty firmly settled on the ogginfo format and literally everything that supports FLACs use that same metadata format.
- kevin_thibedeau 5y agoGood luck getting VLC to read an embedded cue sheet for track locations.
- joveian 5y agoThere does seem to be at least some de facto standard, at least checking my collection for stuff I haven't converted to flac yet I found the Wingspan soundtrack in wav format with, according to kid3, an ID3v2.3.0 tag (including cover art) and RIFF info. It works with mpv and VLC, I didn't try anything else (well, I tried a couple of command line id3 utilities that didn't show the tags). I've seen tagged wav files a few other places as well so it doesn't seem super uncommon. However, checking quick it doesn't seem like flac notices the tags when converting.
- dangravell 5y agoArguably there doesn't need to be a de facto standard, because there's a de jure one: RIFF INFO. But anyway, if you're going to do WAV tagging (and remember software support remains poor) most people are using ID3.