FLAC – Format overview
xiph.org
xiph.org
I have often wondered why other media formats don't do a similar thing, especially since changing a media file's tags (which can change the checksum of a file) or name (which makes external verification from txt file difficult) is quite common. I even wrote a utility[0] that uses ffmpeg to hash all ffmpeg compatible bitstreams, and store their hashes in a xattr (yes, with lots of other options to test and compare, etc.), but all media formats should just be as clever (and care as much) to do this natively, like FLAC.
I mean -- why not?
Background: Lenovo Thinkpad T520 laptop, random crashes and data corruption.
Diagnosis: Eventually let memtestx86+ run a bunch of times for like a week and it wasn't showing any errors. Finally about to give up I pressed some key on the keyboard and it blew errors immediately all over the screen. This suggested EC or maybe some BIOS-controlled keyboard driver was writing to memory it shouldn't have been.
Fix: I am a Linux user, the kernel has an option to reserve low memory for poorly behaving BIOS that likes to write where it shouldn't. CONFIG_X86_RESERVE_LOW should be set to at least 64kb and increased up to 640kb if this issues continue to happen. There are some other options to scan for this misbehavior but I honestly don't know how Linux currently handles it: https://lkml.org/lkml/2013/11/11/683
Apparently Windows now does it too because too many BIOSes are buggy: https://bugzilla.kernel.org/show_bug.cgi?id=16661#c2
But I have one nitpick with FLAC in this regard: they chose MD5 as the checksum instead of something sensible like CRC32/CRC64... It makes no sense, because we're not doing cryptography here - we're doing an integrity check. Moreover it makes a parallelized FLAC encoder somewhat problematic to implement, as there's always going to be a serial bottleneck at the end for computing the MD5 hash. CRC on the other hand could easily be parallelized. But I'm afraid we'll have to live with this shortcoming forever now ¯\_(ツ)_/¯
> But I'm afraid we'll have to live with this shortcoming forever now ¯\_(ツ)_/¯
I don't believe there is a fundamental reason why a later version of FLAC couldn't/wouldn't allow different algos as I think the raw decoded bitstream is checksum-ed and is just stored as a FLAC tag[1]. So they could just version that tag.
[0]: http://underpop.online.fr/f/ffmpeg/help/hash.htm.gz [1]: Language corrected. See comment.
Sure, it's just metadata. It's just about backwards compatibility.
By the way, the checksum is calculated on the raw data fed into the encoder. It doesn't make sense to decode the data you've just encoded.
Unless you're also writing to disk and reading it back before decoding - I'm not sure which tool you're referring to.
https://interviewfor.red has lots of info about that exact thing, because in some uh… very peculiar communities, sharing a lossy file passed as a lossless file is a serious offense.
You're basically looking for two things: first, an abrupt stop to frequencies above a certain point -- compression uses applies a low-pass filter to eliminate them.
Second, a bunch of rectangular-ish boxes where signal is missing. The spectrogram will look like swiss cheese in a way -- this is where the compression algorithm decides audio information can be deleted because it's "masked" by e.g. louder surrounding sounds.
(Generally speaking, the more aggressive the compression, the lower the frequency ceiling, and the more/bigger swiss cheese holes.)
On the other hand, if you run e.g. AAC compression at a very high bitrate and explicitly force no lowpass filter at all (which virtually nobody does in practice, but you can do from a command-line tool)... you won't be able to see any qualitative difference. Because you won't be able to hear any qualitative difference either. :)
I imagine low pass filtering depends a bit on which compression you're using.
None of these tricks will work for detecting GAN compressed audio, though.
http://tausoft.org/wiki/aucdtect
I wonder if there is any open source implementation of the algorithm it uses.
I'm guessing sometimes frequency cutoff is due to using less than ideal microphones, although not the extreme cutoffs (I'm fairly sure it would be gradual in that case). It also seems there is often a fair amount of noise around 20kHz that I'm guessing is from recording equipment, sometimes on tracks that otherwise look suspiciously like they are from lossy audio. Additionally, in some cases there could potentially be high frequency cutoffs in processing while otherwise being lossless, particularly stuff like electronic music where there can be a lot of processing in general. So I'm not sure if it is necessarily all that easy to tell in general, although there are certainly some from Bandcamp that seem highly likely to be conversions from lossy formats :(.
In the case of FLAC the situation is straight forward, you've got uncompressed audio and a codec that's performing lossless compression. You want to know what was encoded losslessly matches the input. It's no different from a checksum in a compressed archive.
It's less straightforward with a lossy compressed codec. Are we just checksumming the compressed bitstream? Where in the handling of the bitstream are we doing the checksum? In MOV/MP4 a media track can have arbitrary start and end times. It makes doing in/out cuts super fast. But when it comes to checksumming the track do we checksum all the samples in the track or only the samples that will play? If a file if flattened and a track has all the samples out of the playable region discarded do we now have to recalculate the checksum?
Media tracks can also have header tags that indicate stuff like display color space, displayed size, or even track level metadata. Are we checksumming the track bitstream and important track headers? A video needing to render in a particular color space will be materially affected if it's bitstream is preserved but color space tags are dropped.
If you want to hack in checksums for track bitstreams both MOV/MP4 and Matroska can accept arbitrary tags for tracks so you can just write a checksum to a track header tag if you really want to. You really need a table of rules for doing the checksum otherwise it's a wasted effort.
But I guess most people and thus file formats don't care. If your file's corrupted and you don't notice it doesn't matter. And if you do notice you don't need a checksum to tell you. I don't necessarily agree (knowing where the corruption occurred is useful), but I can see the reasoning.
Second, do any give an indication of when the error correction fails: I think CD players just fill the missing data with the last sample value (certainly this was the case for first gen CD players)- but this FLAC encoding gives a better procedure: replace the missing samples from those of a predictive model. But either way, it would be nice to know when the playback is not perfect.
> Some ROM drives are capable of reporting C2 error information along with the audio data and some ripping software can use this information to determine whether the retrieved audio data is valid or not. A standardised mechanism for ROM drives to report C2 error information is documented in the Multi-Media Command (MMC) standard
https://docs.linn.co.uk/wiki/index.php/CD_Ripping_Terminolog...
How much would audiophiles pay to have a quality indicator on their CD player? Hmm...
Edit: Sony's CXD2500BQ shows error correction information on the pins- no FPGA needed.
CXD2500BQ is used in Onkyo's DX-7310
This company claims to have a product for this (but no pictures..), follow the links for their "CD Errormonitor":
Still-- why not just output Quake on that line and subtract the error correction from the starting 100% health?
Exact Audio Copy shows it but will spend minutes re-reading the same frames: https://i.imgur.com/ZGozdhz.png (screenshot mine, unfortunately)
I want something like that for JPG, with parity.
I have no domain knowledge here, just curious
Hell, 99% of all computers are still running on non-checksummed filesystems, if not 99.99%.
For the most part, only a tiny minority of people are even aware of bit rot, let alone have anything they simultaneously care enough about to protect against, and have enough ownership of it to attempt to try.
Most such audio codecs are based to some degree on variants of fourier transforms, so this modification is done by dropping or reducing resolution of parts of the output.
CD audio is perfectly lossless - it encodes the signal that you put in by measuring a voltage 44100 times per second and recording that exactly. When you play it back you get exactly the same signal back out. The only problem is, this takes up a lot of space, roughly 10MB per minute for stereo audio.
MP3 audio is lossy in that rather than storing the exact values of a waveform, it stores a description of how short segments of the waveform change. The higher the bitrate, the better the description, and the more detailed the reproduction. A low bitrate MP3 is like trying to redraw the original waveform from a vague description with a paint roller, a high bitrate MP3 is like trying to draw it with a mapping pen from a really detailed description.
FLAC audio is lossless because it takes the precise values of the audio, and uses a technique similar to zip files to find similar-looking blocks of data. Think in terms of having a one-second silence recorded as "Zero, then 44099 more of 'em" rather than "zero zero zero zero zero..." and so on 44100 times.
Not at all! CD audio amplitude is quantized to 16 bits, and temporally sampled at 44100 Hz as you say. Certainly very high quality, but there's absolutely a loss (that nobody can really hear).
Otherwise image formats could not be lossless for the same reasons (at the very least very few of them store the polarity of the light)
I know that when I was about 10yo, I could hear a tiny suggestion of something audible when I tested my hearing at around 23-24kHz. I guess that if you had some really loud content around these frequencies and had equipment that could reproduce it perfectly, it would be not impossible for it to influence my listening experience those many years ago :)
Testing with https://www.audiocheck.net/blindtests_frequency.php, my hearing limit in the white noise case for example is at least 1 to 2 kHz lower than my hearing limit for a single frequency sinus tone.
It's got way more audio bandwidth than most of the analogue masters that everyone raves about.
No, there's nothing magically audible happening with phase shifts near the steep cutoff of the antialiasing filter that isn't happening with the gentle rolloff of tape, either. Not that you could hear anyway, and even though my hearing is better than most 48-year-old industrial music enthusiasts, not that I could hear either.
For cats, even your very best equipment with perfect reproduction sounds like AM radio because their hearing tops out at 80kHz.
https://en.wikipedia.org/wiki/Lossless_compression
https://en.wikipedia.org/wiki/Audio_Lossless_Coding
https://en.wikipedia.org/wiki/Category:Lossless_compression_...
This is very common terminology.
Thank you
Just like any general purpose compression: everything - flac could be used just like zip/zlib/gzip as a general purpose compressor it just wouldn’t compress as well on most data that isn’t audio.
> dropped when "LOSS" occurs?
Lossy compression generally employs some type of perceptual coding where data is reorganized such that the signal data is sorted or localized according to its perceptual importance. This does partly involve removing or reducing the density of signal in the higher frequencies but it also exploits things such as masking both in time - inability to perceive signals occurring close in time of similar frequency. And frequency masking - our inability to hear quieter signals that are close in frequency to a louder one.
You cannot do the same with MP3, AAC, OGG, Opus or any other lossy codec.
The exact frequency/amplitude relationships where masking effects come into play were studied by the telecoms early on (meaning in the 1950s-1960s era), and are still a key part of most lossy encoding models these days.
See https://en.wikipedia.org/wiki/Critical_band and https://en.wikipedia.org/wiki/Psychoacoustics as an introduction to the principles.
Cutting down the bandwidth (lowering the sample rate) wont sound as good as an actual lossy codec - otherwise we could just resample.
But IMO these are the properties of a good container file / stream format. FLAC might define its own but IMO most codecs could work well with a generic container.
Are there other, more advanced lossless encodings that do this? And if so, why didn't they catch on compared to FLAC?
For that matter, is there a lossless format that just embeds a regular lossy encoding of the audio as the approximation, and then computes+stores the residual relative to that? (I'm guessing that this wouldn't work well for some reason, but I'm not sure what that reason would be.)
(ETA: the other later lossless audio formats that I'm personally aware of — ALAC, Monkey's Audio, and WavPack — all seem to use linear prediction. Seemingly they were all designed under the presumption of the constraint that the encode step must be able to be done in hardware / with fixed-sized memory buffers; rather than allowing that you can load the whole PCM audio file into memory and do things like FFT to it. Possibly made sense in the late 90s, when a PC's RAM wasn't much larger than five minutes of uncompressed audio. Doesn't really make sense today. Maybe we're due for a new lossless audio encoding?)
I'm curious if you'd gain anything by doing an mdct and then modeling in the frequency domain and then storing the residuals... Lots of the frequency channels will usually have much lower energy, so the residuals wind up being easier to store.
That led me to other coders: DTS-HD Master Audio [2] (née DTS++) and OptimFROG DualStream [3].
OptimFROG's DualStream mode is similar to WavPack's hybrid mode, and DTS-HD MA uses DTS Coherent Acoustics (based on ADPCM), so none of these are based on a perceptual lossy codec besides MPEG-4 SLS.
(Sorry to keep replying here, I keep stumbling on interesting things after the edit window closes)
[1] https://en.wikipedia.org/wiki/MPEG-4_SLS
It's not "regular lossy", but WavPack does allow separating lossy from the residual in hybrid mode. I think this is rarely done with DCT-based stuff because there's so much potential imprecision in the decoders.
Is this just a thing with old codecs? I'd think that any codec from the last 10 years could assume a minimum level of support for certain ALU ops in even the wimpiest hardware expected to decode it; and then constrain more-powerful implementations to emulate that minimum standard, so as to get exactly the same decoded output. (I.e., define a strict "decoder abstract machine" semantics, and then explain how various real-world software/hardware impls should implement it.)
There's another more important point, though: Modern lossy codecs are designed to be perceptually transparent, rather than minimizing an absolute signal error. The difference is a likely a large and unpredictable signal, so the typical Rice coding will be ineffective for compressing the residual.
Wavelets still might be interesting as a basis, there's at least one project [1] that reports comparable ratios to FLAC, if a bit lower.
Is this why h.264 and friends are specified in terms of how it's decoded?
Wondering if FLAC already does this or if such a feature could be added?
In the 80s and 90s some people were going crazy over HiFi, only the absolute high end products were just good enough. I remmeber seeing stereo systems for 50,000$ and more. CDs were already seen as inferior to records quality-wise, and speakers had to be huge if possible.
Today Wifi speakers are all the rage. The music is downloaded (precompressed) and then sent over Wifi or Bluetooth with (sometimes very) limited bandwidth to a single speaker which has the size of a laptop.
How does the audio quality compare? Is it like day and night? Or do the new multi room systems play in the same league as the old system that were used by enthusiasts? I often have the feeling that overall sound quality does not matter anymore as long as the bass is strong enough, but as I said at the beginning, my ears are not very sensitive.
Please repeat this when people say "there's no reason to use sample rates above 44 kHz". While it's true for source material, it should be properly caveated.
"greater than 44 kSamp/s", not "<44 kSamp/s"
"ADCs" should be "DACs". While it's still correct, it isn't on-topic.
But, a lot of popular music out there isn’t mastered for that use case (high end ABX testing). On the contrary, there are tons of CDs that are extremely compressed (in the dynamic range sense) so as to sound as loud as possible on the radio [1]. If you compare one of these CDs with an earlier (or even contemporary) vinyl release which has been mastered correctly then of course the vinyl will sound better!
Unfortunately, because we’re dealing with a Wild West of media, new and old, floating around in the marketplace we don’t have the luxury of a perfect ABX comparison, and so people will continue to buy and prefer old formats. It is for that reason that we can’t dismiss them.
For example, much of the great early Bluenote jazz was recorded by RVG in the living room of his parents' home in New Jersey. [1]
Until it is resampled in the noisy OS mixer and/or lossy compressed again to be sent over Bluetooth. Very few ABX studies consider the effect of such modern "digital signal chains", especially transcoding. It's much better to start with FLAC.
But saying this without mentioning the loudness wars misses the main force behind vinyl's staying power.
This is like making an argument for transistor guitar amps. They're better on paper, but tubes produce a type of distortion that is pleasing to many listeners.
E.g. when Dylan's famous 60's electric trilogy first came out on CD, at least two of those albums had to be remixed not for whatever possible artistical and/or money-making reasons [1] that commonly cause remixes to be done these days, but simply because the original master tapes (including the safety copies) had worn out through continuous re-pressings of the original vinyl albums.
[1] Though of course the switch to CD in itself was, while also undeniably a definitive technological upgrade, in some ways also a nice way of making people buy the albums again even if they already owned them in some other storage format.
Doesn't sound very scientific to me.
> How does the audio quality compare?
Why compare with an old system from the 80s? I got to hear a friend's friend's modern audiophile setup. A dedicated room with Wilson Audio speakers (totally overpriced but amazing), high-end DAC, high-end amp... It was bliss. One of these $50K+ setup but bliss. This is nothing like a laptop, a soundbar or a Sonos.
> Or do the new multi room systems play in the same league as the old system that were used by enthusiasts?
I wouldn't be suprised they'd actually be better than these old systems. But they don't play in the same league as actual modern audiophile setups.
From my experience with them, you kind of just summed up the HiFi/audiophile core. I've spent waaay too much time with audio engineers, recording engineers, etc from edit bays to sound stages. Yes, there are now things that I can hear because they pointed it out to me, but until then, I was perfectly content with my head in the sand of not-knowing. However, while I agree there are certain things that can make a difference, the tendency for the absurd always seems to take hold.
To be fair you can have a similarly great experience on significantly more affordable setups around 10k.
DAC and amplification above a certain price range is basically good enough to become indistinguishable from one another. The largest part of your budget should go into speakers. And don't underestimate the effects of proper room treatment and correction. Solutions like Dirac Live have made this much more approachable.
Anything above that will provide very marginal gains. There's a lot of costly prestige above that threshold which doesn't always translate into real audible benefits.
What do you mean? What's the difference between an audiophile setup from the 80s GP was mentioning and one from today? Today you'd have a DAC, for a start. Maybe some DRC (Digital Room Correction software). Then amps have progressed tremendously. And so did speakers (newer materials).
As for the setup I listened to: I'm no pro, I don't remember the details. I know the speakers were Wilson Audio but I don't remember the DAC nor the amp(s) brands: all I know is it was high-end stuff costing money I'm personally not willing to put in an audio setup. But it did sound very good.
Meanwhile, mass-market audio has gotten better but not consistently. The speakers are usually the limiting factor for quality: you can have at most any two of small speakers, deep bass, or volume for a given power budget. Lots of consumer systems go for small speakers and don't have either deep bass or high volume.
Does sound quality matter? That's an individual choice. It's available to you at a much lower cost than ever before in history.
Once you do lossless -> lossy, you're "stuck", unless you accept reencoding artifacts and those do add up to eventually be bad.
I'm an audio enthusiast, have quality (but not excessive, triple digit prices) DACs, amps and everything else. I can't ABX 256kbps+ MP3s from lossless, but the above stands.
Just compare the original earbuds included with the iPod to the wired EarPods that Apple sells now.
Or compare the AirPods Pro ($249) to what the same amount (inflation adjusted) could get you 20 years ago.
Of course there’s still plenty of space on the high end, and still the higher you go the more you need to spend to achieve 1% better sound.
These absolutely still exist. What's changed, to an extent, is that they're a bit less fashionable; whereas in the 80s any self-respecting rich person needed a hifi that cost as much as a small house, today, this is largely the preserve of (rich) enthusiasts.
The vast majority of people would have had relatively low cost stereo systems which were, by and large, far worse than their modern contemporaries, tho.
My guess: >90% of music consumers don't care about quality as long as it's good enough. What they care is ease of use. Why should they have a complicated setup and try getting their records in lossless FLAC when they can just go onto Spotify / Apple Music / YouTube and press play.
I've seen lot's of people that don't even care that their audio has the intro parts when playing from youtube. So why should they care for HiFi.
Apple Music has lossless now.
Same, but at home I also play directly the FLAC files (laptop / DAC / amp / floorstanding loudspeakers). They're not that much bigger than 320 kbps mp3 files.
I convert to lossy for my car, which takes mp3 files but not FLAC.
I used to collect mp3s back in the Napster days. My HDD was maybe 40 GB back then (?), maybe not even that. Nowadays FLAC files size aren't a concern. I think a screenshot of my screen takes more room than a song FLAC encoded.
Interestingly, a study suggests that room acoustics don't negatively affect the sound of good speakers, and what that means is that for listening, acoustics don't matter as much as they do for recording.
This ain’t true - for example Bluetooth is lossy compression.
‘Digital’ doesn’t mean lossless from the source.
> The signal is digital until it gets to the speaker so there is no loss of quality after the initial encoding
isn't true - the original encoding is decoded... and re-encoded, losslessly, by the Bluetooth protocol.
Literally says ‘Bluetooth’ in the original comment.
"and then sent over Wifi or Bluetooth"
the information about lossless was informative.
MP3 is more like an edited version of the original where "extra fluff" is removed from the audio in a way that you can still hear the important bits. And then compressed for further space savings.
Obviously, there is no point in converting MP3 to FLAC since when the original lossless audio track was MP3'd , it lost some of the audio information, so you'd only be changing the compression algorithm, I imagine.
I'm really confused by what you're talking about lol... especially "up"convert...??? WAV is the ultimate lossless audio on PC. It really doesn't get any better than WAV. There is no "up" from WAV. FLAC is a compression format for WAV, that does not lose any data. The output of FLAC will be identical to the WAV file, even though its compressed. MP3 is a compression format for WAV that loses data, and will not be identical to the original WAV file.
In 1988, Apple developed the Audio Interchange File Format (AIFF), which is uncompressed pulse code modulation (PCM). PCM is what is stored on CDs, so any Mac with a CD-ROM drive attached will recognize the PCM information on Red Book audio CD's as AIFF files.
Inexplicably, 3 years later, Microsoft and IBM developed the Resource Interchange File Format (RIFF) in 1991, of which the WAV format is one implementation. RIFF doesn't store PCM. Instead it stores various formats of data in 4 byte "chunks."
Depending on the audio file format specified, one can always distinguish a Windows user from an audio professional (or a Mac user), because since about 1990, the vast majority of professional audio recording (tracking, mixing and mastering) studios have been exclusively Mac shops, including such greats as Skywalker Sound and Abbey Road Studios.
All these formats, IFF, AIFF, and RIFF, use named chunks for organization, and store PCM basically the same way, though there are other payloads possible.
https://xiph.org/flac/documentation_tools_flac.html#flac_opt...
When you rip one of your CD, a good ripper shall verify that your rip is 100% bit perfect (by verifying that the hash of your rip matches an online database of hashes of CDs ripped by other people). These rippers typically do rip to FLAC.
FWIW on Linux I've had good luck with "whipper" in the past (haven't ripped any CD that recently) [1]
How can an Apple device not support FLAC? Are they really that locked down that you can't do something basic like install a codec?
You can't install a codec globally on iOS, but there are many, many player apps that support FLAC: https://www.igeeksblog.com/best-music-player-apps-for-iphone...
For folks who think Apple Music is the best music app for iOS, it's not difficult to convert songs, albums, or whole music libraries to ALAC.
I think they prefer it because it's in a MPEG4 container, it can be DRM encumbered with their "FairPlay" technology that they hadn't used for a while, but now use again for subscription Apple Music.
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.
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.
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."
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?
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.
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.
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.
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.
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.> This seems rude.
I meant it tautologically: literally the definition of useless is a difference which has no measurable impact.
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?
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.
> 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.
But yeah, it's probably wasted.
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.
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.
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.
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.
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_...
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.
[0]: https://wiki.xiph.org/OpusFAQ#Does_Opus_make_all_those_other...
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.
I don't know about an iPhone. I assume you can find apps that support it.
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.
at current prices that's about $25 of SSD
I also very regularly go places with mediocre cell service: country side, airplanes, boats, and festivals.
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?
And you can keep an extra one at another site in case your house burns down.
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.
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.
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.
Maybe in another decade.
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.
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.
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.
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.
How is this a lossless process?
(It's the same idea for images, where the RGB channels mostly all look like grayscale copies of the image, so the YCbCr/YCoCg transform is done to decorrelate them.)
There are actually three methods in FLAC: mid/side, left/side, and right/side. Each frame can use a different method and stores what method it used (if any) in the frame header.
The difference has a range 1 bit larger than the original, but this doesn't matter that much since everything is getting compressed anyway. Anyway the bit is only used if the side channel is very large, ie. the correlation was poor, in which case it would be better not to use a decorrelation for this frame.
Interchannel Decorrelation: https://www.ietf.org/archive/id/draft-ietf-cellar-flac-04.ht...
Channel Bits in Frame Header: https://www.ietf.org/archive/id/draft-ietf-cellar-flac-04.ht...
I know a couple of years ago it used to be flaky. Eg:
There are other issues related to streaming the FLAC via Range requests depending if it is WebAudio, <audio> or directly in a tab, however this applies to all audio/media in general.
There is no sane approach to media. Between legacy formats, legacy tagging, and all kinds of implementation specific bugs, you are in for a ride if you want to cater to more than one decoder out there :)
Could you share more info on that?