I’ve been using Zattoo for some time now, and it’s quite good, the best TV Streaming solution I know so far. The one downside for me was that it was still a Windows/Mac thing only, and my Operating System of choice (OpenSuSe) was being left out (as it happens too often). I’ve even installed VMWare just to use it, but it’s resource hunger made it quite unusable, so I had to resign and had to install Windows on one of my Computers. But that’s over now Zattoo has released a Client for Linux and guess what, OpenSuSe is one of the 3 supported distros
What is surprising is that the Linux Client works by far better than the Windows client (I can’t compare it to the Mac client because I have no Mac), no image fragments, no sound skipping and the buffering takes less. And thus one reason less to have a Windows machine around
I love my music, I really do. Problem is however that I have far too much of it (2980 Songs, 16 GB currently, not counting audiobooks etc…) to carry it around with me all the time. It just doesn’t fit on my iPod Mini, nor does it fit on my notebook (I know shame on me, but I need the diskspace for work too). So I always have to carry around a selection of the songs I want to listen too, and far too often just the song I want to listen too is on my fileserver, and the trouble to transfer it to my notebook takes too long for me to be still in the mood to listen to it… Pitchfork is the solution to all of my problems, well almost all… Pitchfork allows me to stream my music over my Local Network, and over the internet, with a nice and responsive interface that facilitates access to my songs.
Installing MPD
Since Pitchfork is based upon MPD, which will take care of streaming the data to the various clients and maintain the song database, we will first have to set it up. Sadly my distro (OpenSuSe 10.2) doesn’t have a version of MPD in its package management, so I had to download the sources and compile it myself:
wget http://www.musicpd.org/uploads/files/mpd-0.12.2.tar.bz2
tar -xvjf mpd-0.12.2.tar.bz2
cd mpd-0.12.2/
Now we have the sources, and we have to check that we have all the dependencies. Depending on how you are going to use MPD you have to have the following packages (along with their devel packages):
libshout: because we will be streaming the songs to an Icecast server
oss: as far as I know this is the most widely used and best supported. If it doesnt work take a look here
libmad: for mp3 support
libogg: for OGG Vorbis support
libvorbis: for Metadata support for Vorbis formats
Quite a long list, but this is about the most essential stuff, if you have some special needs take a look at the official dependency listing.
Now it’s time to get to the actual compilation:
./configure
make
sudo make install
After the configure step, you’ll see a list of options that are turned on or off, if something is missing it probably means that you are missing some development packages.
So now we have mpd installed, the next step is to configure it. First you have to move the example configuration to the correct location:
sudo cp doc/mpdconf.example /etc/mpd.conf
Then we edit it according to our needs, especially the location of the Songs, Logfiles and Database should be changed:
music_directory "/storage/Music/"
playlist_directory "/storage/Music/playlists"
db_file "/var/lib/mpd.db"
log_file "/var/log/mpd.log"
error_file "/var/log/mpd.error"
pid_file "/var/run/mpd.pid"
The pid_file has to be uncommented since we will run MPD in daemon mode, and we want to shut it down later. Now let’s create these files and change the owners:
“mpd” being the user that will later run the daemon (if you don’t have an mpd user refer to your distro documentation on how to create one. It is really important that the mpd user is in the sour). Next we have to set some more settings:
user "mpd"
audio_output {type"oss"
name "Direct OSS output"}
audio_output {type"shout"
name "Icecast Stream"
host "localhost"
port "8000"
mount "/mpd.ogg"
password "youricecastpassword"
bitrate "96"
format "44100:16:1"}
mixer_type "oss"
mixer_device "/dev/mixer"
mixer_control "PCM"
mixer_type "software"
Initializing the database:
mpd --create-db
This will insert all your songs into the database for faster access. Now MPD is set up and should work. Try with
sudo mpd
MPD will complain that it can’t connect to the Icecast server (which we’ll setup a few lines below this, but everything else should work fine.
Installing Icecast
As I said, my Music resides on a fileserver, and I want the songs to be streamed directly to my other machines, so what’s better than Icecast, an opensource streaming solution, used by many internet radios out in the wild. Luckily most distros have it in their packagemanagement software (I know openSuSe has ) so it shouldn’t be too hard to get it up and running, just make sure that the source password in /etc/icecast.xml matches the password you specified above, in the /etc/mpd.conf file.
Installing Pitchfork
Installing pitchfork is pretty straight forward. All you need is this:
Please refer to your distro documentation to see how to setup these. My setup uses an apache 2 server with mod_php, and Firefox 2 on my notebook. Now to the installation itself, depending on your distribution the document root of your webserver is /var/www/htdocs or /srv/www/htdocs, change to that directory and do the following:
wget http://pitchfork.remiss.org/files/pitchfork-0.5.2.tar.bz2
tar -xvjf pitchfork-0.5.2.tar.bz2
cd pitchfork-0.5.2/
chmod a+rwx config/
The rest of the configuration is done through the browser, just point your browser to http://localhost/pitchfork-0.5.2/ if you installed pitchfork on the computer you’re currently on, or replace localhot with the IP of your server. Change whatever you’d like to change (but it should not be necessary as the important configuration is done in MPD itself), and then press Save and you’ll be taken to the Pitchfork interface. Voila, it’s all done
Installing mpdscribble (optional)
I’m a huge fan of Last.fm, but sadly I can’t update my profile using the Player, because the songs are streamed to it. So why not use the MPD to update them for me? For this purpose I will be using mpdscribble:
wget http://www.frob.nl/projects/scribble/mpdscribble-0.2.12.tar.gz
tar -xvzf mpdscribble-0.2.12.tar.gz
cd mpdscribble-0.2.12
./configure
make
sudo make install
Now create the basic configuration
mkdir ~/.mpdscribble
It is suggested that mpdscribble is run as your user since it has read access to your username and password-hash. Edit the configuration file ~/.mpdscribble/mpdscribble.conf as follows:
username = "lastfm_username"
password = "md5sum of lastfm password"
Where the md5sum can be found using either this tool or the command line md5sum tool:
echo -n "your_lastfm_password" | md5sum
And that’s it, mpdscribble is set up and ready to be run: