Jump to content

Raspberry PI 4 As An Audio Streamer


Kevin Bresnahan

Recommended Posts

Sorry - I am an engineer. I sometimes write wordy posts. If this is TLDR, I won't mind if you skip it.

For the past 4 or 5 years, I've been using an old HP laptop running Linux Ubuntu with an external hard drive that has my music library (in VBR mp3 format) on it with playback via the GMusicPlayer app. While I do like this setup, it is rather inconvenient. I have to boot up the PC, turn on my TV, switch to the HDMI input to bring up the PC desktop, grab the wireless keyboard & mouse, make sure the laptop is set to output the audio via the line out (not via HDMI) and then I click through my library to find music to play. To make matters worse, my daughter's rescue dog is fascinated by the mouse moving across the screen, so she whines and barks the whole time the TV is on.

Lately, I've been intrigued by the new(er) Raspberry PI 4 "mini PC" (RPI for short) for use as a digital music streamer. Looking into it, I can use this mini PC without any DAC, as my Marantz PM-7005 integrated amp has a USB input for it's built-in DAC. It even comes with an Ethernet port and WiFi built-in. It really is a mini PC.

I ordered an RPI 4 card (4GB version) for $68.91:

41SCYf1QTVL._AC_.jpg

a Fliirc case (best thermal case out there) for $15.95

Product Review: Flirc Raspberry Pi 4 Case - IoTRant

A generic 5.1 V, 3 A USB-C power supply with built-in on/off switch ($9.99)

Smraza Compatible with Raspberry Pi 4 Power Supply with ON/Off Switch, –  smraza

And then, just in case, I ordered a mini HDMI to HDMI cable so that if I have to, I can use this with my TV. Maybe even just to make set-up a little easier. It was $11.99.

My music is stored on a 1 TB Samsung T7 SSD external hard drive. It's one of 3 that I use. I have 2 others as backups for my backups. I have to have backups with so much music on there. I cannot lose this library as it would take years to recreate.

I am planning to run the RPI 4 with a Moode Audio operating system and control it using my Android (Samsung Galaxy S7) phone to access & play my music. I already flashed the Moode Audio operating system to a Micro SD card I had in my pile of memory cards. I may eventually switch over to have it boot from an external SSD hard drive due to longevity concerns with micro SD cards. I'm going to run a USB cable to my DAC input on my Marantz so no DAC card needed for the RPI. If I needed a DAC, I'd look at either a HiFi Berry card or a Allo Boss card.

My expectation is that I'll be able to turn on this RPI mini-PC, turn on my Marantz amp, set it to the external DAC input, open the app on my phone and be playing music in seconds (with no dog barking in the background).

Fingers will be crossed. :)

BTW - if someone wants a more "turn key" RPI media streamer, this (rather ugly IMO) Allo Boss2 player is supposed to sound great and comes ready to go:

https://www.allo.com/shop/2716-thickbox/boss2-player.jpg

BTW II - if you stream audio, this setup works well for that too. In fact, more people use this set-to to stream music from places like Spotify, Qubuz & Tidal than from an external hard drive like I will be doing. As I said, it has hardwired or wireless internet connections.

If this works, I am planning to build another for my office at work. The company I work has employed software that encrypts all external media and this encryption software corrupts my music files (Digital Guardian is shit software).

Link to comment
Share on other sites

bresna,

Sounds like a great set-up.  Please keep us posted on how it goes!

Like you, I have all of my (digital) music backed up on a couple external hard drives.  My solution for playing the files has been to transfer them to the 400 GB micro-SD card on my mobile phone.  (Not all of the files fit on the SD card, but I can load up more than 3,000 albums.)

Then I can play the files via Bluetooth in my car or on my portable Bose speaker (often out on the back porch).  I even got a little device that allows me to stream music through my "regular stereo system" via Bluetooth.  This approach keeps things relatively simple -- but, of course, I'm losing a little bit of AQ by going wireless.

It's always interesting to hear how folks are adapting to the new, myriad ways that we can listen to music.  :) 

 

Link to comment
Share on other sites

bresna,

