Log in

View Full Version : New Pi Recipe - Intermediate and above skills needed



Rothchild
28-06-2015, 10:15
It's been a little while since I originally posted my recipe for a digital streamer using a Raspberry Pi (http://theartofsound.net/forum/showthread.php?24351-Recipe-for-a-budget-digital-media-streaming-server) and it seems like the world and his dog have now caught up with me ;)

So, what with all the developments of the past 2 years I thought I'd have a little rethink of my streaming setup, reset and refresh a couple of items.

This is very much still a work in progress but I thought I'd start off here now as there are a number of AOSers who have good hacking knowledge and may want to contribute to tweaking out this setup.

The main change I'm making to my setup is that I'm basing it on 'DietPi': http://fuzon.co.uk/phpbb/viewtopic.php?f=8&t=6 a super-lightweight debian/raspbian hardfloat distro (a native boot runs something like 18 processes, uses about 3% processor and 35mb ram)

The issue I'm working through is that by default it only installs a root user, which has caused issues later down the line with installation of other apps (mopidy)

First thing to do after initial installation is to follow these notes to set up a user (obviously you don't have to call them 'pi' ;-)) http://fuzon.co.uk/phpbb/viewtopic.php?f=9&t=22

I've stopped short of disabling the root account as it's still useful whilst setting the box up but ultimately it will probably go. Also, because of the root account business I've not used the very easy to use software installer app (if you want it will run up an mpd install with a lightweight webclient (YMPD) and DNLA server in about 10 clicks). Preferring instead to use 'sudo apt-get package' from my user account to install apps (and to grab YMPD from their website and install it manually).

I've switched back from madsonic to subsonic (www.subsonic.org) just download the .deb to the pi and sudo dpkg -i subsonic-etc-.deb and it will install.

Fortunately Oracle Java is now in the repositories so installation is a simple apt-get away, however you may need to run: sudo update alternatives --config java to ensure you're running on java 8

You'll also need to redirect Subsonic to the correct version of LAME and FFMPEG by using these commands:

sudo ln -fs /usr/bin/ffmpeg /var/subsonic/transcode
sudo ln -fs /usr/bin/lame /var/subsonic/transcode

Mopidy have a debian repository so installation is pretty straightforward, however configuration isn't as easy. I've found (so far) that it's better to disable the mopidy mpd server and use 'proper' mpd from the debian repo. The main reason I've got it installed at all (with the manual start option) is because at some point I'd like to play with the spotify integration.

That said Subsonic does pretty much everything I need anyway so ultimately I might ditch mpd and mopidy and save that small amount of ram and processor.

Currently I'm just on the jack output while I wait for the headerpins I've ordered so I can solder them up to the i2s interface and mount my Sabre ES9023 DAC.

Interested to know if anyone else has tried dietpi and has any other streamlining and efficiency tips?

Rothchild
09-07-2015, 10:49
After a week of fiddling with this I'm getting quite a nicely tweaked setup running.

For now I've parked the 'create a non-root user' element of the build and am just using the default dietpi settings.

The basic hifi install works really well and is super lightweight (both in memory use and processing power)

Also the subsonic install was super easy, just downloaded the subsonic .deb from their site, used dpkg -i to install it, installed ffmpeg and lame (using apt-get) added the symlinks

ln -fs /usr/bin/ffmpeg /var/subsonic/transcode
ln -fs /usr/bin/lame /var/subsonic/transcode
(don't need sudo as we're logged in as root)

And away we go, happily streaming transcoded audio out across the internet to my phone and other computers and playing native flac files in jukebox mode (via the i2s dac) on the hifi.

Couple of further tweaks I'm going to make are to reformat my usb drive to ext4 so there's less processor overhead in addressing the file system on that drive and to set up an rsynk back up with the other drive plugged in to the back of my router (and shared over samba) so that I have a straightforward way of ripping my cd's copying them on one location and having them 'percolate' through my back-up system.

If you like a bit of a fiddle with your pi I totally recommend dietpi!

walpurgis
09-07-2015, 10:57
Hmm. Sounds a right old palaver. I think I'll just stick a record on. :D

Audio Al
09-07-2015, 11:13
Hmm. Sounds a right old palaver. I think I'll just stick a record on. :D

+1

I tried reading the first post :eek: Like reading hieroglyphics :scratch: I'm lost after turning a computer on :scratch:

Enjoy it though :)

