Mediacenter

Mediacenter

Probably the most common use-case of a Pi is to setup a media center. In order to start from scratch, we start by installing a operating system to the Pi.
I decided myself for the OpenELEC system (which is the continuation of the raspbmc project). You can download it from here, just pick the precompiled version suitable for your Pi at hand:

OpenELEC download

As I use my old Raspberry Pi for this project, the image that I chose is [shell]OpenELEC-RPi.arm-7.0.1.img.gz[/shell] and I download it to the download folder. There it needs to be unpacked with

[shell]
cd ~/Downloads
gunzip -d OpenELEC-RPi.arm-7.0.1.img.gz
[/shell]

In case you pick the wrong image, you will see only a colorful start screen, but nothing else happens. In case the installation starts properly, it should look this this:

Next we are going to install the OS to the SD-card. For that we put the card into the card reader, connect it to the PC and fist check which device ID the card has and unmount it (if needed). Here, my
SD-card is the devide /dev/sde1, but of course that could be different in your case. Whatever you do, take care that you do NOT perform the next step on the wrong device, you could possibly loose your
data/installation.

[shell]
sudo fdisk -l
umount /dev/sde1
sudo dd if=OpenELEC-RPi2.arm-7.0.1.img of=/dev/sde bs=4M
[/shell]

If you think your device is /dev/sda double check what you are doing, this is most likely your primary disc in the computer! You do not want to erase that one!

Depending on the speed this might take a minute or so. Once the copying is finished, unmount the card and insert it into the Pi. Then we connect all cables to the Pi, add the WiFi usb stick
and eventually the power cable. After a few minutes the automatic installation is ready and we can click through the first configuration files. Usually the defaults are okay and one can just click a few times
on ‘Next’.

To configure then the WiFi we go to the tab ‘Programms’, then ‘Configure OpenELEC’ and then ‘Network’ and there ‘Connections’. There we can choose now our SSID and enter the correct passphrase for it.

So basically thats it, next we have to make the videos available. I keep my videos an my Linux computer and would like to access them within the network using windows samba share. For that
first install Samba

[shell]
sudo apt-get update
sudo apt-get install samba
[/shell]

Then set a password for your user in Samba

[shell]
sudo smbpasswd -a
[/shell]

Edit the file [shell]/etc/samba/smb.conf[/shell]

[shell]
sudo vim /etc/samba/smb.conf
[/shell]

Add this to the end of the file, using the correct paths to the folders where the movies are stored:

[shell]
[]
path = /home//
valid users =
read only = yes
[/shell]

Restart the samba:

[shell]
sudo service smbd restart
[/shell]

Once this is done, you should be able to add the files to the videos. Now, after I did that using my old, first version of the Raspberry Pi, I notice that the first version is not powerful enough anymore and that the menus are rather slow! SO, I recommend to use the Pi B+ or better Pi3 for the media center.

Leave a Reply