Interesting topic.  Earlier this year I set up a NAS on an old tower to use, in part, as a music server.  I use Open Media Vault as the NAS OS.  I store the music files on the NAS on a 500gb hard drive. I mapped a network drive for the NAS folder with my music files on my laptop.  I use the Musicbee application on my laptop to organize the files, which are outputted through my laptop's speakers or through its RCA jack. 

My set-up is NAS--->Laptop-->Amp--->Speakers.   I am interested in removing the laptop directly from the audio chain.  Do you know whether I could access the music files on my NAS, which is storage, using the RPI and then output audio directly from the RPI to a DAC while using my laptop to access and play music?

Link to comment
Share on other sites

14 minutes ago, sonnyhill said:

bresna,

Interesting topic.  Earlier this year I set up a NAS on an old tower to use, in part, as a music server.  I use Open Media Vault as the NAS OS.  I store the music files on the NAS on a 500gb hard drive. I mapped a network drive for the NAS folder with my music files on my laptop.  I use the Musicbee application on my laptop to organize the files, which are outputted through my laptop's speakers or through its RCA jack. 

My set-up is NAS--->Laptop-->Amp--->Speakers.   I am interested in removing the laptop directly from the audio chain.  Do you know whether I could access the music files on my NAS, which is storage, using the RPI and then output audio directly from the RPI to a DAC while using my laptop to access and play music?

I think you could access the NAS with the RPI. It has network access like any PC and you can also make it a WiFi hotspot if you wanted to connect it directly.

I thought about hooking up one of my external SSD drives to my D-Link router as sort of a "half-assed NAS", but that would still require a PC. Turning on the PC every time I want to play some mp3s is a PIA. I have a Roku on my TV and I often find myself using the Sirius/XM app with the TV speakers before going through the trouble of booting the whole PC setup.

I also have a large micro SD full of music on my Samsung Galaxy phone and I use that out on the back deck with a little Bose Soundlink Color II blue Tooth speaker. But the sound is just eh - or, in other words, "Good enough for sitting on the back deck sipping a drink". :)

If that Allo Boss2 wasn't so damn ugly, I think I would've gone for one. Their DAC cards are supposed to be the best. Unfortunately, to get that "best" sound, you need to buy a $150 dual power supply. Ouch. If I got the Boss2, I think I would've just gotten the single supply and taken the small hit in SQ.

Edited by bresna
Link to comment
Share on other sites

I use two Raspberry Pi 4s for my music streaming. I have one that is solely for running a bubbleupnp server, which allows me to access my music server over the internet, anywhere, and a second one that is dedicated to running JRiver Music Center as a DLNA server. Both work perfectly, I have had no problems with either unit at all. Probably cost me about $40-60 or so for each one, with the associated micro SD cards, cables, and a little bluetooth keyboard that allows me to more easily control the JRiver from my laptop instead of having to go through wired connections.

Link to comment
Share on other sites

8 minutes ago, GregK said:

I use two Raspberry Pi 4s for my music streaming. I have one that is solely for running a bubbleupnp server, which allows me to access my music server over the internet, anywhere, and a second one that is dedicated to running JRiver Music Center as a DLNA server. Both work perfectly, I have had no problems with either unit at all. Probably cost me about $40-60 or so for each one, with the associated micro SD cards, cables, and a little bluetooth keyboard that allows me to more easily control the JRiver from my laptop instead of having to go through wired connections.

I've read a few stories of people having their micro SD cards dying after a year or two. It seems to be a good idea to boot from an external SSD instead of a micro SD. Are you considering this? I am actually thinking about formatting a second micro SD with a Volumio system image so that I can compare Volumio & Moode as well as having a backup ready in the case of failure.

I've wanted to go with JRiver for years but I just can't justify the cost. There are so many free player apps. I suppose if I wanted to use JRiver's ripping capabilities, it might be more worthwhile, but Exact Audio Copy has served me well for years.

Link to comment
Share on other sites

6 hours ago, bresna said:

I've read a few stories of people having their micro SD cards dying after a year or two. It seems to be a good idea to boot from an external SSD instead of a micro SD. Are you considering this? I am actually thinking about formatting a second micro SD with a Volumio system image so that I can compare Volumio & Moode as well as having a backup ready in the case of failure.

