-
Notifications
You must be signed in to change notification settings - Fork 2
Getting Started on the Raspberry Pi
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.
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.
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.
- wget https://raw.github.com/matt1/CLIMediaRenderer/master/cliMediaRenderer.jar
- wget https://raw.github.com/matt1/CLIMediaRenderer/master/cliMediaRenderer.properties
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
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:
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.
This allows you to pick a custom icon if you want - these should be 48x48 256 colour PNGs.
This specifies the type of palyer we're using. For now we're only supporting mplayer so please leave it at that.
This is the path to MPlayer on the system. On my Raspberry Pi it is "mplayerPath=/usr/bin/mplayer"
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.
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.
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!