XBMC Internet Video Streaming – Raspberry PI

I am always amazed at the quality of video that comes out of the PI. Up to now i have just been doing local lan and usb video streaming. I decided to check out how it does with internet video. For those that do not know, their is not a “youtube” app for the PI. So, other than starting up a web browser, this is pretty much the way to go.

Here is a real time video of me installing IGN.com streaming and going through a couple videos. 1080p:

Strip streams from Shoutcast.com

Basically this is how to grab the direct http address to a specific radio station in shoutcast. That way you can add it to mpc or another streaming radio player without needing a webrowser running.

First things, install the free VLC media player

Then browse to the shoutcast.com page and find the HELP drop down box.



Select the following option to play it in your own media player

  • Play SHOUTcast stations in default media player ( eg: Winamp / iTunes / Windows Media Player )

Go find a station to play and click on it. You should get the option to open the .pls file. If it doesnt open in vlc you may need to change your default programs so that vlc opens .pls files.

After vlc opens the stream, you should begin to hear the station. Go to TOOLS and open MEDIA INFORMATION.

At the bottom is the stream “location”.

copy this and paste it into your favorite music player.

mpc example:

  1. mpc add
  2. mpc play

Raspberry Pi – Xbox Motion Cam Setup

#Update and Upgrade your Raspberry PI

  • sudo apt-get update
  • sudo apt-get upgrade -y

#Plug in Camera directly to raspberry pi or into hub and check to see if it is detected

  • lsusb

#install the Motion software. Motion Software Guide

  • sudo apt-get install -y motion

#Find and change settings

  • sudo nano /etc/motion.motion.conf



#Start Motion Service

  • sudo service motion start

#Browse to the webpage on your pc to see the camera feed


#to access the pictures directly from your windows computer, use a program like WinSCP to ftp into /tmp/motion and copy the files to your desktop.


#example pictures taken with the default picture settings 320×240 jpgs. Around 15k per picture.

Xbox Motion Capture Test 02 Xbox Motion Capture Test 01

Raspberry PI – “Headless” Streaming Radio Build

This is a compilation of various Google searches. A record of the commands i used to turn a raspberry pi model b into a streaming radio player that can be controlled by MPD apps such as the IOS app MPoD. Although these instructions end with the adding of BBC channels 1-6, you can add any stream that is compatible with MPD/MPC.

This is based off the Raspbian “Wheezy” image found here: http://www.raspberrypi.org/

The raw image and the noobs image both work fine.

This is a windows based tut so i used Win32DiskImager to write the image to my SD card.

Once you know the ip of the Raspberry, ssh into it with a program like Putty. If you use the console (screen connected to the raspberry), you will not be able to copy and paste. rc.local is configured to display the IP address on the local console every time it boots up. But you can always type IFCONFIG to find it manually.

Reconnecting with Putty: After each reboot, just click on the putty title bar and “restart”. This way you will not have to keep opening another session and repeatedly typing the IP address.

Putty into Raspberry PI

Username: pi
Password: raspberry

If you have not already done so at the console, enter sudo raspi-config to enter the initial config program

  • Expand the file system
  • Set Hostname to piradio or whatever you want
  • Change the password if you want
  • Go to the Advanced options
    • Enable SSH
    • Update tool
    • Exit to command line

Open each of the following links and copy/paste all the commands in order. Lines with # are comment lines and do not need to be run.

  1. Update and Upgrade Firmware – Some older firmwares have noise “issues” when idling.
  2. Install Audio and MPC/MPD
  3. Add BBC1-6 radio streams and MPC Play Command – or add your own

Setup your mobile device

  1. Install a free MPD app on your mobile device such as MPod on IOS or MPDroid on android. No username/password needed.
  2. If it does not automatically find the device, manually add one using the above HOSTNAME or IP address. I recommend the HOSTNAME as the current setup for IP is DHCP and your IP could possibly change.

Notes: Although it is set to automatically start, sometimes it will not. The simple solution is to just open your mobile app and wait for it to say the station is available and hit play.

If you want to control the player from CLI:

    • MPC : show stats
    • MPC play : umm play
    • MPC stop :  yeah stop
    • MPC help :

Raspberry PI – Add BBC1-6 radio streams and MPC Play Command

# Add BBC channels to MPC
mpc add http://bbcmedia.ic.llnwd.net/stream/bbcmedia_intl_lc_radio1_p?s=1365376033&e=1365390433&h=a0fef58c2149248d6bff1f7b7b438931
mpc add http://bbcmedia.ic.llnwd.net/stream/bbcmedia_intl_lc_radio2_p?s=1365376067&e=1365390467&h=d43dc8ae0f888809462a6cb7c389b46b
mpc add http://bbcmedia.ic.llnwd.net/stream/bbcmedia_intl_lc_radio3_p?s=1365376123&e=1365390523&h=d53cf2a92272f3289b314a2251d23bc8
mpc add http://bbcmedia.ic.llnwd.net/stream/bbcmedia_intl_lc_radio4_p?s=1365376126&e=1365390526&h=ed9a0642b30c422b07fbcd8683c52335
mpc add http://bbcmedia.ic.llnwd.net/stream/bbcmedia_intl_lc_5live_p?s=1365376271&e=1365390671&h=e0d82133f35ae74d41d5eab6b9c150a6

mpc add http://bbcmedia.ic.llnwd.net/stream/bbcmedia_intl_lc_6music_p?s=1365376386&e=1365390786&h=de40a9915206c4402c73e3766dc3fec0

# Start radio when pi turns on

sudo nano /etc/rc.local

#At the bottom add the following line

mpc play




MPC play


Raspberry PI – Install Audio and MPC/MPD

# Install Audio
sudo apt-get -y install alsa-utils mpg321 lame
sudo modprobe snd-bcm2835

# Set audio output to analog (0=auto, 1=analog, 2=HDMI)

# in this example the “1” is the option you would change to 2 if you wanted to use the HDMI jack
sudo amixer cset numid=3 1

# Test Audio
aplay /usr/share/sounds/alsa/Front_Center.wav
speaker-test -t sine -f 440 -c 2 -s 1

#Install MPD and MPC audio players
sudo apt-get install -y mpd mpc
sudo service mpd stop
sudo chmod -R g+w /var/lib/mpd
sudo chmod -R g+w /var/run/mpd

#remove bind to address
sudo nano /etc/mpd.conf

#Find the line that says bind_to_address “localhost”,  and put a # in front of it or remove the entire line




sudo shutdown -r now

Raspberry PI – Update and Upgrade Firmware

# Update all Raspbian packages.
sudo apt-get -y update
sudo apt-get -y upgrade

# Install rpi-update
sudo apt-get install -y git-core
sudo wget https://raw.github.com/Hexxeh/rpi-update/master/rpi-update -O /usr/bin/rpi-update
sudo chmod +x /usr/bin/rpi-update

# Backup the existing firmware.
sudo cp /boot/start.elf /boot/start.elf.knowngood

# Update to the latest firmware and activate it.
sudo rpi-update
sudo shutdown -r now