# Stream your music everywhere using Beetstream (SubSonic API)

**URL:** <https://discourse.beets.io/t/stream-your-music-everywhere-using-beetstream-subsonic-api/2104>\
**Category:** Show and Tell\
**Created:** [June 14, 2022, 4:57pm UTC](https://discourse.beets.io/t/stream-your-music-everywhere-using-beetstream-subsonic-api/2104 "2022-06-14T16:57:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![BinaryBrain](https://avatars.discourse-cdn.com/v4/letter/b/9fc348/32.png) [@BinaryBrain](https://discourse.beets.io/u/BinaryBrain)\
**Post date:** [June 14, 2022, 4:57pm UTC](https://discourse.beets.io/t/stream-your-music-everywhere-using-beetstream-subsonic-api/2104/1 "2022-06-14T16:57:31Z")

</div>

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](https://pypi.org/project/Beetstream))
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](https://github.com/BinaryBrain/Beetstream#supported-clients)

The code is available here: [GitHub - BinaryBrain/Beetstream](https://github.com/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

---

<div class="post-metadata">

**Author:** ![RollingStar](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.beets.io/rollingstar/32/728_2.png) [@RollingStar](https://discourse.beets.io/u/RollingStar)\
**Post date:** [July 6, 2022, 2:50pm UTC](https://discourse.beets.io/t/stream-your-music-everywhere-using-beetstream-subsonic-api/2104/2 "2022-07-06T14:50:09Z")

</div>

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:

> **[GitHub - BinaryBrain/Beetstream: Beets.io plugin that expose SubSonic API...](https://github.com/BinaryBrain/Beetstream#motivation)**
>
> Beets.io plugin that expose SubSonic API endpoints, allowing you to stream your music everywhere. - GitHub - BinaryBrain/Beetstream: Beets.io plugin that expose SubSonic API endpoints, allowing you...

> I tried [AirSonic](https://airsonic.github.io) and [SubSonic](http://www.subsonic.org), [Plex](https://www.plex.tv) 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](https://github.com/BinaryBrain/Beetstream#supported-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).
