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. IceUul

    IceUul Friend

    Pyrate
    Joined:
    Oct 20, 2015
    Likes Received:
    101
    Trophy Points:
    43
    Location:
    Estonia
    I am going with same system, i have tried many versions, but at the moment i am with this:
    Linear 2.5A 5V USB PSU for RPI - you can get one for 70$ from ebay
    Raspberry Pi2
    Hifiberry Digi+ Pro hat with BNC connector
    75ohm Coaxial Blue Jeans cable
    Moode audio player

    I am using Yggdrasil and SFD-1 mk2 with this setup.

    I have tried other several setups with Yggdrasil, would list them like this from worst to best:
    - Computer sound card spdif output to Yggdrasil using toslink cable.
    - Computer USB Mutec 1.2 USB to SPDIF converter using coax cable.
    - Computer USB directly to Yggdrasil
    - RPI2 USB directly to Yggdrasil
    - RPI2 Digi+ Pro bnc coax cable to Yggdrasil

    Future upgrades:
    Upgrade from RPI2 to RPI3 - faster and wireless hotspot function.
    Upgrade from moode audio to Volumio 2 - faster and supports hotspot, waiting for Volumio 2 kernel update for this!
    2x separate shunt regulated PSUs for Hat and RPI3 - lower noise and better sound quality
    Custom made good looking box with on/off and play/stop/next buttons - better to put everything inside somewhere.
    RPI touch screen - Volumio 2 has support for this, i connect it to front panel of the player box for direct control.
     
  2. Kattefjaes

    Kattefjaes Mostly Harmless

    Pyrate
    Joined:
    Sep 5, 2016
    Likes Received:
    4,521
    Trophy Points:
    113
    Location:
    London, UK
    Oh, it's a bit weird, actually. I did it by installing BubbleUnPnP server on my NAS, and then using Linn Kazoo as a controller. Here's a page about it:

    http://www.hifizine.com/2016/06/how-to-stream-tidal-to-the-raspberry-pi/

    Hope that helps.

    (I don't think I'm going to keep Tidal, though- too many tracks won't play, even from Tidal's own client or their web player, and it's a lot of money to pay for something that's often hit and miss.)
     
  3. Grahad2

    Grahad2 Red eyes from too much anime

    Pyrate
    Joined:
    Jan 26, 2017
    Likes Received:
    1,162
    Trophy Points:
    113
    Location:
    Singapore
    Congrats you'll have a BDP π for cheap
     
  4. Kattefjaes

    Kattefjaes Mostly Harmless

    Pyrate
    Joined:
    Sep 5, 2016
    Likes Received:
    4,521
    Trophy Points:
    113
    Location:
    London, UK
    The HAT that I have chosen only does TOSlink, Coax and BNC Coax (if you want to solder a connector). If your DAC has AES, it's going to sound best with a cleanly-clocked AES source. The forthcoming Pi2 design HAT will do AES, but it's not properly on sale, yet.

    Essentially, in ascending order of quality, it's TOSlink, Coax, Coax over BNC and then AES.

    TOSlink gives you electrical isolation, but is a bit more jitter and maybe even error-prone due to fairly relaxed manufacturing tolerances and alignments. It's not like poking some singlemode into a GBIC, sadly.

    (It may be "worst" in this list, but cleanly clocked, it's still pretty good, especially for cheaper DACs.)

    Coax doesn't give you electrical isolation (though you can have galvanic isolation, which the Digi+ Pro will do, if you have a grounded DAC and open the jumper). It's lower jitter, than TOSlink. However, because it's near-impossible to make a good 75 ohm terminated RCA or 3.5mm plug, there are often slight reflectance issues. It's pretty good, though.

    Coax over BNC is a bit better- it's far easier to get proper 75 ohm termination on a BNC cable. Also, because it's a slightly more "high end" option, you tend to be more likely to have isolation, just as a correlation.

    AES is best of all- not just because of the solid termination, but because it's balanced and has common mode rejection. Also, if it's true AES/EBU rather than just AES3, it will generally have transformer isolation. This is a really solid, industrial grade way to fly. (AES3 can have transformer isolation, but it's not mandatory.)

    Crappy clocks probably make more difference than the connection type, initially, but if you have good clocks and a choice of connection, that's the order of precidence.

    Now, to answer your question directly (finally), I'd be very surprised if the clock quality of a £39 Pi HAT board would be as good as an Auralic ARIES, Rednet box or a Lynx AES card. For someone using motherboard SPDIF or USB, the Pi route will still give you an audible upgrade, but you will be leaving some sound quality on the table.

    If you have a Yggdrasil, you absolutely can justify the cost of a really top quality source, and you should probably just go for it. It's an extra few percent that's not difficult to squeeze out, and who doesn't love that?

    Read some of the stuff that @Torq has posted about high-end digital sources. He'll see you right.
     
    Last edited: Feb 21, 2017
  5. Madra

    Madra Acquaintance

    Joined:
    Oct 18, 2015
    Likes Received:
    26
    Trophy Points:
    18
    Thanks for the link.
    I do have the occasional problem with Tidal too, but so far the advantages outweigh the shortcomings. I am tempted by Qobuz.
     
  6. pedalhead

    pedalhead Friend

    Pyrate
    Joined:
    Oct 2, 2015
    Likes Received:
    2,046
    Trophy Points:
    93
    Location:
    Oxfordshire, UK
    I appreciate it's not cheap, but if you can deal with the cost, I can highly recommend Roon as a software front end for all this stuff. Their Roon Bridge software on RPi is a great way to stream music to single or multiple locations with a central control interface. Has Tidal integration too.
     
  7. Kattefjaes

    Kattefjaes Mostly Harmless

    Pyrate
    Joined:
    Sep 5, 2016
    Likes Received:
    4,521
    Trophy Points:
    113
    Location:
    London, UK
    Yeah, looks really nice, but I'm not inclined to pay full price for it right now. Maybe if there's ever a hefty promotional discount again...
     
  8. Madra

    Madra Acquaintance

    Joined:
    Oct 18, 2015
    Likes Received:
    26
    Trophy Points:
    18
    I have been delaying the decision to go with Roon for quite sometime now. The release of 1.3 and some feedback that it outperforms Audirvana+ is making it that little bit harder
     
  9. pedalhead

    pedalhead Friend

    Pyrate
    Joined:
    Oct 2, 2015
    Likes Received:
    2,046
    Trophy Points:
    93
    Location:
    Oxfordshire, UK
    Not wishing to hijack this thread (there's a Roon thread somewhere), but 1.3 is superb. Parametric EQ and convolution are a huge deal, which have allowed many of us to kick HQPlayer to the curb. Whilst HQP did work with Roon, it was a fairly clunky relationship.

    Having said all that, Roon is horrifically expensive when compared to the likes of JRiver (and many free programs out there), but personally I find having the metadata built into the player to be worth the price. But then, I'm the bloke who always had Allmusic.com open alongside JRiver when listening to music.
     
  10. Scott Kramer

    Scott Kramer Friend

    Pyrate
    Joined:
    May 3, 2016
    Likes Received:
    1,446
    Trophy Points:
    93
    Thanks @Kattefjaes!

    Looking at Rune's website it almost seems abandoned version wise - and then having to compile linux underneath it seems like it's starting people off on the wrong foot. I must really be missing something re: Rune so maybe I'll check it out.

    ************

    My take on how to get a pure, audio only endpoint, minimal processing and dedicated to purpose.

    The 3 choices I like:

    1. piCorePlayer because it is so lightweight (it's main purpose is to run squeezelite)... the OS actually runs in RAM (no card writes ever except configuring).
    then squeezelite is basically the only process moving PCM (and this is even in RAM, after a network burst) to the GPIO pins (as i2s) --

    ...piCorePlayer needs LMS (logitech media server, this used to be logitech's, but open sourced by them) running somewhere on the network. LMS points to your local disks and/or remote Nas storage, handles all the heavy DB music library scanning, formats (wav,flac,mp3,ape,ogg), up/down/resmpling w/sox -- then delivers consistent PCM to squeezelite.

    ...then LMS needs a Controller
    • a good one is ipeng on ios
    • there are a few for androids
    • you can use a squeezebox touch as a controller
    • another pi piCorePlayer but with the UI turned on and the official pi touchscreen
    • squeezeplay for windows/mac/linux
    • and LMS has a web controller always there
    (the controller talks to LMS only, not the pi directly, the pi's automatically register w/LMS)

    Once you have an established LMS server... add as many squeezelite endpoints as you like... it is awesome!

    2. raw linux/squeezelite -- with just a simple boot up script kicking off squeezelite -- (requires LMS/Controller)

    3. MooDe (as a 2nd source and to run squeezelite/airplay) *** of the MOODE/VOLUMIO/RUNE ilk I like this one because it's kept up to date, the advanced audio kernel option, and squeezelite optional. Not the UI nessesarily.

    IMO the way (moode, volumio, rune) handles your music library... you point it to a windows (samba) share... then builds the database *on the pi* is painfully slow initially, and then rescanning *on the pi* if you add more music, slow and lags the UI. Also the web server *runs on the pi* delivering the UI -- is clunky. Small library, or point it to a small folder fine, but a big one it's bad compared to LMS (or the LMS *structure*)


    ...and if your doing LPS's, advanced digital HAT's / FPGA's of course piCorePlayer -- seems like the pure simple way to go!



    MISC NOTES:

    Nightly builds of LMS...
    http://downloads.slimdevices.com/nightly/?ver=7.9

    Don't let the name logitech still being there scare you away (it's not abandoned)... they gracefully handed this off to open source, it's just always been called that

    BTW can run LMS on a pi... piCorePlayer has it (but of course run that not near the music endpoint pi)




    piCorePlayer

    https://sites.google.com/site/picoreplayer/home/news
    http://forums.slimdevices.com/showthread.php?106755-Announce-piCorePlayer-3-10

    With version 3.1+ there are 2 builds: standard and advanced audio -- audio is support for 384K (for DSD128) i2s stuff, more advanced hat's etc. They are probably keeping these separate for now watching for bugs. (MooDe lets you optionally use this kernel also)






     
    Last edited: Feb 22, 2017
  11. Lasollor

    Lasollor Friend

    Pyrate
    Joined:
    Apr 18, 2016
    Likes Received:
    367
    Trophy Points:
    63
    Location:
    Japan
    Out of curiousity I've bought an iFi iPower on the weekend.
    So far I can say it might help if you have audible noise, otherwise I can't hear any differences.
    If I crank up the volume knob to max on high gain, without playing any music, I can hear noise with the MA900 and sensitive earphones (but not with the HD650) with the regular adapter. Swapping it with the iPower the noise disappeares. But on a normal listening level (which is about half of the maximum for me), playing music, I can't say I notice any difference.
    I've also disabled wifi, bluetooth, hdmi, and underclocked the PI yesterday. The PI runs much cooler, no problems so far. I can't A/B these settings so I won't comment on the sound, but it certainly doesn't sound worse.
     
  12. Grahad2

    Grahad2 Red eyes from too much anime

    Pyrate
    Joined:
    Jan 26, 2017
    Likes Received:
    1,162
    Trophy Points:
    113
    Location:
    Singapore
    @Scott Kramer

    So to distill it down you will end up with the following hardware:

    1) Raspberry Pi + HAT
    This runs squeezelite OR piCorePlayer+LMS, and functions as the endpoint you connect your DAC to.

    2) Raspberry Pi/Desktop/Laptop/Phone
    This runs LMS service and serves the music data to the Pi in 1)

    Got a wee bit confused.
     
    Last edited: Feb 22, 2017
  13. Scott Kramer

    Scott Kramer Friend

    Pyrate
    Joined:
    May 3, 2016
    Likes Received:
    1,446
    Trophy Points:
    93
    @Grahad2

    the audio endpoint pi/hat runs only piCorePlayer (piCore's main function is to run squeezelite)

    LMS runs somewhere on your network... a Server, PC, another pi (piCore can run LMS), etc.

    Then use a phone/tablet or something else as controller.

    Keep all the complication away from the endpoint.
     
  14. Grahad2

    Grahad2 Red eyes from too much anime

    Pyrate
    Joined:
    Jan 26, 2017
    Likes Received:
    1,162
    Trophy Points:
    113
    Location:
    Singapore
    Ah thanks for clearing that up. Might go that route instead of Volumio/etc (hated the interface).
     
  15. Kolohe

    Kolohe Facebook Friend

    Contributor
    Joined:
    Oct 6, 2015
    Likes Received:
    98
    Trophy Points:
    33
    Location:
    CC of HNL
    There's a new beta test version (0.4) of RuneAudio available.

    I ran RuneAudio 0.3 on my current RPi3/Digi+ build for about 6 months, but for the last couple of weeks I've been running MoodeAudio v3.1 and like it a lot (although I'm not crazy about how the UI renders on my phone). I'll probably give this RA beta a try when my new RPi3/Digi+ Pro parts are delivered, hopefully this week. Some nice new features in the new version.
     
  16. haywood

    haywood Friend

    Pyrate
    Joined:
    Oct 22, 2015
    Likes Received:
    763
    Trophy Points:
    93
    Looks nice, I should pick up a few spare micro sd cards to set up alternate distros (except this time no more than 8gb as bigger just means longer to back up). I don't know if it'll dethrone Moode (which is also due a new version soon from Tim's posts on the diyaudio thread, but it sounds like it's about to go non-free which some people may not like.
     
  17. Kattefjaes

    Kattefjaes Mostly Harmless

    Pyrate
    Joined:
    Sep 5, 2016
    Likes Received:
    4,521
    Trophy Points:
    113
    Location:
    London, UK
    Ah nice, well spotted :)

    It looks like it bumps the kernel to 4.4.xx, which should make the Digi+ Pro work out of the box. It also appears to add an AP mode, which I don't think Rune had, unlike Moode and Volumio.

    The nice thing is that it's easy to have spare memory cards for the Pi, so you can just flash the beta and try it out without disturbing your working install. Given how cheap decent cards are now, that's definitely a recommended tactic for when you want to experiment with stuff.

    If you're a Linux user, you can use dd to do the imaging, and precisely control how much of the card you back up. Assuming you didn't grow the partitions to fill the card, you can list where the partitions occur with fdisk -l and then use that info to dd just those blocks to a file. Writing it back is straightforward, you just write what you have.

    There's a more detailed explanation here:

    http://raspberrypi.stackexchange.co...whats-on-the-sd-card-but-as-compact-as-the-or

    It'll be a shame if Moode goes non-free. That "Max2Play" distro is non-free, and the UI is annoyingly loud and spammy because of it, trying to get you to pay. It's not expensive, but I have to admit that it was sufficiently pushy that I didn't feel like paying a penny.
     
    Last edited: Feb 28, 2017
  18. Madra

    Madra Acquaintance

    Joined:
    Oct 18, 2015
    Likes Received:
    26
    Trophy Points:
    18
    @Kattefjaes I started installing Bubble UPNP on my Synology DS214+ NAS, following the instructions in the link you sent and on the BubbleUPNP website.

    I installed / updated Java8 and installed BubbleUPNP successfully.

    From BubbleUPNP website Synology related instructions: "It is recommended to install Optware-ng's ffmpeg binaries to replace Synology default ones which are missing some features (notably no support for: video transcoding, https, Sox resampling, ffprobe)."

    This is where I missed something. In the BubbleUPNP status, both Audio and Image transcoding is supported, but Video is not. I get the following: no (ffmpeg has no libx264 support).

    Any idea how to fix it?

    The learning curve looks steep :)
     
  19. Kattefjaes

    Kattefjaes Mostly Harmless

    Pyrate
    Joined:
    Sep 5, 2016
    Likes Received:
    4,521
    Trophy Points:
    113
    Location:
    London, UK
    I wouldn't fix it. Seriously, the CPU in lowend Synology NASses is pretty shitty, CPU-based transcoding of video wouldn't be high on my list. I probably wouldn't use that toolchain for video- plus the transcoding will just make it look worse.

    "Get better video" :)

    (Though if the essence payload is in a suitable codec, you can always losslessly rewrap to another container format in FFMPEG on your computer, I guess.)

    Sorry if that's not the answer you want- but it's probably the most useful for your sanity.
     
  20. Madra

    Madra Acquaintance

    Joined:
    Oct 18, 2015
    Likes Received:
    26
    Trophy Points:
    18
    So do you think I am better off installing BubbleUPNP on a mac mini?
     

Share This Page