Featured Posts

Play DVD disks in XBMC on Raspberry Pi

Posted by Mike Redrobe | Posted in Software | Posted on 20-09-2012

Tags: , ,

1

Here’s how to add DVD playback support into RaspBMC n your Raspberry Pi
(requires MPEG2 key installed on SD card – buy one here:
www.raspberrypi.com/mpeg-2-license-key/)

i.e. Playback commercial DVDs direct from attached USB DVD drive

While it works well, it only plays the film, no dvd menus.

SSH into the running RaspBMC

Download and compile libdvdcss


wget http://www.videolan.org/pub/libdvdcss/1.2.12/libdvdcss-1.2.12.tar.bz2
sudo apt-get update
sudo apt-get install -y bzip2 gcc make
tar -xvjpf libdvdcss-1.2.12.tar.bz2

cd libdvdcss-1.2.12
./configure
make
sudo make install
sudo cp /usr/local/lib/libdvdcss* /lib

Install mplayer


sudo apt-get install -y mplayer

Make a directory to store the virtual file


sudo mkdir /dvd

Make the background script:

sudo nano /sbin/playdvd.sh

mkfifo /dvd/dvd.mpg
while :
do
        mplayer dvd://1 -dumpstream -dumpfile /dvd/dvd.mpg 1>null 2>null
        sleep 5
done

ctrl+X to save the file

Make it executable

sudo chmod a+x /sbin/playdvd.sh

Add it to startup:

sudo nano /etc/rc.local

add the line

playdvd.sh

before exit 0.

(ctrl+x to save and close)

In the XBMC GUI:

Add /dvd as a video folder in XBMC

When you want to play a dvd, play the dvd.mpg file

The script running in the background will take care of dvd changes.

Comments (1)

I have followed these instructions but cant get it to work. when I click play using on the dvd.mpg mplayer does not appear. Can you think what could be causing the problem

Write a comment