Stream your music everywhere using Beetstream (SubSonic API)

Hi Beets community,
I’ve been working on a Beets plugin called Beetstream that allows you to stream your music on SubSonic/AirSonic compatible apps.

What I did is to re-implement most of the API endpoints needed by SubSonic clients on a flask server that calls the Beets database.

So if you manage your music library with Beets and want to stream it to your smartphone, you can simply:

  1. pip install beetstream (Beetstream · PyPI)
  2. Enable the plugin by writing plugins: beetstream in your config file (~/.config/beets/config.yaml)
  3. Run beet beetstream to launch the server
  4. Connect to the server using one of the supported clients

The code is available here: GitHub - BinaryBrain/Beetstream

Please note that not every endpoint has been implemented. There is still some small features that are missing but overall it works very well. I’ve been using it with different apps for months now.

Currently all tests has been done manually because many apps crash if the requests are not perfectly formatted. If this plugin gets more popular I’ll be happy to code unit tests.

Enjoy listening to your music anywhere!
Best,
BinaryBrain

1 Like

This might be the missing link I need. The phone audio experience is really where you need something like Beets, if you have any extensive library.

The motivation section helps explain:

I tried AirSonic and SubSonic, Plex and some other tools but a lot of these solutions want to manage the library as they need (but I prefer Beets) and AirSonic/SubSonic were quite slow and CPU intensive and seemed to have a lot of overhead just to browse albums and send music files. Thus said, SubSonic APIs are good and implemented by a lot of different clients, so I decided to re-implement the server side but based on Beets database (and some piece of code).

What model Raspberry Pi are you using? I have an Odroid-HC4 that should be RPi-3 level if not RPi-4. Would be nice to apply it here if it’s powerful enough. What CPU/ram usage are you seeing in normal use?

The official subsonic app:

Songs are cached for offline playback.

This might be more convenient than my original design, which was a beet-based compression flow followed by a syncthing sync. Using calliope to build the playlists. (If anyone’s curious, it’s still in the planning phase).