Ubuntu + mpd + Jinzora + Hi-Fi == ACE

Ok, so here’s the problem:

  1. I have a decrepit old PC that I need to find a job for or it’s destined to sit on a scrapheap biodegrading over the next 10,000 years.
  2. We don’t have room to have all our CDs anywhere near handy so have to listen to our music on the computer speakers.
  3. We have a very good and very expensive hi-fi seperates system going to waste.

Here are contributing issues:

  1. Despite having a nice hi-fi, we’re not too bothered about the loss of quality of playing stuff via MP3 because we rarely get a chance to actually sit and listen these days – it’s generally background.
  2. We don’t like have cables stretched across the room and the PC is too far from the hi-fi to have a cable run.

So here’s the solution.

First of all, nab a copy of Ubuntu Server from http://www.ubuntu.com. Ubuntu is a Linux distribution based on Debian and is free software.

Next, we need to stick in a big enough disk to hold all the MP3s. In our case, I put in two disks in a RAID1 (mirrored) configuration cos I really don’t want to have to rip all those CDs again if we lose the disk.

Now then – time to get the “server” out of the middle of the living room before my lovely wife batters me – it’s duly lugged behind the TV unit (where the hi-fi is) and the sound output connected to the amplifier. Also, this particular machine has a USB wifi dongle plugged in (Thanks Dad!) so there’s no need for trailing network cables.

So, boot it up and off it goes. When installing Ubuntu, I told it I wanted a LAMP (Linux, Apache, MySQL, PHP) machine – it’s easy enough to set up normally, but Ubuntu does it all for you. I also installed openssh-server so I can actually log in to the thing.

Next thing I need are a couple of extra pieces of software:

  1. GD PHP extensions – for manipulating images from PHP scripts.
  2. MPD – the music player daemon. This little wonder sits on a network port and waits to be told what to play.
  3. MPDscribble – an optional one this, but it basically submits everything played by MPD to my Last.FM profile, so you can see it listed on the right of this site.
  4. Some extra codecs – Ubuntu, by default, doesn’t provide support for restricted formats like MP3. As it happens, I wanted to check that the audio was all working so installed mp3blaster – that pulled in all the restricted modules as dependencies so Iรƒโ€šร‚ย  didn’t have to specify them manually. I also needed a mixer program to make sure the volumes were set properly.

The following terminal command does all that:

sudo apt-get install php5-gd mpd mpdscribble mp3blaster rexima

Grind crunch grind all done. First of all I ran rexima to set the mixer volumes. ACE.

Now then – time to get some music on it. I scp’d my MP3 files to /home/jmd/music. MPD, by default (on Ubuntu at least) looks in /var/lib/mpd/music for music files. I have the choice of either changing /etc/mpd.conf to point to /home/jmd/music or replace /var/lib/mpd/music with a symlink back to /home/jmd/music. I did the latter cos it’s a bit neater. Then I made sure that /home/jmd/music was readable by the apache user. One restart of mpd later and it can find all my music. ACE.

Now then – how will I control the thing remotely? The answer is via a web browser. Remember we told Ubuntu to set up a LAMP server? Well, it was off to http://www.jinzora.org to download the latest release. Jinzora is a full-featured web based jukebox which, as well as providing an interface to a local mpd instance, can also stream music from the server over the internet. I’m not interested in the streaming part (although it might be useful for listening to The Goons in my bed via my wireless Ubuntu laptop :)), just the mpd jukebox part.

So, download Jinzora, untar it and copy the contents to /var/www, followed by a quick chown www-user:www-user of the files so it can modify itself, and then follow the instructions.

The result – I can play, update, organise and manage our music collection via a web browser and it plays back via the hi-fi. ACE.

I’ve done this kind of set up before so it took my literally 15 minutes (excluding the time taken to copy 40Gb of MP3s over the network) to set up – I reckon a first time user could do it in less than an hour.

Now begins the tweaking!

Related posts

Creating a Bramble

So, my current Raspberry Pi cluster isn't really a true cluster - it's really...

OUTAAAAGE!

So, nelefa.org fell off the internet last night, for the first time since 1997....

Latest posts

Horse Whisperer (1998)

M'okay, overbearing workaholic mum takes extremely traumatised daughter and her equally traumatised horse to...

Make that two years

The Web is dead, consumed by adverts that chase you around the page, cat...

Oh my.

So, it looks like I'm averaging a post a year at the moment. That's...

State of the cluster

Here we see, in all its glory, the little mini-cluster of Computery Goodness which...

Creating a Bramble

So, my current Raspberry Pi cluster isn't really a true cluster - it's really...

Abe Yospe’s Wife.

There is a scurrilous rumour circulating that Abe Yospe's wife googles things really quickly...

8 comments

  • What were the specs on the ‘decrepit old PC’? I have one of them too…..

    thanks

    j

  • It’s an ancient Dell box – 700MHz Celeron, 256Mb, with a couple of 200Gb Disks (although I’d have got away with a couple of 80Gb disks without any bother). It’s responsive enough – I guess the only upgrade I’d think of would be a little more memory to allow the database to breathe.

  • KiaOra + H20 + Tumbler == ACE Orangey Drink

  • Ta. I have AMD Athlon 700 MHz, 256 Mb, the original 20 G disk with the OS, W98se, on it and everything else on the 80 G I added. I’m really only using it for photo storage and backup of the other (real) computers, but I like your solution. Thanks again.

  • When I give the sudo apt-get install command it cannot find the mpd package, and others. Are there some repositories I need to add? Thanks in advance.

  • mpd uses various codecs (mp3 decoders, for example) that aren’t in the standard (i.e. Free Software) repositories, but are in the restricted / universe / multiverse repositories. From the command line, edit /etc/apt/sources.list and check that all the repositories are uncommented and then run an apt-get update to re-read the available packages. You can check it’s working by doing an apt-cache search mpd.

    From the desktop, you can also enable extra repositories by going to the package manager (in the system menu) and going into the settings. Lemme know how you get on ๐Ÿ™‚

  • have you tried gnump3d? it certainly fits the bill for me as an mp3 daemon and works with itunes, amarok and winamp.

  • […] so some of you will remember this article where I was babbling on at great length about setting up a media center using mp3, jinzora, […]

Leave a Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.