Skip to content
This repository was archived by the owner on Jul 3, 2020. It is now read-only.

Getting Started on the Raspberry Pi

matt1 edited this page Aug 13, 2012 · 10 revisions

To get up and running on the Raspberry Pi is simple but you'll need to make sure you've got some software installed and ready to be get started.

Installing pre-requisites

Lets get started first by installing Java and MPlayer. These are tools for building software and for playing back media files. I also had to install Pulse Audio to get any media playback working at all on my Raspberry Pi.

Make sure you are connected to the internet on your Raspberry Pi first as these commands will install software from the net:

  • sudo apt-get install openjdk-7-jre pulseaudio mplayer

These will take a minute or two to install depending on your internet speed. Run "sudo apt-get clean" afterwards to clean up some of the cache files and save some space.

Downloading the software

We now need to download the actual CLI Media Renderer software. We do this using a tool called "wget" (i.e. Web Get) that can download files from the internet for us.

What we've just downloaded is the "JAR" file which is a Java ARchive file - it contains the Java software. We also downloaded a properties file that helps us configure the CLI Media Renderer

Configuring the software

There isn't too much to do here. Basically you just need to open up cliMediaRenderer.properties with your favourite editor on the Raspberry Pi (e.g. nano or vi).

Here are some of your options:

name

This is a name for your audio player so you can recognise it if you have more than one running on your network. This name could be "bedroom", "living room", "study" etc - its just a name.

icon

This allows you to pick a custom icon if you want - these should be 48x48 256 colour PNGs.

playerType

This specifies the type of palyer we're using. For now we're only supporting mplayer so please leave it at that.

mplayerPath

This is the path to MPlayer on the system. On my Raspberry Pi it is "mplayerPath=/usr/bin/mplayer"

Running the software

Now we can run the actual software

  • java -jar cliMediaRenderer.jar

After a moment you'll see the software start up and will be ready to control from a UPnP control point.

Troubleshooting

Music just stops randomly! Whats going on!

Chances are that the software has crashed - sorry, this happens. If you are using a wifi connection make sure you're also using a powered USB hub; I found that streaming the MP3 over the network, decoding a MP3 and actually outputting audio was too much just for on-board power, so I used a powered hub and the issue went away.

I cant find the media renderer from my control software!

It takes about 10-15 seconds for the software to be ready to receive a connection on the Raspberry Pi - this is because java is pretty slow right now due to the lack of a decent JIT compiler. Please wait a good 20-30 seconds before refreshing devices. Sometimes you will need to refresh once or twice as the response might not come back in time, again because java is slow on Raspberry Pis!