I've wanted to go with JRiver for years but I just can't justify the cost. There are so many free player apps. I suppose if I wanted to use JRiver's ripping capabilities, it might be more worthwhile, but Exact Audio Copy has served me well for years.

I'm not worried about my cards dying, as I only have the basic raspberry Pi OS (whatever it's called) on one and I could just easily put it on another card. My second Pi, that runs the JRiver Media Center from a micro SD card, is a version that is specific to the raspberry Pi (called IdPi) so it only cost somewhere around $40. I only use it for the DLNA server through the bubbleUPNP app on my phone (which I use both as a wireless controller for my home stereo and for mobile listening through headphones), as it has good sorting and metadata info. I use EAC for all CD ripping too.

Link to comment
Share on other sites

Thanks bresna.  But for your post, I would not have investigated the Raspberry Pi 4.  After doing some research on You Tube, I purchased a Raspberry Pi 4 (2GB) and power supply this afternoon.  I have it connected to the audio files on my Open Media Vault NAS with Volumio.  This is precisely what I was looking for.  My laptop is out of the audio chain.  NAS-->Raspberry Pi 4--->Amp--->Speakers. I can use my laptop to control what is playing. 

I am currently connecting my amp by way of the Pi's headphone jack. Down the line I may get a Raspberry Pi module that allows a connection to a DAC.

Link to comment
Share on other sites

Occasionally heard of this Raspberry Pi and it's piqued my interest - especially after I lost the ability to do the rodcast thru Nicecast a while back.
... but, for now, I just send music thru Sonos speakers located throughout the house and just think about sending stuff beyond those confines.

050801.png

Edited by rostasi
Link to comment
Share on other sites

