• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

A Raspberry Pi as a music server

rastangineer

Member
Joined
May 25, 2021
Messages
5
Likes
2
Some feedback. I managed to deploy the Logitech Media Server on my existing Raspberry Pi 4, in a Docker container. It sees my music collection on the NAS via a mounted share, and I have the LMS config and playlist folders located outside the container so I can back them up, and won't lose them should I need to re-create the container. I find the playlist editing a little clunky in LMS, so may look at using a Windows-based tool for this.

I enabled the Material skin plugin which is a huge improvement when accessing LMS on my smartphone.

I also enabled both the Airplay and Chromecast Audio plugins. The Airplay one worked straight away, seeing my Yamaha AVR immediately, and I was able to stream FLAC files and radio stations to it.

The CCA - not so much. For some reason it is not visible as a player on LMS. When I click on the plugin's settings link, the page just hangs. I have tried de-activating and re-activating the plugin, and stopping and starting the container, to no avail. I'm not sure what the problem is, however this more motivation for me to get another RPi, a DAC HAT and start playing with picoreplayer and MoOde for my main hi-fi.

Hi,

Would you mind to share your implementations details? Like docker image you used... Another question, my understanding is that LMS is like the player of the music, what are you using as a server? I have used piCorePlayer (which includes LMS), but it's an entire OS and I haven't found a docker image for pcp.

Thanks in adavance!
 

Slot

Member
Joined
Mar 29, 2021
Messages
11
Likes
3
Location
Australia
Sure. So I have a 4GB Raspberry Pi 4, running Raspberry Pi OS, with Docker. I am running 4 containers altogether (Pi-Hole, Portainer, VPN server and LMS). I used the lmscommunity/logitechmediaserver image from the Docker Hub. I have setup the LMS config and playlist folders to be external to the container so that I can back them up.

My understanding is that LMS is the music server. It reads and indexes my FLAC collection which is mounted on the Pi from a NAS file share. LMS then makes that library available to all the players that LMS recognises on the network, but you need a controller to actually direct the music from the server to the player. The controller can be an app (like iPeng for iOS) or the Material Skin running on LMS itself.

I have not yet used piCorePlayer. I use Material Skin on my iPhone to control which music is played where. In terms of players, I have a ChromeCast Audio plugged into my stereo hi-fi (LMS sees the CCA as a player via a plugin), Airplay on my HT AVR (which LMS also sees via a plugin), Squeezelite-X app on my Windows PC, and most recently I repurposed an unused Nexus 7 tablet (Android) by installing the SqueezePlayer app and connecting it to my Bose bluetooth speaker, so LMS now sees the Bose as a networked player too. I also use Material Skin on the same tablet, so it serves as both a player and a controller.

I am very happy with this setup. LMS is a really good piece of software IMO. I can now play different music in different rooms, or the same music throughout. My next step will be to replace the ChromeCast Audio with a decent DAC to feed my old (but still ok) stereo amp and speakers. I guess that I could then use the CCA with another bluetooth speaker to provide music in another room.
 

rastangineer

Member
Joined
May 25, 2021
Messages
5
Likes
2
Thanks for the details Slot, I will try some similar configuration. I would love to have my music server as a container so I can get the most of my rpi4 with other containers running aside LMS.
I already use picoreplayer and LMS but I feel that I can install more apps (with docker) without affecting my music server performance.

Thanks again!
 

rastangineer

Member
Joined
May 25, 2021
Messages
5
Likes
2
Hi Slot, Im re-reading your implementation details, and I just realized the main difference with my implementation is I'm using the rpi4 with a HiFiBerry DAC2 Pro, so the rpi is the server AND the player, I think I need to figure out how to install the player (something like PiCorePlayer) as a docker container on my rpi.
 

somebodyelse

Major Contributor
Joined
Dec 5, 2018
Messages
3,759
Likes
3,066
Hi Slot, Im re-reading your implementation details, and I just realized the main difference with my implementation is I'm using the rpi4 with a HiFiBerry DAC2 Pro, so the rpi is the server AND the player, I think I need to figure out how to install the player (something like PiCorePlayer) as a docker container on my rpi.
The player in piCorePlayer is squeezelite. Why do you think running it inside a container will be advantageous?
 

rastangineer

Member
Joined
May 25, 2021
Messages
5
Likes
2
The player in piCorePlayer is squeezelite. Why do you think running it inside a container will be advantageous?
I've read that only 1 GB, maybe 2 GB max, will be used by picoreplayer, and I'm running it in a rpi4 with 8GB, if I'm able to run the LMS and Squeezelite in containers I would be able to use the other 6 GB that are not being used. I would like to have more apps running in my rpi4 besides my music server. The perfect solution would be to have a dedicated music server, so maybe getting a rpi4 with 2 GB would be ideal, and use the rpi4 8GB for the others apps running in containers.
I also read that HiFiberryOS (I already have the HiFiBerry DAC2 Pro Hat) allows you to run docker containers, but I didn't like the player.
 

