librespot-org / librespot

Open Source Spotify client library
MIT License
4.7k stars 573 forks source link

Allow to fine-tune the requested stream formats #1112

Closed ptesarik closed 1 year ago

ptesarik commented 1 year ago

Requested file formats can be currently controlled only through the bitrate parameter, which translates to one of a few hard-coded priority lists.

Some users may want to specify a different preference list, e.g.:

roderickvd commented 1 year ago

Thanks for the PR. This one I would like some feedback from others as well. Do we consider it enough of a use case to warrant a new command line option?

FLAC right now doesn’t do anything because it’s a placeholder for HiFi if that ever gets to GA status.

So this would really be to toggle between OGG and MP3. I don’t want to start an audiophile war — there are enough forums for that — but I hold the not entirely uninformed stance that this might audible on bitrates up to 160 kbps, and exponentially less so above.

ptesarik commented 1 year ago

I didn't want to start any wars either. That's exactly why I'm giving full control to the end user. Then everyone can decide for themselves what they want and in what order of preference.

There might be other reasons for preferring a codec than quality, e.g. that your device has hardware acceleration for only one of them. For example, I can pass through AAC directly to my smart TV, but I can't do that with OGG.

roderickvd commented 1 year ago

Can you successfully get AAC files and decrypt them? Last time time I checked that required Widevine DRM.

ptesarik commented 1 year ago

I see.

FTR librespot cannot currently handle AAC, but it may be possible with additional changes that I haven't even tried yet. In short, I'll need a bit more time to give a definite answer.

roderickvd commented 1 year ago

This PR has been stale for some time now. Do we still see value in this? Have we managed to actually playback AAC or other formats?

ptesarik commented 1 year ago

This PR has been stale for some time now. Do we still see value in this? Have we managed to actually playback AAC or other formats?

Sadly, this project has gone off my radar. Let me retract the pull request for now.