Rothchild
09-07-2015, 15:07
Hmm. Sounds a right old palaver. I think I'll just stick a record on. :D

You might like this: http://theartofsound.net/forum/forumdisplay.php?4-Analogue-Art

Rothchild
30-07-2015, 10:41
Fortunately, for any codgers and luddites, the chap who develops Diet-Pi seems to be a jolly nice fellow.

He says he's going to spin up an option to install subsonic from within the (easy to use) diet-pi software installer, which should mean it'll be not much harder to get up and running than volumio or moode (and will mean that we'll have a real alternative to play with - seeing as all the popular current audio oriented distros use MPD or Mopidy).

Definitely one to follow if you like your pi!

Rothchild
31-08-2015, 17:08
Great news!

I've been working with Dan over at DietPi and we've now got a working installation option for Subsonic, making this a great, easy to use alternative for audio on the pi.

Because DietPi is a heavily stripped back version, for building a whole range of devices (from webservers to sound streamers), there are some setup menus to go through to choose the apps you want to install, but it's as simple as clicking through a couple of option menus, picking Subsonic to install the software and selecting the appropriate driver for your soundcard.

If you don't know how to log in to your pi remotely using ssh then you're going to need to have it plugged in to a screen and keyboard but once it's all installed and ruuning it will work headlessly (subsonic has its own web interface but it only configures Subsonic, not the pi).

For more info about all the amazing things that Subsonic can do for you head over to www.subsonic.org

You can get the current image file for DietPi here: http://fuzon.co.uk/phpbb/viewtopic.php?f=8&t=9#p9

Rothchild
06-09-2015, 14:27
For anyone who's not yet taken the plunge (and because it's a nice slow sunday afternoon kicking back with some choons) here's a couple of screenies of Subsonic running on DietPi.

http://i1314.photobucket.com/albums/t575/elkhanos/Subsonic%20Home%20Screen_zpshjvr6iti.png

Here's one where you can see the system monitor running on the pi and see how few processes and little memory the whole thing uses

http://i1314.photobucket.com/albums/t575/elkhanos/DietPi%20Running%20Subsonic_zps2y5w6t7d.png

struth
06-09-2015, 14:43
Quite an attractive looking option Marc. My shopping list looks longer

Rothchild
06-09-2015, 15:12
Yeah, it's quite pleasing on the eye, I'm using the 'simplify' theme (there are a bunch to choose from so probably something to suit most folk).

In this latest version they've enhanced the lastfm integration so each artist page also pulls in extra info about the artist + it will recommend other artists in your collection that are similar, making it easy to have a thematic session.

I'm not a big playlist user but you can do all sorts of stuff there too.

Here's an example of the artist page:

http://i1314.photobucket.com/albums/t575/elkhanos/artist%20view_zps9kwskwav.png

You can see in the bottom left is says 'jukebox' which means I'm using the player that puts the files straight out to the dac with no messing, if I switch it to 'webplayer' then the music starts coming out of my laptop (or whichever device I've connected with) with the stream transcoded to mp3 (to save bandwidth - although I leave it set to 320Kbs you can ratchet it down if you want) the android app is also very good.

Rothchild
08-09-2015, 15:59
Just to note that, according to the DietPi developers list, the next version will also have an LMS Squeezebox installation option - making DietPi probably the most flexible and well equipped platform for music available for Raspberry Pi as it will feature as options:

MDP (fronted by the super lightweight YMPD Web interface)
A DnLA / UPNP server
Subsonic
LMS / Squeezebox

All with a super stripped back core OS.

To celebrate there's a new dietpi website up at www.dietpi.net