Thanks bresna, food for thought. I'd like to free my Macbook from my audio set-up and have thought about the Raspberry Pi but can't see that it would be compatible in an Apple set-up (it's apples and raspberries, I guess). 

FWIW my set-up is MyBook EHD > Macbook running JRiver > amp & speakers. I control it with JRemote on an iPad. (I too have 2 more MyBooks as back-up, silly not to.)

Going by what has been posted above In wonder (if I could get it connected) if I could control it with JRiver on the Macbook, which would be great.

Link to comment
Share on other sites

Isn't a MyBook hooked to a Linux PC simply going to show up as a storage device? I think you'd have to run JRiver from the RPI mini-PC (as GregK mentions above) but I would think that you could make it work. I would ask GregK if he thought it could work for you.

BTW - since I started this thread, two new things happened. One was Mother's Day, which killed this past weekend for trying this new system out. The second was that after investigating Moode Audio further, the interface is a web GUI. I decided to switch to Volumio, which runs from an app. On my phone, I'd rather run an app than have to open Chrome every time I want to access it, especially since I may want to use Chrome for tther things while playing music. I hope to try it out later this week.

Link to comment
Share on other sites

2 hours ago, bresna said:

Isn't a MyBook hooked to a Linux PC simply going to show up as a storage device? I think you'd have to run JRiver from the RPI mini-PC (as GregK mentions above) but I would think that you could make it work. I would ask GregK if he thought it could work for you.

I'll look into it, thanks

Link to comment
Share on other sites

4 hours ago, bresna said:

BTW - since I started this thread, two new things happened. One was Mother's Day, which killed this past weekend for trying this new system out. The second was that after investigating Moode Audio further, the interface is a web GUI. I decided to switch to Volumio, which runs from an app. On my phone, I'd rather run an app than have to open Chrome every time I want to access it, especially since I may want to use Chrome for tther things while playing music. I hope to try it out later this week.

Please post how it goes with Volumio.  I tried Volumio over the weekend and had a persistent issue with distortion that sounded like clipping in one channel when the Volumio "software" volume was set to 100%.  The distortion was not present when the Volumio "software" volume was set to 85% or lower.  I am only using the headphone jack on the RPI at this point (i am still undecided on whether I should purchase a DAC "hat" or purchase an outboard DAC like the Schitt Modi).  I adjusted the settings in Volumio, but the adjustments did not eliminate the issue.  I plugged the RPI into another electrical outlet to rule out a ground loop.  I plugged headphones and a mini integrated amp into the RPI, but the problem persisted.  To rule out a hardware issue with the RPI, I installed the raspberry pi operating system headless onto an sd card and connected an external hard drive with flac files to the RPI's usb port.  I played those files through VLC music player using the RPI's headphone jack and the distortion issues were not present, even when the VLC software volume was set to 100%  Therefore, the distortion appears to be a Volumio software issue.  Moreover, although there was some background noise, the flac files playing through VLC sounded better to me than they had when I used Volumio.  I liked the Volumio GUI though.  I will probably post about the issue in the Volumio forums to see if there is a way to resolve the distortion issue I experienced.  Conversely to your post, I am planning to try MoOde this coming weekend. 

Link to comment
Share on other sites

3 hours ago, sonnyhill said:

Please post how it goes with Volumio.  I tried Volumio over the weekend and had a persistent issue with distortion that sounded like clipping in one channel when the Volumio "software" volume was set to 100%.  The distortion was not present when the Volumio "software" volume was set to 85% or lower.  I am only using the headphone jack on the RPI at this point (i am still undecided on whether I should purchase a DAC "hat" or purchase an outboard DAC like the Schitt Modi).  I adjusted the settings in Volumio, but the adjustments did not eliminate the issue.  I plugged the RPI into another electrical outlet to rule out a ground loop.  I plugged headphones and a mini integrated amp into the RPI, but the problem persisted.  To rule out a hardware issue with the RPI, I installed the raspberry pi operating system headless onto an sd card and connected an external hard drive with flac files to the RPI's usb port.  I played those files through VLC music player using the RPI's headphone jack and the distortion issues were not present, even when the VLC software volume was set to 100%  Therefore, the distortion appears to be a Volumio software issue.  Moreover, although there was some background noise, the flac files playing through VLC sounded better to me than they had when I used Volumio.  I liked the Volumio GUI though.  I will probably post about the issue in the Volumio forums to see if there is a way to resolve the distortion issue I experienced.  Conversely to your post, I am planning to try MoOde this coming weekend. 

I was wondering how the headphone jack would work... I have never really gotten good results from a headphone jack into a line in on a preamp. I've seen this happen in the past when I hooked any headphone jack from a walkman type player to a line in on my preamp. They never seem to sound "clean" when you turn the volume of the walkman up to the max. I think it has something to do with the headphone jack's output impedance not matching what your line in "wants". Most preamp line in jacks have an input impedance of 1.5 to 3 kilohms. The RPI headphone jack output impedance is 69 Ohms. That is quite the mismatch.

I hope to avoid that by driving my DAC input via USB.

If you are thinking about adding a DAC HAT, look at the HiFi Berry cards. Good "bang for the buck".

Try this card: https://www.hifiberry.com/shop/boards/hifiberry-dac2-pro/

They also sell cheap cases to accommodate their card/RPI combo. Here is the case the offer with the DAC2 Pro:

case-white-adc-1200x1200-441x441.jpg

Black is $2 cheaper.

Link to comment
Share on other sites

I wonder if I got a RPI card with a bad wireless chip? The Volumio network keeps popping up and then disappearing. I'll probably have to bring it up to my router and hook it up via ethernet.

EDIT - now I get it. The RPI has to be connected to the internet. Your phone needs to be connected to the RPI. Confusing. I will take it up to the ethernet connection and see if that works.

Edited by bresna
Link to comment
Share on other sites

24 minutes ago, bresna said:

I wonder if I got a RPI card with a bad wireless chip? The Volumio network keeps popping up and then disappearing. I'll probably have to bring it up to my router and hook it up via ethernet.

EDIT - now I get it. The RPI has to be connected to the internet. Your phone needs to be connected to the RPI. Confusing. I will take it up to the ethernet connection and see if that works.

Volumio is a little finicky in my experience.  If you are seeing the spinning dots, just cut power to the the RPI then reconnect power and wait until it reconnects.  It may help if you first set it up via browser on a desktop/laptop and then enable phone app connectivity.  It took me a few tries to get it working. 

The HiFiBerry is precisely the DAC that I am considering.

Link to comment
Share on other sites

Success! Playing music through the Raspberry PI as I type this. The Samsung app is slow as hell though. I hope it's just because it's just been set up. If it's this slow, I may go back to Moode just to see if that browser GUI is faster.

BTW - I did hook up that mini HDMI to HDMI cable and booted the RPI to a login screen. It does not appear that I was able to do anything there except command prompt stuff. To do what I am doing, I don't think I needed this cable.

Link to comment
Share on other sites

Wow, is Volumio slow. I don't think it ever completely built my library before it stopped responding. I had to reset it several times before I could get a list of all of the artists and albums in my library. I may have to switch over to Moode if this is it for Volumio. Sadly, I would rather boot up the Linux laptop than use this set up as it now stands.

Link to comment
Share on other sites

On 5/11/2021 at 10:06 AM, crisp said:

Thanks bresna, food for thought. I'd like to free my Macbook from my audio set-up and have thought about the Raspberry Pi but can't see that it would be compatible in an Apple set-up (it's apples and raspberries, I guess). 

FWIW my set-up is MyBook EHD > Macbook running JRiver > amp & speakers. I control it with JRemote on an iPad. (I too have 2 more MyBooks as back-up, silly not to.)

Going by what has been posted above In wonder (if I could get it connected) if I could control it with JRiver on the Macbook, which would be great.

I think you could simply connect the pi to your stereo system (and the internet), and control it using VNC Viewer. Sort of like a remote desktop connection, I just set my pi to a static IP address and the VNC sees it at that address. I use it with my computers and my phone. I use the pi OS that comes with the pi specific JRiver installation, directly from the JRiver company, called an IdPi.

Link to comment
Share on other sites

23 hours ago, bresna said:

I was wondering how the headphone jack would work... I have never really gotten good results from a headphone jack into a line in on a preamp. I've seen this happen in the past when I hooked any headphone jack from a walkman type player to a line in on my preamp. They never seem to sound "clean" when you turn the volume of the walkman up to the max. I think it has something to do with the headphone jack's output impedance not matching what your line in "wants". Most preamp line in jacks have an input impedance of 1.5 to 3 kilohms. The RPI headphone jack output impedance is 69 Ohms. That is quite the mismatch.

I received an answer from the Volumio forums:

Can confirm that, for some reason, the headphone mixer allows up to 4dB gain, too much in my opinion.
Everything over 85 (dB gain -0.00) leads to distortion and not just on the left channel.
Not sure if anyone seriously uses headphone out for our purposes, there are already much better results to be had with a simple USB or HAT DAC.

Link to comment
Share on other sites

On 5/12/2021 at 4:52 PM, GregK said:

I think you could simply connect the pi to your stereo system (and the internet), and control it using VNC Viewer. Sort of like a remote desktop connection, I just set my pi to a static IP address and the VNC sees it at that address. I use it with my computers and my phone. I use the pi OS that comes with the pi specific JRiver installation, directly from the JRiver company, called an IdPi.

Yes, I am an engineer and a self-professed nerd, but even I have to ask questions sometimes. :) I am new to this world of the Raspberry Pi and I am trying to learn as much as I can so bear with me.

Connect the RPI to the internet - Check. I am using an Ethernet cable. I don't want to use this as I'd rather go wireless, but I think I'll have to at first.

Control it using VNC Viewer - What is VNC? (quick Google search ensues - ahh, there it is) and how do I control my RPI with this app? Do I log into my RPI (get out that HDMI cable I didn't think I needed) and install VNC on there or do I install it on a laptop on the same network? From my Google search, I see how I would do this on my laptop but no one has shown me how to install anything on my RPI. I am very familiar with sudo apt-get, as I have been using Linux Ubuntu & Mint desktops for many years. When I logged  into my RPI a few days ago, all I got was a command prompt. I assume if I need to install anything, I am in sudo apt-get land?

Edit: VNC Connect appears to cost $3.39/month. I'm not planning to use this RPI music player that much so I am not looking to pay $40/year for an access program.

Set RPI to a static IP - How do I do that? Do I have to use VNC? What is the reason for this? I get that if I don't set it to a fixed IP address, it can change every time I turn it on, but Volumio seems to find the RPI automatically so the IP can change, can't it?

Use pi OS from JRiver - I have looked into JRiver for years now. Many years. The cost has always kept me away. Is IdPi free? (Google search ensues - no it's not). It looks like they only sell it imaged onto a micro SD card... can't I just download an image and flash my own card? Does this require a fixed IP to work? Is the phone interface easy to use and is it fast? Does JRiver offer a cell phone app (search the Pay Store - ahh, there it is). But is it faster than the Volumio app (which is dog-slow)?

Edited by bresna
Link to comment
Share on other sites

21 hours ago, bresna said:

Yes, I am an engineer and a self-professed nerd, but even I have to ask questions sometimes. :) I am new to this world of the Raspberry Pi and I am trying to learn as much as I can so bear with me.

Connect the RPI to the internet - Check. I am using an Ethernet cable. I don't want to use this as I'd rather go wireless, but I think I'll have to at first.

Control it using VNC Viewer - What is VNC? (quick Google search ensues - ahh, there it is) and how do I control my RPI with this app? Do I log into my RPI (get out that HDMI cable I didn't think I needed) and install VNC on there or do I install it on a laptop on the same network? From my Google search, I see how I would do this on my laptop but no one has shown me how to install anything on my RPI. I am very familiar with sudo apt-get, as I have been using Linux Ubuntu & Mint desktops for many years. When I logged  into my RPI a few days ago, all I got was a command prompt. I assume if I need to install anything, I am in sudo apt-get land?

Edit: VNC Connect appears to cost $3.39/month. I'm not planning to use this RPI music player that much so I am not looking to pay $40/year for an access program.

Set RPI to a static IP - How do I do that? Do I have to use VNC? What is the reason for this? I get that if I don't set it to a fixed IP address, it can change every time I turn it on, but Volumio seems to find the RPI automatically so the IP can change, can't it?

Use pi OS from JRiver - I have looked into JRiver for years now. Many years. The cost has always kept me away. Is IdPi free? (Google search ensues - no it's not). It looks like they only sell it imaged onto a micro SD card... can't I just download an image and flash my own card? Does this require a fixed IP to work? Is the phone interface easy to use and is it fast? Does JRiver offer a cell phone app (search the Pay Store - ahh, there it is). But is it faster than the Volumio app (which is dog-slow)?

I'm no expert at all, I just spent a day or two last summer googling this stuff and it all just seemed to work.

Do you have any OS at all on the pi? I put the basic raspberry pi OS that is available on their website, on a micro SD card and use that. I have it hooked up to my TV with an HDMI cable, but I rarely use it that way, I just go through VNC most of the time (sometimes when I restart the pi VNC won't connect, so I have to use the TV connection to get it started). I don't pay anything for VNC, I didn't know there was a paid option. You download the VNC viewer on your laptop or phone, and the VNC server runs on the pi. It is already included on the raspberry pi OS, so I think you just have to install it and enable it (I think it's found in the Recommended software under Preferences in the Menu once you have raspberry pi OS running).

The static IP is set by my router, which enables me to be able to stream over the internet from my phone or laptop, and also eliminates the occasional connection problem with my stereo (which also is set to a static IP). May not be necessary to do this, depending on what you plan to do with the pi. For me, I use an Android phone, which allows me to stream from my music server to my phone using an app called bubbleUPNP (Android only). The bubbleUPNP server is a sudo command install on the pi, then I have it set to find my server on the network and it streams to my phone without any issue. I went this route once Google Music shut down last year, and I couldn't stream my own collection anymore. I wish I had tried using the raspberry pi & bubbleUPNP earlier, it's much better!

I have my second pi for the JRiver (the IdPi), acting as a DLNA server, only because I like how it organizes my library, and the metadata that it shows on the app. I don't use it as a player or for ripping, just for the better DLNA interface on my phone and stereo. I figured that was worth the $40 or whatever it was. The IdPi is also controlled through VNC viewer.

Edited by GregK
Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...