Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Spotify's FLAC is not lossless? (Read 1960 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Spotify's FLAC is not lossless?

Spotify now ostensibly offers HiFi (FLAC) audio, however it looks like something is awry.

I'm now uploading the same track from YouTube and Spotify and I'd like people to take a close look and give their opinion on why 160Kbit/sec Opus looks better than what is purported to by FLAC.

Both extracts are limited to 29.5 seconds which is AFAIK fair use.

Of course, it could be that Opus encoder or decoder "invents" frequencies which are not there but that all looks weird.

For all "FLAC" Spotify tracks auCDtect reports: "This track looks like MPEG with probability 95%".

Brand new Lossless Audio Checker 2.0.7 reports: Upscaled.

The track name is Azedia - Spin.

YouTube.
Spotify.

Re: Spotify's FLAC is not lossless?

Reply #1
This recording might be decoded from high-bitrate AAC. It could be that it was delivered in this form to Spotify, unless all its catalogue is in this form. I disagree that youtube sample "looks" better. The spectrum is more sparse and there is a band cut out around 16k.

Spotify: https://i.imgur.com/CVsLaHV.png
Youtube: https://i.imgur.com/CjaxB1D.png

Re: Spotify's FLAC is not lossless?

Reply #2
This recording might be decoded from high-bitrate AAC. It could be that it was delivered in this form to Spotify, unless all its catalogue is in this form. I disagree that youtube sample "looks" better. The spectrum is more sparse and there is a band cut out around 16k.

Spotify: https://i.imgur.com/CVsLaHV.png
Youtube: https://i.imgur.com/CjaxB1D.png

Thanks, that's what I've noticed as well but youtube's spectrogram still has a lot more higher frequencies. Is it possible that the album has two different masters or was remastered for either YouTube or Spotify? For a real lossless audio Spotify's version is severely lacking in frequencies above 20KHz though there's no hard cut-off.

Actually, it looks like it's Ogg Vorbis at 320Kbit/sec uncompressed and encoded into FLAC. I might be wrong but if I'm right it's just stupid.

I've just encoded a random FLAC file from my collection using oggenc -b 320 and its spectorgram looks very similar to Spotify's FLAC.

Still, what's weird about Spotify is that audio is 44100Hz 24 bit vs "normal" FLACs which are usually 44100Hz 16bit.

Re: Spotify's FLAC is not lossless?

Reply #3
To hell with Spotify, anyway. They chose Joe Rogan over Neil Young. That investment was one of the worst they've ever made. Period.

Re: Spotify's FLAC is not lossless?

Reply #4
I would require more comparisons to conclude. Some music has been through lossy compression from the artist's hand, and some artists would go oh, I can only upload .wav or .flac? OK, I can convert to .wav. And then there are all the different masterings ...
Still, what's weird about Spotify is that audio is 44100Hz 24 bit vs "normal" FLACs which are usually 44100Hz 16bit.
If they have some 24-bit files to deliver, they can use 24 bit all over. FLAC supports "wasted bits": a 16-bit signal compresses to the same if you put it into a a 24-bit file.


To hell with Spotify, anyway. They chose Joe Rogan over Neil Young. That investment was one of the worst they've ever made. Period.
As much as I would choose Neil Young over Joe Rogan, I might understand that they don't back down over one artist wanting to kick another out. One thing is the principle that if I don't want to be seen in the same music store as sells Ted Nu(gen)tcase, then I walk out. Another is how music stores would have to deal with artists having some kind of beef with each other, with each other's managers, with producer this and label boss that.


Last two months' worth of foobar2000.org ad revenue has been donated to support war refugees from Ukraine: https://www.foobar2000.org/

Re: Spotify's FLAC is not lossless?

Reply #5
It's not about an other artist. Rogan is not an artist. Unless you mean con artist.
some ANC'd headphones + AutoEq-based impulse + Meier Crossfeed (30%)

Re: Spotify's FLAC is not lossless?

Reply #6
It's not about an other artist. Rogan is not an artist.
Well he is a supplier of what that store sells, that is the point. Not whether you or I see any artistic merit in what he is peddling. I surely have a hard time fin ...

