Spotifyd
733 points by fahrradflucht 2 years ago | 231 comments- nzoschke 2 years agoAlways great to see new ways to integrate with Spotify. I think that if you're paying for a Spotify Premium subscription you should be able to stream music wherever you want!
However Spotify doesn't agree. If this is based on librespot its using stuff Spotify doesn't support and could easily shut down for unauthorized clients any time.
Their supported paths are iOS and Android SDKs for mobile, and the Web Playback SDK for desktop [1]. I've been using the web SDK in anger to build a jukebox app [2] and its only so-so.
First, you're under the confines of a web browser which has some pretty big tradeoffs over the experience and system integrations you can build.
Next, song playback works as advertised but there are many things you can't do like introspect the queue or prevent Spotify Radio from kicking in.
The latter is downright hostile to controlling exactly what songs you hear. I assume that always going into auto-recommendation mode is intentional to juice playback stats.
Kudos to spotifyd for offering total control over how and where you stream music you're paying for.
1. https://developer.spotify.com/documentation/web-playback-sdk...
- winternett 2 years agoJust one minor tweak of what plays next can totally rip off independent artists on the platform. We have reached an era where algorithms aren't transparent, so artists like me are bewildered that for all the promoting we do on our own music, we rarely get any views and listens unless we literally spend thousands of dollars on advertising to break the visibility barrier...
For example, if I tweet a link to my own song (hosted on spotify) not only will Twitter potentially block people from seeing the link, their URL shortener may break the link to Spotify (Because the CEO doesn't want traffic leaving Twitter) and then even if the link goes to Spotify, they do a ton of things to siphon listeners that came for my music away from listening to my music, including NOT playing more of my music after the intended song plays. The net result is that hours of promotion as an artist only generates a few leads that often get ushered away from your content... It happens in many other ways for creators, artists, and even businesses without anyone being able to know that it's happening.
The future of being an independent entrepreneur is totally disrupted by social media as it slowly creates a stranglehold on the Internet. If we all don't start acknowledging this and calling out anti competitive practices and platform scams, we'll all be weeded out from being able to make our own living and we'll be forced to work for employers for minimum wages... The Future of the Internet looks grim from where I see it.
- idiotsecant 2 years agoThis is a problem inherent with walled garden social media. Their garden, their rules. Instead of trying to police behavior we don't like in those walled gardens (which is mostly like trying to walk in quicksand) we should be supporting open protocols and systems that don't require a walled garden at all, like the internet used to be.
- hsbauauvhabzb 2 years agoAn open garden cannot compete with Facebook, Twitter or Spotify. We need regulation and legislation which clearly outlines what is and is not okay, while creating black box behaviours that is impossible to navigate.
- marcus_holmes 2 years agoThis. You can always host your own music on your own site. Of course then you need to deal with monetisation and how you actually get paid. But you have control!
Sincerely, as Spotify (and the rest of the streaming services) are forced to make more and more user-hostile decisions to keep their revenue growth curve going up and to the right, it might make sense to jump ship early.
- jeroenhd 2 years ago> Their garden, their rules.
Actually, the EU has passed the DMA which will prevent exactly that for very large (i.e. Facebook/Twitter scale) providers.
I suspect some companies/features may not be available in the EU because of this, but I hardly lament this if it means the garden walls are being torn down.
- cortesoft 2 years agoHow would you make any money as an artist with open protocols?
- hsbauauvhabzb 2 years ago
- ytygg775 2 years ago> they do a ton of things to siphon listeners that came for my music away from listening to my music, including NOT playing more of my music after the intended song plays.
I understand the criticism that it's hard for you to get an audience to notice you. But once somebody has listened to a tune of yours and then doesn't actively seek out more of it ... could it be that they just prefer to listen to something else instead? Competition is toughand it may feel easy to blame it on big tech, but sometimes peoples taste is just not something you can legislate..
- manholio 2 years agoI think listening to an entire song of some unknown artist is a great sign that more tracks should be queued up.
Essentially, that artist generated traffic for Spotify, and Spotify channels that traffic to more known tracks that are more likely to generate conversions to paying customers.
- manholio 2 years ago
- halflings 2 years ago> even if the link goes to Spotify, they do a ton of things to siphon listeners that came for my music away from listening to my music, including NOT playing more of my music after the intended song plays
If always playing songs from the same artists is what people wanted (e.g. lead to more overall listening time), Spotify would 100% do that. You can't pick what a radio station plays next after starting one of your songs, likewise Spotify gets to pick what their users prefer (visibly: not always songs from the exact same artist).
- Timshel 2 years agoI think what people want and what Spotify wants is probably not the same.
I don't have specific knowledge but they probably try to optimize for retention. As such if they concluded that for example discovery is an important part of retention then switching artists might bring less listening time (which is not issue as long as you don't cancel) but more attachment to the platform.
Additionally the way they distribute royalties (as I understand it it's tied to the total of stream not your usage) might have some strange optimization. Like maybe they need to guarantee a minimum for the big player otherwise they might leave or in the opposite maybe they try to drive content away to pay them less and lower their influence.
Note: all of this is random speculation, I have no idea what happens just tried to think of possible use case where what user and Spotify want is not aligned.
- vineyardmike 2 years ago> If always playing songs from the same artists is what people wanted (e.g. lead to more overall listening time), Spotify would 100% do that.
1. This assumes someone has actually A/B tested to see if this works. I would believe no one at Spotify has tried this.
2. What about if other music had lower royalty rates? Doesn't Spotify lose money, so wouldn't they want to pick cheap music?
- robbiep 2 years agoUsers don’t know what they want. This is hugely true of the on-play from spotify or any other service. They’re delivering something that works, but who is to say there aren’t 50 other algorithms that work as well?
- rdtwo 2 years agoI don’t think more listening time is the objective. Spotify is like a gym. They want you to subscribe but then never show up, or only show up for promoted content
- rashkov 2 years agoRadio royalties cost far less than direct plays, FYI
- Timshel 2 years ago
- plasticeagle 2 years agoI feel like promoting your own music has always been a massively uphill struggle, and the successful ones still got there by playing hundreds upon hundreds of shows.
There's a huge element of luck too, who happens to hear you, whether or not you strike some chord with the public in some way. But mainly, it's just hard work. Many artists took a very long time, playing shows in small venues for years, building up local fanbases... and then eventually saw some small measure of success. Many more saw nothing.
I'm hesitant to blame the internet for this. Sure there are some artists who seemed to get plucked from nowhere, and were catapulted to international success overnight. But most, most just worked hard, and got there eventually.
- ohthehugemanate 2 years ago> the successful ones still got there by playing hundreds upon hundreds of shows... it's just hard work.
This is the vision of the music industry we all would like to have. Hard work, pluckiness, some element of luck and "striking a chord" with the public and you, too, can be a success! It is a dangerous fallacy that drives many musicians into the trap the top comment is complaining about.
The reality is a lot uglier.
Ever since large music conglomerates conquered (integrated) the entire promotion/publishing/distribution/sales stack in the 70s/80s, becoming successful in music has been about fighting giants on their home turf. That's AFTER you beat the odds by getting a label A&R person (or the contemporary equivalent) to like you. The markets, gatekeepers, processes, and legal agreements are all set up to screw you, hard, because every one of those is run by a different face of the same multi-billion dollar company with serious lawyer and lobbying budgets, and you're a small entity with no legal budget (and probably no experience).
This was the very successful industry profit model for decades before the Internet, and the generations of executives since then have been focused on regaining that regulatory and legal positioning in the "new industry".
These two famous articles explain the structure of the pre/early internet music indistry very clearly: Steve Albini (famous music producer) wrote "the problem with music" in 1993[1], and Courtney Love "did the math" [2] of how an impossibly good record deal would work out for the artist in 2000. They're enetertaining and interesting reads. Every step along that journey, think of the modern music industry equivalent, and you'll find it is facing (or has already lost) exactly the battle the top comment is bemoaning with Spotify. The large players are working hard to achieve the vertical integration and control they once had, and it is working.
[1] https://mpg.org.uk/knowledge-bank/the-problem-with-music-by-...
[2] https://www.salon.com/2000/06/14/love_7/
I should note: there is no board of shadowy figures out to screw artists. This is natural dynamics of any labor market with a persistent glut. The buyer controls the price, and if it's a market where the sellers are passionate and driven to sell because they believe "it just takes hard work and luck", they will lower the price indefinitely... until they are even taking on predatory debt just to get their product out there.
Please stop spreading the myth that "it just takes hard work." It convinces too many good people to walk into an exploitative industry and thank their exploiters for the screwing. What it actually takes, is relentlessly beating giant megacorps at their own game. Most of the famous ones are actively getting screwed for the privilege of riding on a tour bus. There is a lot that music fans can do to help the musicians they love, and it starts with understanding the musician's fight.
- nigamanth 2 years agoWith the use of easy websites and services to create a song, everyone can create a song. Ultimately, there are 2 factors which make a song "successful":
1. market desire: What are people listening to today? What genres of music are in "demand" right now? 2. experience: If someone who has been learning music theory for the past 7 years and then works on a song, the likely outcome is that the song will sound better than someone creating a song with no experience.
- ohthehugemanate 2 years ago
- ilyt 2 years ago> that came for my music away from listening to my music, including NOT playing more of my music after the intended song plays.
To be entirely fair at least for me in lot of cases I end up adding maybe 2 songs of an artist total to my playlist. Assuming random passerby is going to like rest of your stuff just because they liked one song is a stretch.
- fearface 2 years agoWhat if you link it to a playlist that starts with your song?
- winternett 2 years agoThe platforms always counter your moves. At times I've found that shared links simply don't work, or they divert to a 404 page. It's often hard to figure out what is happening unless you have several different workstations over several different IP addresses.
It would be wild if a YouTuber did some documented video tests on this issue at some point.
- winternett 2 years ago
- kovezd 2 years agoI agree with the problem (getting distribution is not easy), but not necessarily with the solution (calling out anti-competitive practices).
If the problem is serious enough, the capitalist solution would be to develop a platform that solves the problem for independent artists. However, as others have pointed out, the real customers for Spotify are not indie artists but rather paying users, and established artists.
While it is tempting to blame platforms for commercial failure. One has two recognize the truth of the business: making music follows a long-tailed distribution, and ultimately the listeners decide who rips those benefits.
- rnkn 2 years agoDo you not remember high school? Nerds hate artists.
- thatguy0900 2 years agoI've never heard of such a thing, to be honest. Many in my nerd group painted minis and made their own cosplays. It's not like theater kids were in the popular group looking down on us so I'm really not sure what other kinds of artists there would have been in high school
- switchbak 2 years agoThese tired stereotypes aren't true now, weren't true decades ago when I was in school, and were likely never true.
But they work well on sitcoms, is that where you get your perspective on the world?
- thatguy0900 2 years ago
- idiotsecant 2 years ago
- nomel 2 years ago> However Spotify doesn't agree.
My naive assumption is that Spotify would love to, but the record labels don't agree.
- nzoschke 2 years agoCould be.
When Spotify was young they were extremely developer and ecosystem friendly. It gets progressively worse and worse over time.
The biggest change I personally suffered from is when they pulled out of their integration with Djay, a DJ app. This integration was amazing for bedroom DJs like myself, being able to use Spotify to organize DJ music and DJ directly from it. Then they sunset the entire integration.
Now Djay and even bigger apps like Pioneer Rekordbox integrate with Tidal... Do the labels prefer Tidal over Spotify for some reason? Or did Spotify decide to get out of this game for reasons of their own?
- SleekoNiko 2 years ago> When Spotify was young they were extremely developer and ecosystem friendly. It gets progressively worse and worse over time.
This is somewhat tangential, but I feel like this happens often, as internal power and culture shifts away from being developer-driven to consumer- or manager-driven.
This doesn't happen for every company, thankfully.
- humanistbot 2 years ago> Do the labels prefer Tidal over Spotify for some reason? Or did Spotify decide to get out of this game for reasons of their own?
Yes, labels and artists get a bigger cut of the subscription cost from Tidal. And before the buy-out by Square last year, Tidal's parent company was majority-owned by Jay-Z and had lots of buy-in from music industry insiders.
- rrrrrrrrrrrryan 2 years agoTidal was basically a music streaming platform made by the music industry itself to have some leverage in negotiations with Spotify / Alphabet / Apple / Amazon.
It's since evolved into something else, but it's not surprising that Tidal can get some unique deals due to its close industry ties.
- jdrbc 2 years agoI think the integration was initially scrapped due to problems with licensing (streams <30s don't result in a payout, and after that 100% payout; so it's either unfair or expensive under the current model). Good question about why they're leaving the space to their competitors.
- super256 2 years ago> Do the labels prefer Tidal over Spotify for some reason? Or did Spotify decide to get out of this game for reasons of their own?
Me, being a naive speculator: Maybe it has something to do with the time. The original contracts between spotify + labels were probably written 15 years ago. Over time they might have changed numbers like how big spotify's cut is, but never revised the rest of the blueprint contracts.
So, my bet is laziness / not caring enough.
- SleekoNiko 2 years ago
- phpisthebest 2 years agoThat is who they always blame, but it is just a ploy. Like netflix, the dominant player always wants control
Remember when Netflix first started they had amazing API's and all kinds of cool things where built off them, then one day they got big enough and shut them all down, of course they claim it was the "evil industry" that made them do it, but I simply do not believe them, nor do I believe spotify.
This pattern has been repeated over and over since the dawn of the internet, Early Platform is open, and dev focused to bring people in, then over time they wall off the garden to only their apps...
Google, Netflix, Twitter, Facebook, and countless others all follow this pattern.
- neura 2 years agoYour assumption is correct. The record labels are their business partners. Spotify does not dictate the terms while the record labels hold all the popular content.
- ra 2 years agoQobuz and Tidal both have developer friendly APIs. You can absolutely build your own client.
Roon will index either or both of them with your local mp3 library. It decorates with third-party metadata services, and will stream hi-res to almost any hardware device you can throw at it.
- nsteel 2 years ago> Qobuz and Tidal both have developer friendly APIs.
Last time I looked, Tidal didn't offer a public API. They were 100% closed and developer unfriendly. You had to "borrow" their client ID for use with reverse engineered clients. Has this changed? If so can you link to the docs please?
- wkat4242 2 years agoAre there any open clients?
I'm looking for a good music service that plays on my freebsd desktop ideally without using the browser.
Right now I use sootify-qt using spotifyd but it's a bit hit and miss.
- nsteel 2 years ago
- ilyt 2 years agoI guarantee you any company doing what Spotify does would love to cut out the middleman.
The problem is that middleman owns near-everything your users want.
They hold all the cards, they can just say "hey, either you do X or you don't get our music library" and now your customers don't have ~95% music library they wanted.
I'd wager Spotify's reluctance to "just let you listen to fucking music" might be related to that, if it was just API you could integrate with any player you could make indie-only Spotify equivalent that just... uses Spotify API to play whatever is not on it.
- 2 years ago
- nzoschke 2 years ago
- dahdum 2 years ago> I assume that always going into auto-recommendation mode is intentional to juice playback stats.
That’s one of my favorite features, sometimes I’m too distracted driving or doing something else to manage Spotify, but that doesn’t mean I want the background music to stop entirely.
- nzoschke 2 years agoYes it's a killer platform and Spotify app feature.
But for a developer building a custom listening experience it needs to be completely optional.
Right now you literally can't build an experience that plays just one song and stops after because "radio" automatically kicks in. You need to do crazy hacks to pause the current song before it ends or enqueue a silent track and intercept that, if you don't want to occasionally hear a small bit of an unwanted radio song before correcting.
- Jataman606 2 years agoThat’s one of my least favorite features, sometimes I’m too distracted driving or doing something else to manage Spotify and i want my albums to restart from beginning, but then it goes to some radio i don't want. And no, clicking "repeat playlist" button doesn't work because they flip it off randomly.
- nzoschke 2 years ago
- bmicraft 2 years ago> If this is based on librespot
It's built on RSpotify, which describes itself as:
> RSpotify is a wrapper for the Spotify Web API, inspired by spotipy. It includes support for all the authorization flows, and helper functions for all endpoints.
- nzoschke 2 years agoAccording to spotifyd/Cargo.toml is uses both librespot and rspotify.
Librespot is the a level playback client that reverse engineered what the native Spotify desktop apps do to get, decode and play a music stream as a connected device.
RSpotify is a high level client that uses the Spotify Web API which can control what is playing on any connected device.
Neither of which should be confused with the Spotify Web Playback SDK which turns your browser into a connected device provided it supports the right DRM bits.
https://developer.spotify.com/documentation/web-playback-sdk...
- trynewideas 2 years agolibrespot is a dependency: https://github.com/Spotifyd/spotifyd/blob/db25d12d7211bea9cd..., https://github.com/Spotifyd/spotifyd/blob/00f52f983ce0d2162e...
- nzoschke 2 years ago
- EMIRELADERO 2 years agoIs your web app open source?
Maybe this is just me, but I take an issue with projects that use GitHub's community features but don't publish their source code. Feels somewhat unfair.
- nzoschke 2 years agoCurrently not open source but I long have been thinking about open sourcing it.
What's wrong with using GH community features?
It's a side / passion project so no time or budget to build any support or community stuff. I considered GitHub, Reddit and Discord and all have pros/cons.
- EMIRELADERO 2 years agoNothing technically wrong, but GitHub is primarily a code host, the "code place", if you will. So when people use it for issues/feedback its mostly because they have the supporting source on the side.
- EMIRELADERO 2 years ago
- airtonix 2 years ago
- nzoschke 2 years ago
- nigamanth 2 years agoAt the end of the day, services such as Spotify want to make profits too. I guess we can't blame them for not getting carried away and displaying ads on their website.
Greed is possibly the most common human emotion in the world.
- winternett 2 years ago
- harry8 2 years agoI used something different. Basic details for your entertainment/edification/comedy source material follow mostly so you can shortcut a comparison if you're building something at your place.
1) Pi-zero running shairport-sync (couldn't get them, got orange-pi zero 2 which works great) https://github.com/mikebrady/shairport-sync. I have a few of these.
2) Class D amp, Aiyima, Fosi, Loxjie etc Aliexpress is one place to get these. I've used and like Aiyima A03 and their ali store delivers fast.
3) Some nice, high-quality, 2nd hand speakers you like. Wharfedale, JBL, B&W, Acoustic Research, Yamaha. (Or get some active speakers you like and skip #2, eg B&O beolab 6000)
4) owntone (formerly known as forked-daapd) https://owntone.github.io/owntone-server/
5) configure owntone with your spotify premium, takes less than a minute. (And with your music that you own - takes longer because you take more care).
You now have a multiroom setup with fantastic sound that you can control with http://owntone.local:3689/ including with your phone. And/or you can use the "Retune" app on droid and apple's "itunes remote" app on ios. Better sound than most alternatives for less dollars.
All integrates well with Homeasistant because of course it does.
I really like how mine turned out. Having half a dozen sets of speakers all playing the same music in perfect sync as you move from one room to another while doing chores on the weekend fills me with more joy that I would have guessed. YMMV.
- alexanderchr 2 years agoI’ve a similar setup but added a dedicated DAC. Honestly not sure I could tell the difference, only got it because I read the built in DAC is not the best. Could be worth looking into if you care about great sound.
Btw what is the additional value of owntone if you’re already running airplay? Doesn’t AirPlay2 already do multiroom?
- harry8 2 years agoNot sure I understand the question. If you have airplay speakers something has to send music to them? Airplay 1 does multiroom just fine and always has.
Owntone on your local network gives a nice persisten connection to whichever speakers you decided to switch on. The music signal is not being relayed from your phone to the speakers so it doesn't degrade as you move about doing your thing.
You control owntone and tell owntone, enable the speakers in the bedroom, livingroom and deck setting each volume separately and play this m3u playlist of your music, or this album, or this spotify playlist or podcast or whatever to all of them at the same time, synchronized.
Owntone does the job of the apple music/itunes software on a mac (ie the software that ships with a mac laptop to play mp3 files), which does multiroom to airplay 1 speakers. Iphones don't do this and don't do it with spotify. I mean not even an iphone to an appleTV plugged into an amp does spotify reliably. Apple's phone controlling an appleTV box requires constant reboots to function which is enough to stop anybody from using spotify with that setup. Is that intentional? Spotify clearly think so. Doesn't look good but I don't have deeper evidence than these observations of what works and what does not.
Owntone development isn't being controlled by apple for their business interests, eg it does spotify, lastfm and works like apple doesn't in my experience of it with the stuff the devs wanted to work (get involved and hack it to your needs if you have more?) - whatever you think is the reason the apple software not working, it clearly doesn't and owntone does. It works controlled from android, or your laptop, or your desktop, or tablet with the music you want not what apple "allows" or "cares enough to not have be broken" or insert some other excuse (maybe there's a convincing one but I can't think of it).
- harry8 2 years ago
- brazzledazzle 2 years agoDoes this actually keep the audio in sync across different Pis or do you have wire runs across the house for each room’s speakers?
- harry8 2 years agoorange-pi zero 2 boxes attached to wifi or ethernet for input and output to class D amp and speakers, also have to power them. You put the pi's running shairport sync where you want the speakers.
Eg plug the pi into power and the amp, plug the amp into power and the speakers. No other wires.
They all synchronise perfectly over wifi or ethernet, which is the point of shairport-sync. They identify themselves on your network as AirPlay 1 speakers. Note that they actually work with the spotify app directly in a reliable way just like AppleTV doesn't - your AppleTV will require a reboot every time you want it to be the output of spotify. So either I'm a better engineer with off the shelf parts and open source software than apple's full time paid professional engineers or maybe Spotify has a point when complaining about Apple non-competitive behaviour? I wish it were the former but somehow doubt it.
- harry8 2 years ago
- isolli 2 years agoNice, I have a similar setup:
- Raspberry Pi with Max2Play [0] and optional HiFiBerry DAC
- running the LMS squeezebox server (still supported by the community after Logitech discontinued it)
- which supports multi-room audio and AirPlay
- controlled from my phone with iPeng [1]
- with a pair of JBL LSR305 active speakers (and a Mackie Big Knob passive to control the volume and allow for a second source).
- alexanderchr 2 years ago
- kitsunesoba 2 years agoI'm glad this exists, but it's unfortunate that the reverse-engineered librespot that this depends on is necessary, thanks to Spotify backpedaling on their promises of a streaming-capable replacement for libspotify.
- acidburnNSA 2 years agoAfter spotify forbade the last library that could do this, I took spotify out of my mopidy/snapcast whole-house audio system, cancelled my premium subscription, and have spent the same money buying albums in MP3 from Amazon ever since. So far so good.
- bobleeswagger 2 years agoYou guys still don't own your music?
Laughs in Lidarr
- KMnO4 2 years agoSounds like you don’t own your music either.
- bobleeswagger 2 years agoThere's only one way to own it. Work smart, not hard.
- ubercow13 2 years agoNeither in some sense do people who own physical media, eg. a CD.
- bobleeswagger 2 years ago
- stavros 2 years agoAs someone who does own his music, but has Spotify for convenience: What OSS app provides a good experience across my Linux desktop and Android mobile?
I rip my own songs, but I want something that's better than Spotify to listen to it. Then again, I listen to music on my Alexa too, so I think it would be hard for something to interface with that.
- bobleeswagger 2 years agoNavidrome should be plenty, but it's just a subsonic server with a simple web front end. You can use any subsonic compliant client for Android, there's plenty.
I had Navidrome hooked up to my Sonos system as a test. Ultimately you are at the mercy of the walled gardens if you choose to use them, some are free-er than others.
- bobleeswagger 2 years ago
- darknavi 2 years agoWhich front end do you use to listen? I am really digging Plex Amp these days.
- abhinickz 2 years agoI use Jellyfin [0] server on pi with tailscale, So I can access all media anywhere (DLNA also), and I can use DAC for high-res music (Android: USB Audio Player Pro [1]) as well.
[1]: https://play.google.com/store/apps/details?id=com.extreamsd....
- sphars 2 years agoNavidrome (Subsonic/Airsonic server) with Symfonium Android app.
- bobleeswagger 2 years agoSubsonic server with play:Sub as a client. Nice and lightweight.
- nvarsj 2 years agoPlexamp is great. Even has built in EQ so I can use autoeq profiles on iOS etc. Reminds me a lot of Winamp of old.
- anaganisk 2 years agoIf plex amp gets rid of its 1000 songs limit, Im in, too. I am very happy with syncthing+powerAMP setup on android.
- abhinickz 2 years ago
- KMnO4 2 years ago
- acidburnNSA 2 years ago
- yoavm 2 years agoAs an alternative to Spotify - I've been working on TidalFS as a way to mount Tidal like a local filesystem. You can then use literally any music player to play your music as if it was all local files. You can even search.
- nsteel 2 years agoSounds similar to what we had for Spotify before they killed libspotify.
- unsafecast 2 years agoThat's incredibly cool! Really interesting concept.
- pragmatick 2 years agoI use neither tidal nor linux but that is a really cool project!
- nsteel 2 years ago
- musicstealer 2 years agoThis uses librespot for the actual communication with Spotify's servers.
Note that to get it to support Spotify Free, you need to compile a custom librespot with this part of the code commented out, that checks for Spotify Premium: https://github.com/librespot-org/librespot/blob/6dc7a11b09b5...
And then use this with spotifyd instead of the original.
- timetraveller26 2 years agoBut please don't, otherwise you may get the lib killed for everybody.
- anaganisk 2 years agoWell the username checksout for the original commenter.
- anaganisk 2 years ago
- Kuraj 2 years agoHaha I always thought it was Spotify who enforced this requirement on their end
- sbarre 2 years agoI mean, it kind of is..
I think there's an unofficial understanding that if someone puts out a way to access Spotify Free that removes or bypasses the limitations and constraints that Spotify imposes on free accounts, they would summon the lawyers.
- sbarre 2 years ago
- spotifyboii 2 years agothe artists don't even get their royalties when using Spotifyd though
- timetraveller26 2 years ago
- jonas-w 2 years agoWhat i find the most interesting is the zeroconf option [0].
For example you can set up your spotifyd daemon on a raspberry and have it always connected to speakers.
Now when someone is in your local network they can choose your spotifyd daemon and play spotify over the speakers without connecting to the speakers directly via bluetooth etc.
[0] https://spotifyd.github.io/spotifyd/config/File.html (after the configuration file example)
- jegp 2 years agoExactly. And it gets even better if you pair it with a personal voice assistant, like mycroft.ai
"Hey Mycroft, play songs about better software integrations"
- kristo 2 years agoI have this. It’s great except it randomly fails and disconnects or refuses to play. Have tried many updates for multiple years and always the same. I resorted to airplay. Spotify doesn’t want to integrate with others and so the reverse engineered api doesn’t work great
- constantlm 2 years agoI've got a setup where I play photo slideshows on my TV, and also want to play Spotify through my TV/speakers. I've resorted to just spinning up a Spotify webview when the RPI boots XFCE, and it works pretty reliably so far.
- globular-toast 2 years agoI do this with librespot on my always-on Pi running Kodi. Works well. It's the only reason I bother with Spotify. The instant it stops working, I cancel my Spotify subscription.
- davet91 2 years agoFor Spotify Connect on a headless Pi I can recommend Raspotify:
- dicknuckle 2 years agoVolumio does that.
- vladvasiliu 2 years agoYeah, but it's kinda clunky. It also uses the same librespot (or one of the various forks) under the hood.
And now they've also "improved" their default interface with ultra-skinny fonts. Granted, I have a ridiculously bad 1080p laptop screen, but the font is so skinny that I only see colored pixels instead of white.
- dicknuckle 2 years agoI haven't looked at the Volumio interface in years. It's running on a Pi inside an old boombox, and in a VM on the PC in my garage with a USB sound card passed through.
I exclusively use it for Spotify Connect like I would a Chromecast Audio (if I had one).
- dicknuckle 2 years ago
- vladvasiliu 2 years ago
- jegp 2 years ago
- slondr 2 years agoHi, I'm one of the spotifyd maintainers, happy to answer any questions people have - though I'm coming to this thread awfully late...
We recently cut a new release for the first time in over a year, which is very exciting for all of us (and I'm guessing why the project has been submitted here now :D)
- ponco 2 years agoIs there an existential threat looming? Could Spotify make an API change that would completely break libespot and Spotifyd? Any insights as to why/why not that might be likely?
Also, any plans to add the ability to save the tracks that are streamed? (for e.g. offline playback or for exporting to mp3 etc.)
- slondr 2 years agoI don’t think so; we’ve never had a regression related to the Spotify api that I’m aware of. I know librespot has big plans in the near future to switch to a newer version of the Spotify api so I think we’ll be good for now.
Definitely no plans for saving tracks.
- nsteel 2 years ago> Also, any plans to add the ability to save the tracks that are streamed?
I hope not. Sounds like a great way to provoke Spotify into a breaking API change.
- slondr 2 years ago
- anonomousename 2 years agoDoes the team plan to have an official Windows release? I’m using an older version and with a few changes, was able to create a fork for windows. It works fine for my purposes but was wondering if it was ever considered.
- slondr 2 years agoThere was an open MR to add windows support for awhile but I think it fizzled out due to lack of OP interest.[1] None of the maintainer staff use Windows, but a working PR that doesn’t cause any regressions would likely be accepted.
- slondr 2 years ago
- spotifyboii 2 years agoany ideas to add reporting playback to spotify servers? it isn't fair if you ask me? you're forced to use premium but you are not even helping the artists
- ponco 2 years ago
- suprjami 2 years agoHave tried this several times but I find it drops off the network as a remote play device.
If you have a PC with the Spotify app running, that appears as a remote play device to other clients.
Otherwise I found ncspot to be more reliable than spotifyd: https://github.com/hrkfdn/ncspot/
- vladvasiliu 2 years ago> If you have a PC with the Spotify app running, that appears as a remote play device to other clients.
The issue I've found with the PC setup, which I've been using after being somewhat unconvinced by Volumio, is that for dynamic playlists, the clients don't seem to agree on the contents. I have to manually go load the playlist on the player PC so that when the songs advance I can see it on my local computer. The player PC only does that, so I never interact with it.
- bmicraft 2 years agoI've used it for over a year but never that issue. Works perfect for me
- 2 years ago
- vladvasiliu 2 years ago
- jamespullar 2 years agoOriginal discussion: https://news.ycombinator.com/item?id=16603886
- jez 2 years agoIn the past, another tool I’ve used is this bash script that interacts with Spotify over dbus:
https://gist.github.com/wandernauta/6800547
It’s nowhere near a fully featured Spotify client, but for little scripts or UI things where I just want to see the current song it’s pretty lightweight and already works with the Spotify app I have installed (obviously this means it has a different end goal in mind than Spotifyd).
- mariusor 2 years agoIf you're interested in a better version of that I have a project that works with all players that support the MPRIS DBus interface: https://github.com/mariusor/mpris-ctl. I'm using it for keybindings to play/pause and show song information with a tiling windows manager.
- mariusor 2 years ago
- MrGilbert 2 years agoI‘m kind of amazed that this is still working. I would have thought that Spotify is rather strict with their eco system.
I was always interested in their techstack, and how everything works on their end, but unfortunately I'm not into Java, which is the reason I never applied for a job there.
- svnpenn 2 years ago> I‘m kind of amazed that this is still working.
this is why:
> Spotifyd requires a Spotify Premium account
which is actually not true. you can change some code in the source, to allow playback on free accounts. Spotify hunts down anyone who posts code like that though
- disintegore 2 years agoIsn't there a better way to do this? Rate limiting, splicing ads into the audio signal for non-paying users, providing a stable API for paying users only, etc. Beats siccing your lawyers on hapless geeks.
- Godel_unicode 2 years agoPeople following instructions to dodge paying by commenting out the payment check code are hardly “hapless geeks”. Nobody does this by accident.
- bmicraft 2 years agoSpotify has a stable api for free users too (as can be seen by devices sold with that capability, it just isn't public). Splicing and rate limiting would clash with caching I would imagine
- trasz3 2 years agoSure there is - peer to peer. Spotify, and music streaming in general, is useless from technical point of view, thanks to cheap storage.
- Godel_unicode 2 years ago
- encryptluks2 2 years agoI had no idea that was possible. Will be Googling for this later today. Thanks Google!
- disintegore 2 years ago
- svnpenn 2 years ago
- Ziggy_Zaggy 2 years agoMaybe I'm missing something but why don't more ppl just built their own (web-based?) media player and drop-in mp3s and mp4s...? It's not that difficult and is easily hosted on a server available anywhere behind a basic authenication gate. This solutions is esp. useful if you have any NAS setup.
What's the rationale for not building homebrew media players instead of railing against Spotify...?
- donkeyd 2 years agoSo I need to purchase the MP3's in order to do this? Then I need to spend time on other web sites for music discovery?
This would work if you almost never venture outside of your existing music catalog. If that's you, it's probably also a better financial decision to just purchase your own music in stead of 'renting' it.
According to my 'Wrapped' I listened to 4600 different songs this year, from 3000 artists. Most of them I discovered because of Spotify. So for me, Spotify is very much worth it and I would not be able to self host anything to give me near the value that Spotify adds. And I can't even contemplate pirating all these songs, since I find that morally wrong because the paid services (for music) are decently affordable and provide good value.
- RunSet 2 years ago> So I need to purchase the MP3's in order to do this?
Aye, aye.
> Then I need to spend time on other web sites for music discovery?
One cost of cultivating tastes, as opposed to being fed by a recommendation algorithm, is the risk of possibly hearing music you might not like, as well as the time required spent doing so.
There are open-source music recommendation algorithms but having survived radio payola I consider that approach a step backward.
> This would work if you almost never venture outside of your existing music catalog.
I favor bulk music downloads (more than I could ever listen to) and randomized playlists, but then, I may have a higher tolerance for my tastes not being pandered to.
> I can't even contemplate pirating all these songs,
Seems to me that you are doing precisely that.
> since I find that morally wrong because the paid services (for music) are decently affordable and provide good value.
Wait, you find it morally wrong to infringe copyright (a specious proposition in any case) because the paid services are affordable? What is the price point that makes piracy moral, then?
- donkeyd 2 years ago> Aye, aye.
Honestly, at about €1 per MP3 (which is on the low end, looking at Beatport), I couldn't afford listening to the amount of different music I do now.
> fed by a recommendation algorithm
As opposed to being fed by the maintainer of some web site?
> I may have a higher tolerance for my tastes not being pandered to
> Seems to me that you are doing precisely that.
> What is the price point that makes piracy moral, then?
To me, your entire comment feels incredibly snobby. It's like you see people who use streaming services as lesser people, just because they use a different way to listen to music. It also feels like that opinion is based on an incredibly limited assumption of how people use streaming services.
- donkeyd 2 years ago
- RunSet 2 years ago
- tandav 2 years agoI use https://github.com/navidrome/navidrome and it’s great
- jafingi 2 years agoFor me it's not about the playback. It's about curated playlist, suggestion and discovery.
And especially Spotify does this extremely well.
- speedgoose 2 years agoWell, you need mp3s and mp4s to drop. Spotify and similar are more convenient than downloading music in various places (legal or not), to rip CDs, or to digitalise your analog audio (tape, vinyls,…).
- donkeyd 2 years ago
- muppetman 2 years agoThis is why I bought 5-6 Chromecast audio devices before they got nuked - they do exactly this (and other streaming services).
Yea it's tied somewhat to Google, but it's a simple easy to deploy puck that just works.
Not to suggest the hard work that's gone into this isn't awesome, because it is!
- fb03 2 years agocan we get the same behavior on windows or linux computers? I have an Youtube music premium subscription and would like to control my computer which is connected to a very beefy set of speakers from my cellphone's youtube music client.
- fb03 2 years ago
- eloop 2 years agoQuestion - do any of the other streaming services have better Linux support?
- bentt 2 years agoI thought this died with Spotify’s nerfing/killing of API access. I had a project going with Mopidy which relied on it that I just dusted off the other night after a year and it wouldn’t authenticate. Kept saying “requires Premium account” despite my account being Premium.
- dropofwill 2 years agoThis uses librespot, not the original library that Spotify published and recently killed. Mopidy is also moving to librespot, but it's complicated with their gstreamer architecture (though I believe its mostly functional at this point).
- slenk 2 years agoCan't wait for mopidy to switch over - I have "Pirate Audio" PI hats that work are based around mopidy and I am not clever enough to figure out how to use the LCD screen with others.
- nsteel 2 years agoHolidays are coming which means free time is coming! Hoping to finally get this fixed up and released.
- nsteel 2 years ago
- slenk 2 years ago
- dropofwill 2 years ago
- iJohnDoe 2 years agoKind of off topic. Can someone recommend a way to backup liked/favorite songs from Spotify? Simply a text based list would be great. Thanks.
- wohfab 2 years agoDidn't test myself, but a quick google search reveals: https://soundiiz.com/tutorial/export-spotify-to-text
- Toreno96 2 years agoI believe you can use Spotify API [^1] to get that list and then reformat it in any way you would prefer and save it to a file.
Actually, I have this on my TODO list for a long time, maybe someday I'll finally implement it.
[^1]: https://developer.spotify.com/documentation/web-api/referenc...
- blur13 2 years agohttps://watsonbox.github.io/exportify/
You might have to copy all your liked/favorites to a regular playlist for it to show up.
- wohfab 2 years ago
- matthew-wegner 2 years agoSome other setups already in the comments, but to chime in with my own:
I gave up on 3rd party things. My automation VM includes a GUI environment, and I run the official Linux Spotify client. The only way my setup can break is if Spotify gives on Linux entirely.
Snapcast[1] transmits two streams to 7 different speaker setups:
When TTS plays on the first stream, music volume is ducked for the duration. That setup is all pulseaudio junk. I could actually play any system audio to my entire house, or even provide an 3.5mm aux input near the VM host, although in practice I stick to Spotify for convenience and the ability to use the clients on any machine to control everything.* Music + text to speech * Just text to speech
Speakers in some rooms turn on/off completely with the room, while others stay on but toggle between music and text-to-speech, to make sure I hear those notices (which are like doors opening, washer is done, etc).
My main work setup has a snapcast client, so I hear TTS events even with noise canceling headphones on. Some snapcast clients are placed on existing machines (i.e. TV computer), while a few are dedicated Raspberry Pis.
- tjoff 2 years agoThat sounds quite neat, however, this only works for your (spotify) account, right?
The appeal of spotifyd from an end-user perspective is that anyone on the network can control it.
- matthew-wegner 2 years agoI'm pretty sure all Spotify clients also act as "Spotify Connect" targets. Anyone could use it (also I could run an Airplay target on it, but I don't bother)
- tjoff 2 years agoOnly if it is logged in to the same account.
- tjoff 2 years ago
- matthew-wegner 2 years ago
- tjoff 2 years ago
- digitalsushi 2 years agoI've been using this fork of rune audio called rAudio-1 (rern/rAudio-1 on github). I figure both have had spotifyd integrations, so I'll just blanket them both for this thoughtful inclusion.
I keep an old raspberry pi with rAudio-1 running under my desk, with a nice 60 dollar DAC HAT, that runs into a small amp with 2 rca cables, and then into speakers.
Generally I keep it playing a private shoutcast running music from my nas, but having spotifyd means I can interrupt it with anything I was just listening to on my phone - in the car, mowing the lawn, etc.
The continuity without the hassle is the kind of thing tech promised long ago. If it could make it one more step, the gap would be gone ... I should be able to just have all this software talking to each other, and knowing where I am, and playing automatically to whatever seems best, but the interoperability between them keeps it 1 foot from perfection.
- edge17 2 years agoCould someone please explain to me why this is cool/useful? I'm not a huge spotify user. Is the idea that I can set up the daemon on a networked computer in my home and then have it stream to speakers around my house?
- groovybits 2 years agoIts an unofficial Spotify client for nix-based systems.
I suppose its cool if you run a riced nix environment, and you only want command-line tools. Or its cool for people who don't want to run the dedicated app or browser version.
In my experience, having tried a few different clients in the past, they sometimes fail due to changes on Spotify's side. I don't know if that situation has changed in the past few years.
- groovybits 2 years ago
- odiroot 2 years agoSpotifyd is good to have considering Spotify deprecated and cut off the C library, thus breaking for example mopidy.
Unfortunately the MPRIS interface works weird. For example it didn't let me change the volume.
On top of that spotifyd seems to sometimes get "split brain" where it continues playing but I can't control it from my phone (Spotify Connect). My phone instead wants to play locally. Which is weird because Spotify normally only lets you play only from one device at the same time.
- sandos 2 years agoThis split thing happens all the time with the official android client in combination with google home speakers in my experience.
- sandos 2 years ago
- blacklight 2 years agoToo little, too late.
I've been struggling with Spotify's messed up developer experience for years. They deprecated libspotify years ago without an alternative, promised an upcoming alternative for years, and they eventually pulled the plug last year without even bothering to provide an alternative.
I've tested Librespot in the meantime, but it proved too cumbersome to configure and use as a non-standalone executable.
In the meantime mopidy-spotify (the project I've used for years on my RPis) has gone all the way to adding a Docker image just to support Librespot and the whole Rust environment that is required to build it. And, of course, it's not guaranteed that these projects will survive - Spotify can easily snap their fingers, change their API in a breaking way, and we're forced to play a catch-up game again. They have already done so in the past.
I therefore decided that a company that doesn't value my consumption use-cases, doesn't bother for the time I waste to adapt to their changes, and has a bad record of developer experience, is not worth my money. I wish the best of luck to the guys behind spotifyd, but I'm personally done after 10 years of chasing Spotify.
I've moved to Tidal in the meantime. It's still far from perfect, it still lacks an official Linux client and it's more buggy than Spotify. But at least there's a reversed engineered web API that so far they haven't bothered to fight nor change. And that's really all I need to build my music experience.
- unmole 2 years agoIs there something similar for YouTube music?
- hedora 2 years agoI've happily moved on from Spotify.
Has anyone produced similar (and working) alternatives for Tidal (or Sonos S1/S2)?
- SparkyMcUnicorn 2 years agoI used this at one point. Might give you what you're looking for.
- SparkyMcUnicorn 2 years ago
- Daunk 2 years agoHas anyone ever gotten this to work?
I must have tried it a dozen times by now, but never once gotten it to work.
- dcminter 2 years agoYep, I have it running on a couple of Raspberry Pi and it works well. I hacked up one librespot on one of them to spit out track names in the event hooks so I could show them on an eink display hat!
- vehemenz 2 years agoYep. I just installed it on macOS via Homebrew. Took about 5 minutes to get set up.
- top_post 2 years agoI was in the same boat - I can't remember the exact issue now - but I had to both compile locally and revert back to an older version for it to work. There were issues on Github relating to my exact problem but I can't find them now. Currently running 0.3.3 as my daily driver, no issues.
- dicknuckle 2 years agoUse Volumio. It works better as a Spotify music receiver than my Google Home mini ever did.
- dcminter 2 years ago
- 2 years ago
- ChrisArchitect 2 years agoMore discussion on the original Show HN from the author when this was new 5 years ago:
- cramjabsyn 2 years agoHas anyone integrated this with airplay successfully? I would love to be able to use spotify connect to stream to my airplay speakers without leaving a phone or laptop engaged
- nsteel 2 years agoI've never used this (no airplay devices) but I think owntone can do this.
- nsteel 2 years ago
- benhurmarcel 2 years agoSounds similar to https://github.com/dtcooper/raspotify
- vvoyer 2 years agoCan the Spotify Daemon play "Highway to Hell"?
- slondr 2 years agoprobably, yeah
- slondr 2 years ago
- jesvschrist 2 years agoGreat project; I use spotifyd every day. It just works
- avinassh 2 years ago
That's interesting. I wonder why this would be causing an issue> Common issues > The device name cannot contain spaces
- pimlottc 2 years agoIs this an official project of Spotify? At first glance, it’s hard to tell. If not, I’m surprised they are allowed to use that name.
- jrm4 2 years agoHonestly -- just why?
We now have a few years of experience with music streaming. And what we've learned is that -- sure, it's convenient -- but honestly hasn't much improved the lot of artists and musicians. It's a new exploitative system that's perhaps slightly better than the old exploitative system.
We can do better. Literally, locally, and for friends. I used to do MPD, but now I'm glad for things like mstream that make this sort of thing even easier. I hope funkwhale and other federated things do better as well.
- civopsec 2 years agoWhy are people using a streaming service instead of buying thousands of dollars worth of CDs (or for that matter, iTunes)? Is this a question?
- jrm4 2 years agoThis has never been the dichotomy; but now that you mention it -- actually, yeah. I'd rather spend thousands of dollars on CDs (in that environment where shopping for them was like it used to be) than iTunes (etc., which I've tried but never found worth continually paying for)
- rblatz 2 years agoThere are still music stores, nothing is stopping you from buying music like we did before Napster let the cat out of the bag. People are allowed to have different utility functions and preferences, sorry yours seems to be going out of fashion.
- rblatz 2 years ago
- jrm4 2 years ago
- dtx1 2 years agoMeh, I always pirated music before Spotify. Then I got a free test account and now am a happy paying customer for forever. As soon as someone with a reasonably similar library and better linux integration than a half abandoned electron app comes along i'll switch.If Artists feel so bad about they should form a union and collectively bargain for a better position.
- iamacyborg 2 years ago> If Artists feel so bad about they should form a union and collectively bargain for a better position
They can't, major record labels and major artists are working with Spotify to fuck everyone else.
- iamacyborg 2 years ago
- Bluecobra 2 years agoI'm sure someone will find a use case for this. For example, a long time ago I hooked up a Raspberry pi to my receiver/speaker system and used mplayer to keep a persistent connection to a remote Internet radio stream. Whenever I wanted to listen to it, all I need to do was turn on my receiver and select that audio interface.
- nyx_land 2 years agoThe fact that this is receiving downboats and 'but muh convenience, artists deserve to get fucked over because Spotify found a better way to exploit human psychology!' is truly an orange site moment. I pirate the majority of the music I listen to (and most artists except for super rich mainstream ones would rather their music spread as much as possible than receive literal pennies from a Spotify stream) and buy stuff from Bandcamp when an artist is actually still around and making stuff. I never listen to ads and have all the files saved locally in lossless formats. I've never had a Spotify account for anything other than a podcast that is exclusive to it and have never cared to switch, and can't even use the excuse that I'm too old and stubborn in my ways.
- richwater 2 years ago> but honestly hasn't much improved the lot of artists and musicians
As a consumer of music, why is this my problem?
- iamacyborg 2 years agoThis is a rhetorical question, right?
If you consume music then surely, you want the artists and musicians you support to be paid fairly for their work.
- yamtaddle 2 years agoI prefer a world that supports artists to one that doesn't, but from a purely selfish perspective, there's already so much recorded music that I do love or will, if/when I eventually discover it, love, that I wouldn't run out of novel, great material that's to my taste, in two lifetimes. There are whole major genres I've barely even touched so far.
The effect on my lifetime QOL would be basically zero if no new commercial music were created ever again.
- meltedcapacitor 2 years agoBetween dead artists and art-for-art-sake artists we're not gonna run out of stuff to listen to, even if intellectual property was abolished tomorrow morning (as it should be). It only works for the 1 percent at the top anyway (due to power law distribution).
- strken 2 years agoCan you or jrm4 explain why Spotify's royalty system (a 70/30 split in favour of the rights holder) is unfair?
If I had to guess I'd say it convinces artists to license their work for less money than they'd make if they stuck it on Bandcamp, but I'm not certain, and neither of you has explained it.
- civopsec 2 years agoWhy is that “surely”?
- yamtaddle 2 years ago
- fullshark 2 years agoPotentially great music is not being made as a result of people not devoting time and energy to the craft I guess. Also just general empathy.
- civopsec 2 years agoYou guess?
Music is like the last thing that will stop being made because people can’t professionalize their craft.
- civopsec 2 years ago
- iamacyborg 2 years ago
- civopsec 2 years ago
- gigatexal 2 years agothis + a good TUI is likely to get me to subscribe to spotify premium. Does anyone know if there's a good TUI front end to YouTube music or Apple Music to save me an additional subscription (I already sub to Apple Music via a family share thing and Youtube Music because of Youtube Red/Premium).
- salusinarduis 2 years agoThis is probably a forbidden subject but is it possible to download raw mp4/whatevers with this somehow?
- Ziggy_Zaggy 2 years agoOther tools exist that serve that purpose.
- slondr 2 years agoThat is not possible, no.
- Ziggy_Zaggy 2 years ago
- wingworks 2 years agoWhat exactly does this do once installed? Do I need another client to connect to it to play music?
- Samyak1 2 years agoThis is great and a real problem I've felt.
- 2 years ago
- spotifyboii 2 years agothe artists don't get their royalties when using Spotifyd
- 2 years ago
- npigrounet 2 years ago