Building a Raspberry Pi-based streamer - a guide for the nervous

Discussion in 'Digital: DACs, USB converters, decrapifiers' started by Kattefjaes, Feb 19, 2017.

  1. gixxerwimp

    gixxerwimp Professional tricycle rider

    Friend
    Joined:
    Sep 30, 2015
    Likes Received:
    2,069
    Dislikes Received:
    13
    Trophy Points:
    113
    Location:
    small island claimed by China
    Given the trouble I had getting some things to work, I was pleasantly surprised to find that Hi-Fi Cast was pretty much plug-n-play. It automatically found the DLNA server on my NAS and Volumio on my Pi Zero W. The interface is super responsive, but my Synology Diskstation server wasn't serving up album art, so I installed MinimServer. It seems to be very streamlined and scanned my library very quickly. All album art is now appearing on Hi-Fi Cast, and no crashes or hangs so far.

    And as a bonus, I can stream gapless to the Chromecast on my TV/2.1 system. Not sure what bitrate/codec is being used, but it'll do for background music.
     
  2. Biodegraded

    Biodegraded Friend

    Friend
    Joined:
    May 28, 2017
    Likes Received:
    2,233
    Dislikes Received:
    0
    Trophy Points:
    93
    Location:
    Calgary AB, Canada
    I'm using MinimServer as well. I like it because it's small, light and easy to control (if you're not scared of text on command lines - although for most common commands that can be avoided). If you've kept the default settings it should be streaming your files bit-perfect, including AFAIK to the Chromecast (great thing about UPnP, it essentially does an end-run around Windows).
     
    gixxerwimp likes this.
  3. Biodegraded

    Biodegraded Friend

    Friend
    Joined:
    May 28, 2017
    Likes Received:
    2,233
    Dislikes Received:
    0
    Trophy Points:
    93
    Location:
    Calgary AB, Canada
    @gixxerwimp , hopefully the software changes have solved your problems. Certainly Hi-Fi Cast was a revelation to me, most of the other Android control points I'd tried didn't even communicate with either or both the server or the Pi. Server-wise I started with the built-in Windows one but that insisted on listing tracks alphabetically, so I switched to Minimserver pretty quickly.

    Not sure what else useful I could tell you about the details of my setup... For the Pi3 I'm using a Volumio version from I think September 2017, for the Zero one from March 2018 (haven't updated on the 3 because I don't want to fix what doesn't seem to be broken). I've stuck with the default Volumio settings other than turning off the hotspot. On the Pi3 I edited the config to use Archimago's 'CRAAP' low-power settings as described by @Kattefjaes in one of the initial posts in this thread, but on the Zero I haven't made any configuration changes so far. Browser is Chrome.
     
    hikergrl and gixxerwimp like this.
  4. JustAnotherRando

    JustAnotherRando My other bike is a Ferrari

    Contributor
    Joined:
    Aug 15, 2017
    Likes Received:
    1,060
    Dislikes Received:
    2
    Trophy Points:
    93
    Location:
    Hong Kong
    Is anyone using picoreplayer with a paid streaming service besides Tidal?

    I would like to move away from Tidal (a combination of recent news about fudged payments, and a belief that they won't be around for much longer).

    Seems like it worked with Spotify until support was removed quite recently.
     
  5. steklo

    steklo Rando

    Joined:
    Jan 31, 2017
    Likes Received:
    8
    Dislikes Received:
    0
    Trophy Points:
    3
    Location:
    Germany
    Spotify works nicely with "Spotty" extension enabled in LMS. You can read about it here (but you don't need to as it is so easy to set up):

    https://forums.slimdevices.com/show...now-with-experimental-Spotify-Connect-support!
     
    JustAnotherRando likes this.
  6. gixxerwimp

    gixxerwimp Professional tricycle rider

    Friend
    Joined:
    Sep 30, 2015
    Likes Received:
    2,069
    Dislikes Received:
    13
    Trophy Points:
    113
    Location:
    small island claimed by China
    Pi Zero W + piCorePlayer Tutorial for Dummies

    piCorePlayer (pCP) was the hardest to get running properly of the operating systems I've tried so far, probably because I'm a Linux noob. I couldn't find a set of start-to-finish instructions and it took a lot of fucking around to get it working, so I figured I wouldn't let all that hard work go to waste.

    Now that it's setup, I think it's the most robust and responsive of the options I've tried. The reason I went back to pCP was that the otherwise excellent setup of Hi-Fi Cast controlling Volumio fed by MinimServer would stop playing randomly midway through the queue. Restarting the track or playing another one got it going again. But not ideal for for an extended listening session.

    So, step one obviously is to download the pCP image from the download site: https://sites.google.com/site/picoreplayer/home/download
    I had problems connecting to the Zero with ver. 3.5.0, so I used ver. 3.22 that I was able to get going the first time around. (Could be I just had a brain fart so try the newer version first if you want.)

    Next, flash the image to your microSD card using Win32 Disk Imager or Etcher. The image is small so it won't take long. It's recommended to format a new SD card with the official SD Association formatting tool.

    Since the Zero W doesn't have an Ethernet connection*, you have to use the onboard Wi-Fi. Before ejecting the card, create a file called "newconfig.cfg" using a text editor with the following contents:

    Where yourSSID is the SSID of your Wi-Fi network and yourPASSWORD is your password. Leave the quotation marks in.

    Copy the file to the top level directory of the SD card. Make sure that the file is of type ".cfg" and that your text editor (e.g. Notepad) didn't add ".txt" on the end. Eject the card, insert it into the Zero W, connect your USB DAC with an OTG microUSB cable, connect the microUSB power cable, and wait for it to boot up and receive a DHCP IP address from your router. (These instructions can be found at the top of this page: http://picoreplayer.sourceforge.net/how_to_setup_wifi_on_pcp_without_ethernet.shtml.) The initial bootup will take a few minutes so go pour or crack open your favourite beverage and relax for a while.

    *If you're using a Pi that has an Ethernet socket, I think you can just plug it in and it'll be connected to your local network.

    To find out what the IP address of the Zero W is, go to the setup interface of your router and look for "piCorePlayer" in the client list. Enter the IP into your browser and you should be taken to the "About" page. Click on "Main Page" to begin setup.

    pCP - About.jpg

    Once on the Main page, click the Advanced tab at the bottom. This will open up all the settings you'll need to complete the setup.

    pCP - Main Page.jpg

    Now that we have the Advanced settings available, the first thing to do is Resize the file system. Depending on how you plan to use pCP, this may not be necessary. But since we're dummies, we'll do it just in case we need the space on the SD card. So click on "Resize FS".

    pCP - Main Advanced.jpg

    And because we're still as dumb as when we started, we'll resize to the full capacity of the card. Click "Resize" to start the auto resize partition process.

    pCP - xtras_resize.jpg

    You'll see this screen, and if you scroll down to the bottom of the little window, it'll tell you it's done and to refresh the page in a few minutes. You'll get taken back to the Main page which will look the same as before.

    pCP - xtras_resize2.jpg


    I don't know how much I can put into a single post, so I'll continue this below.
     
    Last edited: May 20, 2018
  7. gixxerwimp

    gixxerwimp Professional tricycle rider

    Friend
    Joined:
    Sep 30, 2015
    Likes Received:
    2,069
    Dislikes Received:
    13
    Trophy Points:
    113
    Location:
    small island claimed by China
    OK. After you've refreshed and gotten back to the Main page, click on Squeezelite Settings. SqueezeLite is the music player on pCP. First we'll set the output to USB, since that's all there is on the Pi Zero W (well, there's a mini HDMI output, but I don't think we're interested in using that). The OTG microUSB output of my Zero is connected to an Eitr.

    pCP - Squeezelite Settings.jpg

    Click the "Save" button. There will be a bunch of confirmation stuff and it'll ask you to check the output setting.

    So next we want to choose the Output setting which specifies the output device we've connected to the USB OTG output of the Zero. With an Eitr connected, when I click on more> it shows me this.

    pCP - Squeezelite Settings2.jpg

    I'm assuming that you will be given appropriate choices depending on the USB DAC you connect to the Zero. If you forgot to connect your DAC, unplug the microUSB power, connect the DAC with an OTG microUSB cable, and replug the power to reboot the Zero (yeah, it's not necessary to soft power down pCP - just pull the plug). Wait for it to settle and then go back to the Squeezelite Settings page to see your output setting options. I'm a dummy, so I chose the first one that said "Eitr": sysdefault:CARD=Eitr. Choose one that looks right for your USB device, paste it over whatever's in the box now, scroll down to the bottom of the page, and click "Save". You'll see some stuff and it'll ask if you want to restart SqueezeLite. Do what it says.

    So now, we have a player (SqueezeLite) connected to our USB DAC, but nothing to play. For those not familiar with the whole Logitech Squeezebox ecosystem (like me), the pCP and Squeezelite needs a Logitech Media Server (LMS) to feed it music. The easiest way to get one is to install the LMS package for your Network Attached Storage (NAS). I have a Synology NAS, so I installed the LMS package, opened the web GUI.

    pCP - Logitech Media Server 0.jpg

    Then I told it to scan my music. To do this, on the left side of the LMS web GUI, click on Server Settings.

    pCP - Logitech Media Server 1.jpg

    Then enter the path to the shared folder where your music is. I found the path by looking at the properties of the folder where my music is.

    pCP - Logitech Media Server 0a.jpg

    Then click on Scan or Rescan, I can't remember what the button was the first time I did this (the scancould take a few hours depending on how much music you have).

    pCP - Logitech Media Server 2.jpg

    The pCP should be able to auto-discover the LMS and vice versa. So after you've finished scanning your music, you can access your music library from the home page by clicking on Artists for example. Load up some music, press play, and hopefully some sound will come out the other end.

    pCP - Logitech Media Server 3.jpg

    To control LMS and pCP from a phone
    , install an app like Squeezer. https://play.google.com/store/apps/details?id=uk.org.ngo.squeezer
    As long as you're connected to your local Wi-Fi network, it should automatically connect to your LMS and be able to control the pCP.

    Only problem I've run into so far is Squeezelight going into "distortion mode" after being on for a period of time (all day or overnight) and requiring a stop and restart of Squeezelight from the Main page (haven't had a chance to look into this yet). While doing this tutorial, I ran through a fresh install so I'll report back if this problem goes away.
    Edit: Checked it after leaving it on overnight and the fresh install needed a Squeezelight restart.

    If your NAS or shared folder doesn't support LMS or your music resides on a PC or external USB drive, then you can install LMS directly on the pCP. I'll try and explain that in the next post. It's late here so that'll have to wait.
     
    Last edited: May 20, 2018
    hikergrl, crazychile and Biodegraded like this.
  8. gixxerwimp

    gixxerwimp Professional tricycle rider

    Friend
    Joined:
    Sep 30, 2015
    Likes Received:
    2,069
    Dislikes Received:
    13
    Trophy Points:
    113
    Location:
    small island claimed by China
    Doesn't seem to be that much interest, so I'll hold off on the onboard LMS instructions for now.

    I did find a fix for the "distortion" issue. I found some posts that mentioned the "audio" version sometimes doesn't work that well for USB DACs, and that it's intended for fancy hats and the like. So I tried the latest rev. 3.5.0 "normal" version, but it would time out or hang after a few hours. I then tried the "normal" rev. 3.22, and I don't get the distortion issue. It ran stable for a couple of days, and I only had to reboot it just now after it went offline. This is the best solution I've found so far.
     
    Last edited: May 25, 2018
  9. gixxerwimp

    gixxerwimp Professional tricycle rider

    Friend
    Joined:
    Sep 30, 2015
    Likes Received:
    2,069
    Dislikes Received:
    13
    Trophy Points:
    113
    Location:
    small island claimed by China
    Update: The "normal" rev. 3.22 eventually started exhibiting the "distortion" issue. Did a bit of searching and someone who had the exact same problem solved it by changing to a Squeezelite output setting that included "DEV=0". So I tried the first option listed that had that in it:
    This seems to have fixed things and the Pi Zero W hasn't needed a Squeezelite restart in 3 days.
     
    Last edited: May 30, 2018
    Biodegraded likes this.
  10. lehmanhill

    lehmanhill Acquaintance

    Contributor
    Joined:
    May 3, 2018
    Likes Received:
    97
    Dislikes Received:
    0
    Trophy Points:
    18
    Location:
    Michigan US
    Any Trouble with Eitr and Raspberry Pi?

    I hope this is the right forum to ask this question. I recently bought an Eitr to feed my Metrum Flint that is on pre-order. My distributed audio uses Max2Play/Squeezelite with RPi3 as a streamer. Since the Metrum isn't here yet, I thought I would compare the Gungnir Multibit in my main speaker system with and without the Eitr in the digital chain. The Gungnir Multibit is the old USB, not the Gen 5. It has played well for almost two years being fed USB by the RPi3.

    Unfortunately, when I put the Eitr in the chain I get either only loud static or thin distorted music with static on top. It's completely unlistenable, if that's a word. I've tried different cables that work in other systems. The Gungnir Multibit continues to play from it's USB input. I inserted a diyinhk USB converter that uses the same CM6631A chip as Schiit does and it works fine.

    In contacting Schiit for support, they are asking questions about the RPi, so I wondered if anyone here had run into similar issues and, if so, what solved them?

    Thanks.
     
  11. gixxerwimp

    gixxerwimp Professional tricycle rider

    Friend
    Joined:
    Sep 30, 2015
    Likes Received:
    2,069
    Dislikes Received:
    13
    Trophy Points:
    113
    Location:
    small island claimed by China
    piCorePlayer/Squeezelite on my Pi Zero W works fine with Eitr.

    See previous posts.
     
  12. lehmanhill

    lehmanhill Acquaintance

    Contributor
    Joined:
    May 3, 2018
    Likes Received:
    97
    Dislikes Received:
    0
    Trophy Points:
    18
    Location:
    Michigan US
    @ gixxerwimp

    Thanks for your piCorePlayer tutorial. Since Max2Play wasn't playing nice with Eitr, I have been trying to see if piCorePlayer would work. Your tutorial is very helpful. I seem to have almost everything. What I can't get it to do is turn on/recognize wifi.

    Anyway, thanks.
     
  13. SineDave

    SineDave Friend

    Friend
    Joined:
    Apr 18, 2016
    Likes Received:
    585
    Dislikes Received:
    0
    Trophy Points:
    93
    Location:
    Houston, TX
    Home Page:
    I've had good success with volumio & raspotify, which allows me to use the hifiberry output for both my spotify connect client and my NAS library. Volumio is excellent, and as an added bonus, the device is also a Roon endpoint, so i've got all 3 in one.
     
  14. lehmanhill

    lehmanhill Acquaintance

    Contributor
    Joined:
    May 3, 2018
    Likes Received:
    97
    Dislikes Received:
    0
    Trophy Points:
    18
    Location:
    Michigan US
    It looks like you have this fixed. That's great.

    If the problem comes back, you might try changing your SD card. I had a similar problem that I think was due to read/write wear on the SD card. These kind of programs likely read and write the same bits over and over. My solution was to burn an image to an industrial SD card and I haven't had a problem in over a year.
     
  15. gixxerwimp

    gixxerwimp Professional tricycle rider

    Friend
    Joined:
    Sep 30, 2015
    Likes Received:
    2,069
    Dislikes Received:
    13
    Trophy Points:
    113
    Location:
    small island claimed by China
    Try the newconfig.cfg file part of the tutorial after flashing the image to setup your wifi.
    Nice thing about piCorePlayer is it runs in RAM and doesn't do any read/write to the SD card after boot up.
     
  16. lehmanhill

    lehmanhill Acquaintance

    Contributor
    Joined:
    May 3, 2018
    Likes Received:
    97
    Dislikes Received:
    0
    Trophy Points:
    18
    Location:
    Michigan US
    I did try that. No joy, unfortunately. It took me a bit to figure out how to make it a .cfg file, but I got that done.

    You mentioned that it needs to be on the root directory. I'm using picoreplayer 3.22 and I didn't see any subdirectories. How do I check that it's in the root directory? That may be why the newconfig file isn't working.

    It is weird because picoreplayer can see my wi-fi network, but it doesn't find the I.P. and connect. But there is no place to put in the I.P.

    I will keep fiddling with it. I have to be careful I don't run out of return time on the Eitr. Since all my digital sources are Pi's, there is no point keeping it if I can't figure this out.
     
  17. haywood

    haywood Almost "Made"

    Joined:
    Oct 22, 2015
    Likes Received:
    215
    Dislikes Received:
    1
    Trophy Points:
    43
    The root directory is the top-most level of the disk. Make sure the file you create is a plain text file with the necessary contents, the .cfg extension is just cosmetic.

    I thought picoreplayer was by far the most inscrutable interface to configure but once you got past that it ran fine and the sound with the rt kernel was good, on par with moode which is what I use. If you use a streaming service it handles that a bit more gracefully than what I’ve seen the other distros do but it’s still nothing like the dedicated tidal app. I wouldn’t worry too much about wear and tear on components as cheap as sd cards though.
     
    hikergrl and Scott Kramer like this.
  18. hikergrl

    hikergrl Friend

    Friend
    Joined:
    Mar 27, 2018
    Likes Received:
    826
    Dislikes Received:
    0
    Trophy Points:
    93
    Location:
    New York State
    Just wanted to send a huge thank you to Kattefjeas for starting this thread and all the help posted by others.:bow:
    A couple of months ago I had not even heard of Raspberry Pi (I know, I live in a cave!). Thanks to this thread I'm now using a 502Dac + Pi + Volumino to get WAV files via BNC cable to my DAC. It sounds really awesome - much better than the USB-C output from a Shanling M1. I'm very happy with this little set-up - really thanks soooo much.
    Just in case its useful to anyone (since I seem to go thru a lot of small capacity micro SD cards with various distros, etc.) - newegg has got a combo pack of three 16GB micro sdhc cards for $10.99 (free shipping). I just bought a bunch and hope this may help some of you guys.
    https://www.newegg.com/Product/ComboBundleDetails.aspx?ItemList=Combo.3844262
     
  19. Cspirou

    Cspirou They call me Sparky

    Friend
    Joined:
    Sep 27, 2015
    Likes Received:
    4,696
    Dislikes Received:
    5
    Trophy Points:
    113
    Location:
    Northwest France
    @hikergrl - thanks for the tip on the combo pack. There's a lot of different distros I want to experiment with and this works out great.
     
    hikergrl likes this.
  20. Biodegraded

    Biodegraded Friend

    Friend
    Joined:
    May 28, 2017
    Likes Received:
    2,233
    Dislikes Received:
    0
    Trophy Points:
    93
    Location:
    Calgary AB, Canada
    Stream What You Hear => Volumio: anybody got this working?

    Edit: In Volumio, create a new Web Radio station (under the Browse) tab; then from the Tools menu in Stream What You Hear, select HTTP Live Streaming and copy the URL that appears into the Web Radio's dialog box.

    Works to stream Spotify, or whatever stream you can play on yer computer, to Volumio on yer Pi.
     
    Last edited: Jul 24, 2018

Share This Page