somebodyelse

Major Contributor
Joined
Dec 5, 2018
Messages
3,759
Likes
3,066
I'm still not sure why you think docker is necessary for that, particularly the squeezelite part as you'll have to do some nonstandard configuration to get the audio between the container and the host OS. You'd probably be better installing squeezelite directly on a host OS such as Raspberry Pi OS Lite. Whether you install the rest directly, or install docker by following one of the many tutorials, then install the rest as containers, is up to you. You're right that squeezelite and LMS won't need anywhere near all of the 8GB of memory you have available, and are unlikely to tax the cpu, so there's scope for adding other things.
 

rastangineer

Member
Joined
May 25, 2021
Messages
5
Likes
2
Thanks for the suggestion, I didn't know that squeezelite was available as an app for Raspberry Pi OS Lite, definitively I will try it. For now seems like everything is working with LMS and Squeezelite as containers. Thanks for all your help!
 

somebodyelse

Major Contributor
Joined
Dec 5, 2018
Messages
3,759
Likes
3,066
piCorePlayer can play: Spotify connect, Qobuz, Deezer, Youtube, Tidal.

Now! Tidal Connect integrated into piCorePlayer by some users.
Let me guess - another one using binaries ripped from a product firmware image like the previous ones you've posted?
 

aandres_gm

Senior Member
Joined
Apr 15, 2021
Messages
311
Likes
353
Location
Germany
Hi everyone. I had this idea of making a headless music player from a Pi 4 2GB. I want to play my local files, so I thought about having an SSD/HDD inside the Pi case to make it look tidy, and this lead me to the Argon ONE M.2 as the usual recommendation. However, checking the prices, this Argon case is actually quite expensive. So expensive indeed, that I could almost buy the official 7" screen and a case for a similar price, and I could just hide a USB SSD behind the screen.

Now the question, does anyone here have experience with that 7" screen and a case? How's the heat management?
 

RogerM

Member
Joined
Jul 11, 2020
Messages
11
Likes
5
No special heat management needed if PI is just being used as music player. I just gave cheap plastic case, no extra heatsink and don't have any problems...and this is running seven 16k tap FIR filters on the audio data before it is sent to six channel DAC. Zero overheating issues so far.
 

somebodyelse

Major Contributor
Joined
Dec 5, 2018
Messages
3,759
Likes
3,066
Is there some odd international pricing variation? Here the Argon ONE M2 is £42 while the official 7" screen is £60 before you add a case and USB SATA adapter.
 

Tom C

Major Contributor
Joined
Jun 16, 2019
Messages
1,510
Likes
1,381
Location
Wisconsin, USA
Thank you for the tip. That Argon case is pretty nifty. They say they ship globally, and the price shown to me is US $45.
 

threni

Major Contributor
Joined
Oct 18, 2019
Messages
1,281
Likes
1,532
Location
/dev/null
Hi everyone. I had this idea of making a headless music player from a Pi 4 2GB. I want to play my local files, so I thought about having an SSD/HDD inside the Pi case to make it look tidy, and this lead me to the Argon ONE M.2 as the usual recommendation. However, checking the prices, this Argon case is actually quite expensive. So expensive indeed, that I could almost buy the official 7" screen and a case for a similar price, and I could just hide a USB SSD behind the screen.

Now the question, does anyone here have experience with that 7" screen and a case? How's the heat management?

You won't be needing a screen if it's headless. You can SSH to it while you fiddle around configuring it, and use an Android app to select songs.

That case costs more than I paid for my Pi - impressive! I just used a rubber band to connect my pi and HD and hid it behind the amp/dac!
 

amper42

Major Contributor
Forum Donor
Joined
Dec 21, 2020
Messages
1,661
Likes
2,450
For my music server, attaching a good sized USB thumb drive to the RPi4 offered all the storage I could possibly use. No need to pay more for the case. The $16 Flirc case does a great job. https://www.amazon.com/gp/product/B07WG4DW52/

I also stream a lot of content from the MBP using Audirvana 3.5 with UPnP. One trick I found was increasing the memory use in the Moode player MPD options allows the streaming music to cache to RAM. Even if I absent mindedly close the notebook, the Memory in the RPi4 continues playing the song until it's done and no more hissing if I accidentally close the MBP. :D

I love this little box. It's an amazing value. I paid about $100 for a 32GB SD card, RPi4, Flirc case and power adapter and got a powerful UPnP server and the ability to use it as a music server with a USB Thumb drive.
https://www.amazon.com/Samsung-MUF-256AB-AM-Plus-256GB/dp/B07D7Q41PM
 

aandres_gm