Unless you mean con artist.
... uh, so maybe he has some artistic merit after all.

But still, if they allow one artist to veto who else they deal with, what next you think?
Last two months' worth of foobar2000.org ad revenue has been donated to support war refugees from Ukraine: https://www.foobar2000.org/

Re: Spotify's FLAC is not lossless?

Reply #7
But still, if they allow one artist to veto who else they deal with, what next you think?

Them siding with Neil Young wouldn't have been "allowing one artist to veto who else they deal with" - it would merely be them themselves deciding which of the two artists they prefer to support - exactly as much as they've done by deciding the opposite.

Siding with Neil Young wouldn't have somehow magically been a worse decision just because it would be agreeing with him rather than disagreeing. It also wouldn't mean that Spotify would have to agree with anyone else who decides to put up this sort of ultimatum. But once an artist does decide to put up this sort of ultimatum, there simply is no way for Spotify to handle it in a way that doesn't result in them "taking a side" - as much as they would like everyone to believe that the way they've handled this was merely by "not taking a side".

Re: Spotify's FLAC is not lossless?

Reply #8
But still, if they allow one artist to veto who else they deal with, what next you think?

Them siding with Neil Young wouldn't have been "allowing one artist to veto who else they deal with" - it would merely be them themselves deciding which of the two artists they prefer to support - exactly as much as they've done by deciding the opposite.

Siding with Neil Young wouldn't have somehow magically been a worse decision just because it would be agreeing with him rather than disagreeing. It also wouldn't mean that Spotify would have to agree with anyone else who decides to put up this sort of ultimatum. But once an artist does decide to put up this sort of ultimatum, there simply is no way for Spotify to handle it in a way that doesn't result in them "taking a side" - as much as they would like everyone to believe that the way they've handled this was merely by "not taking a side".
I agree with Porcus here. Allowing both "content producers" to offer their content on their service is not taking side. It is being hands-off, for good or bad.

When Neil Young come with an ultimatum "him or me", then it is his choice to withdraw his music. I envy both his principles and his economy where he can afford to do such a thing.

-k

Re: Spotify's FLAC is not lossless?

Reply #9
When Neil Young come with an ultimatum "him or me", then it is his choice to withdraw his music.

Except no - it is his choice to submit that ultimatum to Spotify, but it is nevertheless still Spotify's choice which side they will go with.

Yes, he is forcing Spotify to take a side, and you may not think that's a nice thing to do, but the fact of the matter is that it is nevertheless Spotify's choice to make, regardless of whether forcing them to make that choice is a nice thing to do or not.

It wasn't Neil Young's choice to withdraw his music. Neil Young's choice was to force Spotify to make that choice. And they did.

Re: Spotify's FLAC is not lossless?

Reply #10
Brand new Lossless Audio Checker 2.0.7 reports: Upscaled.
Perhaps that is because the spotify.flac file is a 16-bit file packed in a 24-bit file with 8 wasted bits (like Porcus mentioned as possible). It is thus 'upscaled' in the sense that 8 bits of padding were added.

I can't say much about whether the source of this file has been lossy at some point. My usual test is inverting the right channel and mixing it with the left channel. If I do that with both files, I can hear something that sounds like compression artifacts in the opus file but not in the spotify file (ABX'ing isn't possible here, as I can't prove I do not hear something with it). Perhaps you should try yourself?

How did you cut the FLAC file? I'm curious which encoder is used by Spotify.
Music: sounds arranged such that they construct feelings.

Re: Spotify's FLAC is not lossless?

Reply #11
Brand new Lossless Audio Checker 2.0.7 reports: Upscaled.
Perhaps that is because the spotify.flac file is a 16-bit file packed in a 24-bit file with 8 wasted bits (like Porcus mentioned as possible). It is thus 'upscaled' in the sense that 8 bits of padding were added.

I can't say much about whether the source of this file has been lossy at some point. My usual test is inverting the right channel and mixing it with the left channel. If I do that with both files, I can hear something that sounds like compression artifacts in the opus file but not in the spotify file (ABX'ing isn't possible here, as I can't prove I do not hear something with it). Perhaps you should try yourself?

