Post

Watching DVDs on Raspberry Pi

If you want watching DVDs on your Raspberry Pi with an installed OpenELEC, Raspbmc or XBian you must buy a MPEG-2 licence. But not afraid, it’s only a minimal amount.

To get your licence you need the device’s internal 16-digit serial number (not the number printed on your board).

So go to your favorite console and connect your Raspberry Pi through ssh (I show you the steps by using Cmder, a Raspberry Pi B+ and an installed OpenELEC image).

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
λ ssh root@192.168.1.19
root@192.168.1.19's password: XYZ

##############################################
# OpenELEC - The living room PC for everyone #
# ...... visit https://www.openelec.tv ...... #
##############################################

OpenELEC (official) Version: 4.2.1

OpenELEC:~ # cat /proc/cpuinfo

processor       : 0
model name      : ARMv6-compatible processor rev 7 (v6l)
Features        : swp half thumb fastmult vfp edsp java tls
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x0
CPU part        : 0xb76
CPU revision    : 7

Hardware        : BCM2708
Revision        : 0010
Serial          : 00000000XXXXXXXX <-- the serial number

OpenELEC:~ #

Another way to get the serial number is: SYSTEM->Systeminfo->Hardware

Now you can buy your licence at raspberrypi.com with this serial number and put the licence keys in the config.txt of your linux distribution.

To do this on OpenELEC (connected via ssh) follow these steps:

  1. remount the /flash folder as read write
1
OpenELEC:~ # mount /flash -o remount,rw
  1. now it’s possible to edit the file with nano (a light weight console based text editor)
1
OpenELEC:~ # nano /flash/config.txt
  1. scroll to the bottom of the file at replace the zero filled licences with your one and save the file by typing CTRL-X and typing Y.
1
2
3
4
5
6
7
8
9
################################################################################
# License keys to enable GPU hardware decoding for various codecs
# to obtain keys visit the shop at https://www.raspberrypi.com
################################################################################

# decode_MPG2=0x00000000
# decode_WVC1=0x00000000
# decode_DTS=0x00000000
# decode_DDP=0x00000000
  1. now make sure the changes are written to your SD card
1
OpenELEC:~ # sync
  1. finally remount the file system as read only and reboot your Raspberry Pi.
1
2
OpenELEC:~ # mount /flash -o remount,ro
OpenELEC:~ # reboot

Restart your raspi and have fun!

That’s it!

This post is licensed under CC BY 4.0 by the author.