Senior Member
Joined
Apr 15, 2021
Messages
311
Likes
353
Location
Germany
Thanks everyone!
Is there some odd international pricing variation? Here the Argon ONE M2 is £42 while the official 7" screen is £60 before you add a case and USB SATA adapter.
The Argon ONE M.2 version is a bit over 60€ and there are barely any cases on the used market. I just found a screen on Facebook, new, going for 50€. The case for the screen is ~10€ and I already have a USB drive I could use and hide behind the screen, to make the setup look tidy.
You won't be needing a screen if it's headless. You can SSH to it while you fiddle around configuring it, and use an Android app to select songs.

That case costs more than I paid for my Pi - impressive! I just used a rubber band to connect my pi and HD and hid it behind the amp/dac!
That was the original idea, yeah. But I couldn't find a decently priced case that's able to hide an SSD/HDD inside (or behind) it. So the screen looks like a more elegant solution, as it adds functionality and is big enough to hide clutter behind it.
 
Last edited:

Barrelhouse Solly

Senior Member
Joined
Aug 13, 2020
Messages
378
Likes
362
Just discovered this thread. I've been using a Pi as a streamer since 2015 or so. Started on a 2B, currently using 4s. It's just a matter of what hardware is easily available for me. For a long time I used Moode. I love the interface, particularly the number of tweaks readily available. In the past couple of years it developed a dislike for my local network and had problems with SD card corruption. I've used Volumio. It plays better with my network although I've run into SD card corruption with both. The network is a very vanilla wireless AC setup with an ASUS router. Signal strength in the rooms where the Pis are is around -50Dbm or better. Volumio's UI looks like something screen scraped from a mainframe application. Things are placed on the screen arbitrarily, seemingly by, "Oh, we've got some room there." Nobody paid any attention to legibility or usability. It only supports things like maintaining queue position through buggy plugins. The best part is its DLNA client ability. It sees my NAS instantly. So does my phone. <G> I don't bother with the MPD database. I've never been able to set up the DLNA client feature on Moode. It dies about half way through building the MPD database and then it disappears.

I started my digital music collection over 20 years ago. I've always used a file/directory system to organize it. I only use tagging when the title or artist tag is blank and the player doesn't use file names. I have zero use for playlists except where I have a FLAC or APE file I don't want to bother splitting. My dream setup is a SMB connection without the (needless to me) overhead of a tag database.

My best experience has been with straight MPD. Since Volumio and Moode are MPD front ends I decided to go with something more light weight. I use M.A.L.P. on Android. Once the database on the Pi is built it's responsive with none of the performance problems I've had with Moode and Volumio. Network performance is just like you'd expect with that kind of signal strength. The down side is learning how to configure it. It's basically one step removed from an API so you have to hand edit the config file and some others to get it to do what you want. It supports most all of the tweaks in Moode and Volumio, including streaming services, through the config file. The obscurity and inconsistency of the config file is standard NIX practice. You have to either memorize a bunch of arbitrary stuff or build a cheat sheet.

I have two Pi 4s going through external DACs via USB. One goes through a Schitt Modi and an old HK receiver and the other goes directly through an Elac amp. Both sound just fine to me. I've also had good luck with various HATs including Hifiberry DAC+, Hifiberry digi, Allo Piano, and several imported knockoffs. I hardly run either amp above 5 watts, bedroom and office, so I'm not pushing anything very hard. The bonus for me is that I can run Raspbian and use the Pis for other things beside being music servers.
 

aandres_gm

Senior Member
Joined
Apr 15, 2021
Messages
311
Likes
353
Location
Germany
Thought I'd provide an update. Yesterday I had a few packages waiting for me at my doorstep after work. Fast forward a couple of hours and I had my Pi-based streamer/server ready. I ended up getting a screen and a cool case that make the whole thing look extremely well. List of parts:
  • Raspberry Pi 4 Model B, 2GB
  • Official Raspberry Pi USB-C power brick
  • 32 GB Micro SD card (had it already)
  • Official 7" Raspberry Pi Touchscreen
  • SmartPi Touch 2 case (ideal, as it doesn't require the screen to be rotated 180°, thus preserving the good viewing angles)
  • Old Toshiba 5400 rpm SATA HDD, 1 TB. Kindly donated by an old laptop I had laying around
  • Sabrent SATA - USB adapter
  • Moode Audio OS
Total cost was around 2 man-hours and 125€ for all the parts. I'm extremely happy with the result, as it works flawlessly and does all I need and even more. I may take some pictures tomorrow to show you.
 

aandres_gm

Senior Member
Joined
Apr 15, 2021
Messages
311
Likes
353
Location
Germany
IMG_1739.jpg


That's how it looks next to the Topping A30 Pro/D30 Pro stack. The case is plastic, yes, but I really like the functionality it provides. Viewing angles on the screen are also pretty decent, especially for the purpose it serves. As I said, I'm very happy with the end-result. Also, gotta add a screen protector to the total cost of the system, as I'd rather keep the screen in a good condition.

Ah, one last thing, Qobuz currently the Summer Music Gifts campaign (?) going on, which is where I got that QJ album.
 
Top Bottom