Suggestions for MPD-centric music streaming?
Apologies, it’s a long one but please bear with me.
I’ve been looking for a music streaming setup for a while now and I can’t seem to find one that would fit my requirements. So I’m wondering if I can get some suggestions on what else I can try.
Let me start by describing my current setup and afterwards I will list my requirements.
Hardware
- Arch Linux main PC - for music at home
- Arch Linux server - for hosting and streaming music
- Google Pixel Android phone - for music on the go
Main PC
Primary source of music files and metadata. It runs a local MPD daemon pointing to a local music dir. I can easily move MDP daemon to my server but have not seen any need for that so far.
Ncmpcpp is by far the best music player I have ever used (vim vs notepad++ situation all over again) and I am not willing to give that up.
Server
A bunch of docker containers, relevant of which being nextcloud, with a separate music dir volume mount on top of main data dir. I run a cron job for rsyncing the music dir from my main PC to the aforementioned music dir on the server.
I use Nextcloud’s Music app to stream the music to my phone.
I also have additional cron jobs running on my main PC to convert all my playlists to a format acceptable to nextcloud, upload them to nextcloud, re-scan files and music on nextcloud via occ and import the updated playlists.
Phone
I haven’t found a good player yet. I’ve only been able to check the ampcache and subsonic API based ones as that is what nextcloud offers. Tempo, Ultrasonic and Substreamer are the ones I am switching between.
Problems
The setup has way more moving parts that it really needs. Because I am syncing from my home user, I want to keep the music dir on the server with the same access rights, no need to involve root when not needed. Nextcloud doesn’t like that. It’s doesn’t play nicely with files that it does fully manage on its own. Sometimes it just looses track of the whole music dir making my whole library to disappear from my phone. I need to trigger another files and music scan for it to come back and it’s becoming very annoying. I’ve also tried to set the volume as external storage within nextcloud but that was even worse. Why not sync directly to nextcloud as a normal person, you ask? Well, I like to keep my media together on disk so I can easily move it to a NAS in the future without the rear of the setup. But more importantly, I like checking out different services and I often mount the same media volumes (music, pictures, books, etc) to different docker containers to check and compare them with the same library. Letting nextcloud manage the files would not allow other containers to modify them. I listen to music primarily via playlists and syncing them now is not only a chore, but is one-way only. If I add a new track to a playlist on phone, it will be overwritten from my main PC.
Requirements
Blockers / deal-breakers
- easily navigate music library on the phone
MPDandncmpcppare staying- sync playlists and music metadata from MPD on main PC or server to my phone
Base (realistically I can compromise on these but would not be happy)
- mount music library as a separate volume so it can be shared with other containers
- sync playlist updates from phone to MPD on main PC or server
- easily download music on phone for offline use (whole album, artist, playlist, single track)
Nice-to-haves
- sync mpd-stats (beets plugin) metadata to phone and update track star ratings
- sync played/skipped count from phone back to beets/mpd-stats
Closing
I have tried to setup mpd satellite streaming to MPD running on the phone, but before I could get it to fully work android update changed some file permission policy and now mod app for Android doesn’t work as it stores the config over there (no clue why it can’t store it in some user dir).
I am currently thinking about just running a separate subsonic or ampcache container eliminating nextcloud from the equation but I am not sure about the capabilities and when I started looking for one I got overwhelmed with choices. That’s when I decided to reach out to others for advice.
Posted Oct 26, 2024, 5:56 PM UTC
Take a look at Mopidy, https://mopidy.com/. I've used it together with Snapcast, https://github.com/badaix/snapcast.
Finally got time to look into this briefly. From what I've read, mopidy is not required if I don't need any streaming services and mpd can work with snapcast just fine.
I did a rudimentary setup of mpd + snapcast on my computer and isntalled the snapcast app on my phone but all I can do from my phone is connect to the active stream from the snapcast server and listed to music from my phone, but I see no way to control playback from my phone - I can only subscribe, unsubscribe to/from stream and change playback volume.
Am I missing something or did I make an unreasonable assumption about mpd/mopidy?