mirror of
https://github.com/librespot-org/librespot.git
synced 2026-04-27 08:15:50 +03:00
[GH-ISSUE #651] Some songs not available in OGG Vorbis format #379
Labels
No labels
A-Alsa
SpotifyAPI
Tokio 1.0
audio
bug
can't reproduce
compilation
dependencies
duplicate
enhancement
good first issue
help wanted
high priority
imported
imported
invalid
new api
pull-request
question
reverse engineering
wiki
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/librespot#379
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @trillllian on GitHub (Feb 24, 2021).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/651
Originally assigned to: @roderickvd on GitHub.
Most songs that I could find have the following set of formats available: AAC_160, AAC_320, MP4_128, MP4_128_DUAL, OGG_VORBIS_160, OGG_VORBIS_320, OGG_VORBIS_96, OTHER5
However, "I Write Sins Not Tragedies" by Panic! at the Disco (link), for some reason, doesn't have this set of formats: notably, it's missing all 3 Vorbis formats, leaving only AAC_160, AAC_320, MP4_128, MP4_128_DUAL, OTHER5.
Since librespot only tries playing the Vorbis formats, it will fail playing this song (in v0.1.6, it'd even panic here, but that seems to be fixed in the dev branch).
I haven't found another song that's missing Vorbis, not even on the same album. I'm not sure if the added effort to support a different format as fallback is worth it for what seems to be only one song (or, well, I would be very surprised if this was the only song with this quirk, but I haven't found any others yet).
@Johannesd3 commented on GitHub (Feb 24, 2021):
I suppose I fixed this panic "en passant", but I never thought it would actually occur.
I don't think it would be too hard to add more supported formats (just maybe the recently added ogg passthrough makes it more difficult). The official clients must support them too if they can play this track.
@Malvineous commented on GitHub (Feb 27, 2021):
I just came across the album "Diamonds" by "Enforcer" which also won't play citing an
OggError(NoCapturePatternFound)on all tracks so I guess this is the same problem.The web player works fine just not librespot.
@Johannesd3 commented on GitHub (Mar 23, 2021):
I don't think it's the same problem. In this case, ogg is still in the list of available formats but librespot is not able to play the downloaded files. Maybe they're really corrupted and the spotify clients are able to use another format as fallback, but could be another reason as well.
@roderickvd commented on GitHub (May 24, 2021):
Couple of random thoughts:
librespot-javasupports MP3 too but none of the others.@Malvineous commented on GitHub (May 25, 2021):
Spotify HiFi? I guess that's only for new songs? The number of songs they have at the moment with pops and clicks in them that sound like CD ripping errors is surprising. There wouldn't be any point in having those in higher quality unless they could get a better quality source than a poorly ripped CD.
(Case in point, skip to 1:32 on the first track in this album: https://open.spotify.com/track/5CNJnvtmdxvbE062pLbfAK?si=CuHZf00oRE2eWPhBvOW7nw - I reported it in July 2020 and it was referred to the "content team" who apparently still haven't done anything about it.)
@roderickvd commented on GitHub (May 25, 2021):
We don't know yet, official news channel is here: https://newsroom.spotify.com/2021-02-22/five-things-to-know-about-spotify-hifi/
Spotify requires musicians / distributors to submit their music in WAV or FLAC format, so there should be a cache of lossless masters.
@kingosticks commented on GitHub (May 25, 2021):
Wow.... that is quite impressively horrendous. For me, anything after that timestamp is a garbled mess of musical pain. I don't think that's a good example of pops and clicks from "CD ripping", that sounds more like full-on data corruption. But it is interesting that it's the same in both the official client and the web streaming which points to Spotify having been given a crap source from the musician.
Yes. Spotify's official client is built on Chromium Embedded Framework which (by default) does not include non-free codecs like AAC.
@roderickvd commented on GitHub (May 25, 2021):
It's actually quite tempting to see how far we can get with this. Vorbis isn't in (yet), but MP3 and AAC are under compatible MPL license. So that could solve two issues in one swoop (and keep
lewtonaround for Vorbis for the time being).I think FLAC is a good candidate for Spotify HiFi, only time will tell.
Regardless of it'll be FLAC, and if we want to depend on Symphonia or not, this would still be a fun exercise to get multi-format support in and we can always swap libraries later.
Only let-down is that Symphonia outputs samples in
i16instead off32, but that seems to be the case for the nativefdkandfaad2libraries too. FLAC doesn't support floating point anyway.* We can still promotei16tof32for purpose of high-quality volume normalisation and control.Let me know your thoughts and I can take a look at it.
*edit:
claxonoutputsi32but it won't matter, because Spotify has announced they'll stream 16 bit lossless and not any higher.@pingw33n commented on GitHub (Jun 8, 2021):
Those AAC streams are encrypted with an external DRM (web player uses Widevine, streams provided by internal API probably use PlayReady), the existing key retrieval API doesn't work for them. Playing such streams will likely require bundling in a proprietary DRM library and reverse engineering how to set it up correctly.
@roderickvd commented on GitHub (Jun 8, 2021):
The 24 and 48 kbps AAC streams too? Those can be fetched with
spircthe "Old Way" so I was betting that those were not subject to DRM. Not the higher-bitrate AAC ones that the web player streams though, they are not in the protobufs.I'm making progress on my multi-format branch, should be close to fetching and decoding AAC's and MP3's soon. Also saw in the latest protobufs that FLAC is in. So that sets us up for Spotify HiFi once released, and when we figure out how to advertise HiFi support with the new API.
@pingw33n commented on GitHub (Jun 8, 2021):
Not sure about the
spircbut the AACs that appear inTrack::filesfor few tracks I checked were all DRM encrypted.@roderickvd commented on GitHub (Nov 3, 2021):
For reference, Psst is switching from
minivorbistoSymphonia: https://github.com/jpochyla/psst/pull/197. Support for normalisation data is already in. I'll look into it, and welcome any PRs.@roderickvd commented on GitHub (Jan 2, 2022):
In my local
new-apibranch I've got MP3 support in, but now I can't find any track that's available in MP3 😅 who can point me to one?The song in the issue description, "I Write Sins Not Tragedies" by Panic! at the Disco, is only available in CMAF-encrypted AAC (
iso8mp41dashcmfc). Not much we can do about that.The album "Diamonds" by "Enforcer" seems to play fine?
@Malvineous commented on GitHub (Jan 3, 2022):
Confirming "Diamonds" by "Enforcer" recently got Vorbis versions added. I haven't come across any other MP3-only songs.
@roderickvd commented on GitHub (Jan 12, 2022):
MP3 support implemented in
new-api@github.com/librespot-org/librespot@7921f23927. While I haven't been able to find any MP3 tracks on the CDN, I am pretty confident such files will play fine.Playing MP3's from external URL's is covered by issue #818.
Please reopen this if and only if you are encounter non-playing MP3 or Ogg Vorbis tracks that are actually available from Spotify's own infrastructure.