How did you cut the FLAC file? I'm curious which encoder is used by Spotify.

AFAIK Lossless Audio Checker doesn't care about the bitness, "upscaled" means something was compressed (e.g. mp3 codecs tend to cut off around 16KHz) and then "upscaled" to fill the missing spectrum.

As for cutting I used ffmpeg -i source.flac -ss 02:00 -to 2:29.5 -c:a copy -output.flac

Re: Spotify's FLAC is not lossless?

Reply #12
So Spotify lets independent artists upload themselves, this way: https://artists.spotify.com/help/article/audio-file-formats
Which means, you would probably want to either get the original ($7 from https://azedia.gumroad.com/ ) or test a few more files.

What artists does Spotify offer in (alleged) FLAC? (I have managed to keep myself a 0.9.x version of the client, so I don't expect any new features.)
Last two months' worth of foobar2000.org ad revenue has been donated to support war refugees from Ukraine: https://www.foobar2000.org/

Re: Spotify's FLAC is not lossless?

Reply #13
On a second look it indeed looks like a Vorbis encoding with its lossless channel coupling because the difference channel (third on the spectrograms) was clean. It's possible that Spotify doesn't have lossless copies of all of its catalogue.

Re: Spotify's FLAC is not lossless?

Reply #14
Then they should do like Apple: Only offer Lossless or better versions on tracks/albums where they actually have Lossless or better masters. Don't unconditionally upconvert lossy tracks to FLAC on the server side.

Re: Spotify's FLAC is not lossless?

Reply #15
Then they should do like Apple: Only offer Lossless or better versions on tracks/albums where they actually have Lossless or better masters. Don't unconditionally upconvert lossy tracks to FLAC on the server side.
It's likely an issue of digital supply chain platform at Spotify being decoupled from their transcoding platform (both organizationally and technically). The digital supply chain's job is to get the best quality audio sources from their content partners. They likely have a list of preferred delivery formats like 24-bit PCM or FLAC, and they likely have a list of "not great but we'll accept it if you got nothing better" formats like 320kbps MP3 or AAC.
Their transcoding platform, on the other hand, was likely designed to assume quality control was performed upstream and just accept whatever format it's given. So when it's configured to produce FLAC output (because it's expected to produce FLAC versions of all content) and it's handed 320kbps MP3, it probably just goes ahead and transcodes it.

I'm not saying that's the right thing to do, I'm just saying I can see how they probably got there. :)

Re: Spotify's FLAC is not lossless?

Reply #16
When it receives lossy, and it wants FLAC, it should say "nope", and flag the file as unavailable in FLAC format. The client should accept this and fall back on lossy. Just like Apple already does easily.

Re: Spotify's FLAC is not lossless?

Reply #17
But programming is hard. 🙃

Re: Spotify's FLAC is not lossless?

Reply #18
True dat. I do it so hard, I end up dreaming about doing it. Which is why I'm imposing a break on myself. But now I'm bored.

Re: Spotify's FLAC is not lossless?

Reply #19
Then they should do like Apple: Only offer Lossless or better versions on tracks/albums where they actually have Lossless or better masters. Don't unconditionally upconvert lossy tracks to FLAC on the server side.
But who says it was transcoded by Spotify and not before uploading?
DIY artists do a lot of ... uh, "IY"'s.
Last two months' worth of foobar2000.org ad revenue has been donated to support war refugees from Ukraine: https://www.foobar2000.org/

Re: Spotify's FLAC is not lossless?

Reply #20
Zoomed spectrals taken at 20 seconds in for 2 seconds duration are also interesting:

Spotify (flac): https://i.imgur.com/iLKZmlC.png
YouTube (Opus 160): https://i.imgur.com/SZXd4Vn.png

To me, the Spotify (flac) looks better, even though the YouTube (Opus) file reaches a higher frequency.

But does the Spotify (flac) look to be from a lossless source?
imo, no.
Both Spotify (flac) spectrals do not look like spectral analysis results from a (true) lossless file.

 

Re: Spotify's FLAC is not lossless?

Reply #21
Please upload a few more samples from other artists. Something like The Beatles you would expect to be lossless, with all the hubub about each remaster.