Use a Raspberry Pi as a DVD player
Features:
- Automatically play a DVD as soon as it is inserted
- Skips trailers, etc. by default
- Entirely console and framebuffer based playback (i.e. no X11/Wayland) so very low power and quick to boot
- Use any existing IR remote to play/pause/rewind/forward
- Turns screen on automatically when a DVD is inserted
- DVD splash screen
- Silent boot
You will need:
- A micro SD card
- A Raspberry Pi (I've tested on a Pi Zero and Pi Zero W)
- A USB DVD drive
-
Install Rasbian Lite on the micro SD card
-
Purchase a MPEG2 license from here. You will need the serial number from your Raspberry Pi which can be found by running
cat /proc/cpuinfo
. -
Add the serial number to
/boot/config.txt
. You will receive an email telling you what to add. -
Install VLC:
sudo apt-get install -y vlc
-
Copy
dvd-play.service
to/etc/systemd/system/
. -
Add a udev rules to start/stop this service when a DVD is inserted/ejected by copying
90-dvd.rules
to/etc/udev/rules.d/
.
You will need:
- Flirc USB dongle connected to the Raspberry Pi
- Install Flirc
curl apt.flirc.tv/install.sh | sudo bash
- Assign the keys on your remote to regular keys. Do not use the
play/pause
,fastforward
, etc. commands.
flirc_util record p # Press play/pause
flirc_util record r # Press rewind
flirc_util record f # Press fast forward
flirc_util record s # Press stop
- Install Python dependencies:
sudo apt-get install -y python3-pip
pip3 install evdev
-
Copy
vlc_media_buttons.py
to/home/pi
. -
Copy
dvd-remote.service
to/etc/systemd/system/
. -
Enable the service:
sudo systemctl enable dvd-remote
(HDMI-CEC compatible screen only.)
- To prevent the screen turning on when the Pi boots, add the following to
/boot/config.txt
:
hdmi_ignore_cec_init=1
- Install
cec-utils
:
sudo apt-get install -y cec-utils
- Copy
turn-on-screen.service
to/etc/systemd/system/
.
-
Copy
dvd.jpg
to/usr/share/backgrounds/
. You may need to create the directory. -
Install
fim
:
sudo apt-get install -y fim
-
Copy
dvd-background.service
to/etc/systemd/system/
. -
Enable the service:
sudo systemctl enable dvd-background
- To show a blank screen when booting the following to the first line of
/boot/cmdline.txt
:
loglevel=3 quiet logo.nologo vt.global_cursor_default=0
- To hide boot output while the Raspberry Pi boots change
console=tty1
toconsole=tty3
in/boot/cmdline.txt
.