+ Reply to Thread
Page 1 of 6 123 ... LastLast
Results 1 to 10 of 56

Thread: Recipe for a budget digital media streaming server

  1. #1
    Join Date: Sep 2012

    Location: East Anglia UK

    Posts: 1,219
    I'm Marc.

    Default Recipe for a budget digital media streaming server

    Super Budget Digital Audio Streaming Recipe

    This is a recipe I've been working up for a couple of weeks that I wanted to share with you all. As the title suggests it's primarily a budget approach but realistically there's no reason you can't up the spend on the sound card to something more esoteric and get a really hi-fi result from it.

    The magic of this system is that you can essentially have your own personal Spotify using the subsonic / madsonic media server software. You can stream music around your home to different computers and you can remote control your base station machine using your mobile phone (as well as being able to stream to that phone also, so you can have your music when you're out and about too!) You could also skip the soundcard completely and just use the pi as a streaming server to other devices that do have a sound card / converter attached to them.

    You can also use it to run an XBMC media server although this guide is more focussed on Subsonic as that's the one I've enjoyed using the most (I don't do a lot of telly / films, I like choons!)

    On first glance, if you've not delved in to computers all that much it looks quite involved and complicated but if you're reasonably methodical and happy to use google (and this thread) I think you'll find it's all quite straight forward really.

    Hardware

    Raspberry Pi – model b

    http://raspberrypi.rsdelivers.com/pr...b/7568308.aspx

    £26

    Pi power supply – this is the better 2amp model, wouldn't skimp any further on this

    http://raspberrypi.rsdelivers.com/pr...i/7653311.aspx

    £10

    Pi case (optional)

    http://raspberrypi.rsdelivers.com/pr...r/caseclr.aspx

    £5

    SD Card – 16gig is a good idea if you want to go the Berryboot route, outlined below, and have multiple OS flavours available on your Pi

    http://www.ebuyer.com/397949-lexar-1...d-lsd16gfbeuhd

    £10

    1TB USB Hard drive – if you already have a NAS solution this may not be necessary – it's useful to have one as the pi runs faster from a USB drive anyway but just get a smaller / cheaper one if you're hosting your media elsewhere

    http://www.ebuyer.com/238460-intenso...-drive-6002560

    £60

    Audio interface – Burr Brown converters, RIAA compensated inputs (switchable to line ins if you have better pre for phono input) Optical output (for if you have a better converter)
    http://www.amazon.co.uk/Behringer-UC...?tag=qrb-su-21

    £23 – Confession 1. I don't have this soundcard myself however I've checked that it is compatible with linux and has a standard USB driver so should work 'out of the box'

    Other bits and bobs – Ethernet cable and internet connection / access to home router. HDMI cable (if you want to do video to a television, it also has uses for getting setup which are explained when we get to software setup), another computer with an sd card reader – this guide assumes you have one running linux, preferably Debian or a Debian derivative (Ubuntu, Crunchbang, Mint etc)

    Hardware setup

    This should be pretty fool-proof!

    Simply plug all the relevant items in to their relevant sockets (HDMI to TV, Ethernet to router, hard-drive and sound card in USB and power in to the mini usb socket on the pi)

    If you want more USB devices you should consider a powered hub to hang them off.

    Software Setup

    A general point, it's really helpful if you know how to use SSH to connect remotely to another computer on your home network, if you also set up your router so it always assigns your pi the same address then you can connect to it using SSH at a command prompt just type: ssh pi@192.168.1.whateveripyouvesettheroutertogivetothepi (assuming you've left the default user name at pi) if you've left the default password too (naughty naughty!) then when you're prompted for the password it's raspberry if you haven't it's whatever you changed it to. If you've kept he default hostname you can also do ssh pi@raspberrypi and that should get you to the password prompt too.

    This little sequence will log you in to the pi remotely and the next prompt that comes up is the pi rather than the machine you're typing on, cool huh? If you're on windows you should look in to installing PuTTy and WinSCP as these are the tools you need to complete the same tasks from a windows box.


    Getting the Pi up and running

    Berryboot
    http://www.berryterminal.com/doku.php/berryboot

    Your Pi doesnt' have a BIOS but it doesn't mean you can dual (or multi) boot it with different OS flavours. Berryboot gives you a very simple route in to this. Simply download the Berryboot zip file and extract its contents in to a freshly formatted (FAT32) SD card, slip it in the Pi and switch on. Then just follow the on-screen instructions and you can have a range of different Pi Compatible OS flavours available (I did this so I can have a 'straight' Debian install as well as an xbmc install).

    Confession 2: I 'cheated' slightly in doing this section myself as I have an old usb wireless keyboard with a touchpad mouse on it that I've got on the other USB socket on the pi, so I just navigated the berryboot menus using that. If you don't have one I suspect you could probably do it using just a wired keyboard and tabbing through the berryboot menus. If you have neither and are confident with these things you can do a 'headless' installation using VNC to remote in to Berryboot and control it that way, there's guidance on how to do this on the berryboot website.


    In the first instance select Debian Wheezy and tell berryboot that you'd like to install to the USB hard-drive, now go and get a cuppa and a couple of hob-nobs cos it's going to take a while to download and install. This is all automated, you should be able to watch the bars go by on your telly via the hdmi output.

    When the first boot menu runs set the appropriate timezones etc and make sure you select 'don't boot in to graphical interface' and 'run SSH server on startup' finalise the install and let it complete. This is a good moment for a cuppa, it's gonna take a little while to work through this. (Confession 2(a) I did this on the telly using my USB keyboard explained in Confession 2)

    Recommended: Once the installation is complete log in over ssh to the pi and run the traditional debian sequence of commands to make sure the software is fully up to date

    To check for updates

    sudo apt-get update

    To install non critical upgrades
    sudo apt-get upgrade

    To install system upgrades
    sudo apt-get dist-upgrade

    For each of theses you'll see a load of stuff happening and eventually you'll be returned to the prompt where you can go for the next one. Once they're all done reboot for luck ;-)

    sudo shutdown -r now

    You've now got a fully up to date and functional computing device!

    Java


    Once you've got your basic debian installation up and running.

    After a bit of playing it's clear that madsonic works much faster with the latest version of Java, I used the tutorial from here: http://www.savagehomeautomation.com/...x-develop.html to get it upgraded on my pi. The main difference I took was to just download the java files straight to the pi rather than to another box first and copying them across, to do this I

    Key steps:


    SSH in to Pi and navigate to the home folder (should actually be there by default, if in doubt use pwd to determine the present working directory if it's not /home/pi then do cd /home/pi to change to that directory)

    Code:

    wget http://www.java.net/download/JavaFXa...ov_2012.tar.gz

    will download the tarball to the pi's home folder

    Thereafter it just follows the steps in the guide:

    unpack the Oracle JDK .gz file using this command:

    tar xvzf ~/jdk-8-ea-b36e-linux-arm-hflt-29_nov_2012.tar.gz

    Make a folder to move the files to:

    sudo mkdir -p -v /opt/java

    and move them:

    sudo mv -v ~/jdk1.8.0 /opt/java

    you can now delete the source:

    rm ~/jdk-8-ea-b36e-linux-arm-hflt-29_nov_2012.tar.gz

    To complete the JDK installation let the system know there is a new JVM installed and where it is located:

    sudo update-alternatives --install "/usr/bin/java" "java" "/opt/java/jdk1.8.0/bin/java" 1

    And finally tell the system that we want this JDK to be the default Java runtime for the system:

    sudo update-alternatives --set java /opt/java/jdk1.8.0/bin/java


    I also followed the stages describing how to add the java_home environment variable for good measure.

    Subsonic / Madsonic

    We'll start with Subsonic just to get you going, if enough folk are interested and can't work it out for themselves we can carry on to Madsonic further down the thread.

    Get the installer for Subsonic:

    You can find the latest stable version or the latest beta version on the Subsonic download page. Make sure you follow the download links to SourceForge *until you see a ‘Direct Link’. Right click that link and select ‘Copy Link’. You can then right-click the ssh window to paste the URL there.

    SSH in to the pi

    wget [right-click paste url or shift - ins to paste]*-O subsonic.deb

    Once downloaded install the package

    sudo dpkg -i subsonic-x,x.deb (with the x's replaced with your version number, probably 4.7)

    There's some good instructions here: http://mj2p.co.uk/?p=7 the variation I've used is that rather than creating the new user (subsonic_user) I've just kept the username 'pi' and that's the one that I've adjusted /usr/default/subsonic to refer to so that subsonic runs with only user privileges rather than admin (root) privileges.

    Home Run


    The final significant hurdle to cross is that you need to amend the version of FFMPEG that's installed as the one that comes with subsonic doesn't work on the pi, again the instructions to do this are here: http://mj2p.co.uk/?p=7 and it's a simple install of a couple of packages, the deletion of the wrong ones and a copy of the correct one in to the right location.

    The final simple step is to make a media folder and copy your media in to it. I'm not going to preach on how to organise your media, I have everything in idividual album folders in a folder called music and that works fine for me! From Windows using WinSCP is a great simple tool to copy across, on linux I just just scp from the command line to copy files in to the pi.

    mkdir /home/pi/music

    scp -r route/to/files/on/localmachine pi@raspberrypi:/home/pi/music

    At last (if you haven't already for a cheeky look) you can log in to subsonic and set it up from within the application. Look up on your router what the IP of the pi is (or if you know because you've set the router to always assign the same address and with firefox go to 192.168.1.xxx:4040 (where the xxxs are replaced with the actual address and you should be presented with the subsonic log in page. The default user and pass is admin admin and you should change the password before anything else. Thereafter it's all fairly straightfoward!

  2. #2
    Join Date: Oct 2008

    Location: Glasgowshire

    Posts: 9,683
    I'm Gary.

    Default

    Thanks for sharing, looks good!

  3. #3
    Join Date: Apr 2011

    Location: Dublin

    Posts: 232
    I'm Simon.

    Default Re: Recipe for a budget digital media streaming server

    I was looking at a raspberry pi for a music server. But there was a problem with usb audio to a dac a few months ago

    Sent from my HTC One X using Tapatalk 2
    Source: Thorens TD124 Rega RB300, Sumiko bluepoint No2., Cambridge Audio D500 Special Edition CDP, Squeeze box Touch, PC with Trends Audio USB Audio DAC UD-10 Amplification: Croft Micro 25 basic pre, Leak Stereo 20, Trends Audio Class T TA-10, Fisher X100-A Speakers:Impulse H6 Interconnects: Handmade silver and TNT audio CAT5 speaker cables

  4. #4
    Join Date: Sep 2012

    Location: East Anglia UK

    Posts: 1,219
    I'm Marc.

    Default

    Hi Simon,

    I'll test it out with a USB soundcard this weekend and will get back to you, as that is the bit I've not directly tested out (I'm using to serve up audio to all the other machines in the house but I've not actually directly played any audio out of the Pi itself).

    However I can't imagine it's going to be an issue thought as I've cribbed lots of the info for the recipe here from folk who are doing just that, there might be issues with some of the 'audiophile' dacs (the sorta semi homebrew stuff) but I'm confident that the little behringer I linked to (or my much beloved but 'out of date' edirol which I'll run the test with this weeked) will work fine.

    EDIT: Great article here (better than mine!) about setting up a pi with a Sabre DAC (mentioned elsewhere on this board) http://www.audiohobby.com/raspberry-pi-for-audiophiles/ albeit using mpd rather than subsonic.

    Thanks Gazjam, it sounds good too!
    Last edited by Rothchild; 08-03-2013 at 08:19.

  5. #5
    Join Date: Mar 2009

    Location: London UK

    Posts: 529
    I'm Chris.

    Default

    Quote Originally Posted by simon e View Post
    I was looking at a raspberry pi for a music server. But there was a problem with usb audio to a dac a few months ago

    Sent from my HTC One X using Tapatalk 2
    A fatal design flaw? Problems revolve around USB/ethernet on same bus, ie. no proper ethernet. USB Audio at 16bit/44.1KHz is apparently fine. This site says the Hiface2 XMOS based device works OK at red book res, so that implies USB audio class 2 can function.

    http://www.raspyfi.com/supported-dacs/

    Only other question is about the appropriate power supply for the Pi to match overall USB power drain. Hence people using power USB hubs in some cases.
    Chris

    Stuff

    1. Linux PC with onboard HDA SB/ALC892 24/192 optical S/PDIF and/or USB > TC-7520 (Gator + LM4562NA) > Quad 306 > AVI Neutron 3
    2. Rotel RCD 965BX > TC-7520 ( Gator + LM4562NA) > Hd595
    3. Rpi B+/HifiDigi B+ (with isolation transformer) Running "SqueezeOnArch" - https://github.com/SqueezeOnArch
    Nonsense
    1. Belkin Pure AV (white) phono, Belkin Pure AV (silver) USB, QEd 79-strand speaker cable.
    2. MG belden digital co-ax

  6. #6
    Join Date: Mar 2009

    Location: London UK

    Posts: 529
    I'm Chris.

    Default

    Quote Originally Posted by Rothchild View Post
    Hi Simon,

    I'll test it out with a USB soundcard this weekend and will get back to you, as that is the bit I've not directly tested out (I'm using to serve up audio to all the other machines in the house but I've not actually directly played any audio out of the Pi itself).

    However I can't imagine it's going to be an issue thought as I've cribbed lots of the info for the recipe here from folk who are doing just that, there might be issues with some of the 'audiophile' dacs (the sorta semi homebrew stuff) but I'm confident that the little behringer I linked to (or my much beloved but 'out of date' edirol which I'll run the test with this weeked) will work fine.

    EDIT: Great article here (better than mine!) about setting up a pi with a Sabre DAC (mentioned elsewhere on this board) http://www.audiohobby.com/raspberry-pi-for-audiophiles/ albeit using mpd rather than subsonic.

    Thanks Gazjam, it sounds good too!
    Great stuff, Marc. You've almost persuaded me to join the PI gang. P.S. The Behringer UCA202 has the same USB receiver chip as the TC-7520 and Caiman DACs.
    Last edited by Krisbee; 08-03-2013 at 22:23. Reason: addition
    Chris

    Stuff

    1. Linux PC with onboard HDA SB/ALC892 24/192 optical S/PDIF and/or USB > TC-7520 (Gator + LM4562NA) > Quad 306 > AVI Neutron 3
    2. Rotel RCD 965BX > TC-7520 ( Gator + LM4562NA) > Hd595
    3. Rpi B+/HifiDigi B+ (with isolation transformer) Running "SqueezeOnArch" - https://github.com/SqueezeOnArch
    Nonsense
    1. Belkin Pure AV (white) phono, Belkin Pure AV (silver) USB, QEd 79-strand speaker cable.
    2. MG belden digital co-ax

  7. #7
    Join Date: Sep 2012

    Location: East Anglia UK

    Posts: 1,219
    I'm Marc.

    Default

    Quote Originally Posted by Krisbee View Post
    Great stuff, Marc. You've almost persuaded me to join the PI gang. P.S. The Behringer UCA202 has the same USB receiver chip as the TC-7520 and Caiman DACs.
    Come on in, the water's lovely! ;-)

    It would appear that some folk are having issues with beyond CD quality audio on the Pi. I hadn't come across these issues prior to posting as I don't use anything above 16bit 44.1 for anything other than in my recording work (for headroom). So, in practical terms, it just works. Indeed, imo, it sounds damn fine streamed as flac through my RME soundcard (using vlc or clementine) on my PMC monitors in the studio, but I don't have golden ears...

    When the most expensive component is the hard drive and the total cost is still less than a lot of people spend on speaker cable (by some margin) then it's gotta be worth a go, surely.

  8. #8
    Join Date: Apr 2011

    Location: Dublin

    Posts: 232
    I'm Simon.

    Default Re: Recipe for a budget digital media streaming server

    I may have to get one, just to see how it sounds compared to the squeeze box. I believe someone as developed a squeeze server and player which run on the pi.

    Sent from my Nexus 7 using Tapatalk HD
    Source: Thorens TD124 Rega RB300, Sumiko bluepoint No2., Cambridge Audio D500 Special Edition CDP, Squeeze box Touch, PC with Trends Audio USB Audio DAC UD-10 Amplification: Croft Micro 25 basic pre, Leak Stereo 20, Trends Audio Class T TA-10, Fisher X100-A Speakers:Impulse H6 Interconnects: Handmade silver and TNT audio CAT5 speaker cables

  9. #9
    Join Date: Sep 2012

    Location: East Anglia UK

    Posts: 1,219
    I'm Marc.

    Default

    Squeeze compatibility is looking quite good (although I've not tested it myself)

    http://www.squeezeplug.de

    With more discussion and info here

    http://www.raspberrypi.org/phpBB3/vi...p?f=38&t=10666

    Doesn't look like it will be too long before someone hacks up the tools needed to avoid having to use a USB interface and building a solution to feed the DAC from the GPIO pins, using i2s, on the Pi. I suspect at that point it will become a very serious proposition for HD audio fans.

    http://www.raspyfi.com/anatomy-of-a-...b-connections/

  10. #10
    Join Date: Sep 2012

    Location: East Anglia UK

    Posts: 1,219
    I'm Marc.

    Default

    Has anyone actually taken the plunge and bought a Pi to run their home media needs?

    Mine's been up 24-7 since I set it up and appears to be rock solid. I nearly destroyed my phone data allowance using it to listen to tunes in the car, and I'm loving it to listen to FLACs over the home network in my studio.

+ Reply to Thread
Page 1 of 6 123 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •