The No-BS Guide to Playing DVDs Under GNU/Linux
Written 04/02/2000, last revised 04/03/2000
INTRODUCTION:
This page exists
because my fellow free software/open source enthusiasts have, as usual,
failed to provide a simple howto guide on the subject. Those who feel that
only those willing to put in a lot of work "deserve" to be able to play DVDs
are not welcome here; flames along these lines will be cordially ignored.
This guide is meant to fill a void by explaining, from start to finish,
how to go from a DVD-incapable system to a DVD-capable system-- in one
sitting.
A further note-- the techniques contained
within this tutorial are, to the best of my knowledge, legal. (This as
asserted not by just by me, but by the fine folks who wrote the driver I
use, people whose driver was published on Creative Labs's site) This is
because rather than doing CSS decryption in software, the DxR2 board
itself is allowed to handle it.
When I first got interested in the
playing DVDs (I got my first DVD playing hardware-- namely, a Creative Labs Encore DxR2-based
DVD upgrade kit-- rather late in the game), I was disgusted to find that
there was no way to play a DVD under GNU/Linux. Rather, there was a
highly-disputed program called DeCSS out there. I began distributing DeCSS
on my Web site; it was a small Windows program which would decrypt a DVD
into a file which could then be played in various means. I distributed it
with the intention of helping people who, like me, prefer to spend most of
their time in GNU/Linux systems play their legally-owned DVDs. (This could
be done by decrypting the DVDs under Windows, rebooting into GNU/Linux, and
playing to one's heart's content.) However, the DVD CCA interpreted DeCSS as (and
seemingly ONLY as) a pirates' tool, and sent their spooks after myself and
several hundred others in a well-publicized lawsuit. I took down my DeCSS
mirror.
Meanwhile, all I wanted to do was play
DVDs-- not pirate them. Goodness knows that I can't afford the hardware--
or even the bandwidth-- needed to pirate huge DVD files! However, since
there seemed to be no legal way to play DVDs under GNU/Linux, I was stuck,
unable to play my own movies on my own system. Until now.
WHAT YOU WILL NEED:
You will most definitely need-- at least, for the solution outlined in
this tutorial-- all of the following:
A 2.2 kernel or later, with kernel sources (highly recommended:
kernel 2.2.14 or higher
A Creative Labs DxR2
(NOT DxR3 or any other board!) decoder board.
A TV. Yes, a TV. The driver doesn't support VGA overlays yet as of
this writing. (I use an old composite color monitor, as used on the old Apple II computers, as mine)
A working compiler system-- you will need to patch and recompile your
kernel.
FROM 0 TO 60: SETTING YOUR SYSTEM UP
TO PLAY DVDS
Most of the important parts of this
tutorial are taken directly from the files contained on, and linked to
from, the
"Creative Open Source" page,
most notably the "ReadMe" file distributed with the DxR2 driver/DVD player
utility. (If you can't grok this readme, or if you want more
information, read that file!) To the wonderful people who wrote the DxR2
driver, and to all those who provided the information that helped
me get this stuff going, thank you. So, here are the installation
steps, in an easy-to-follow format.
Let's rock and roll!
Patch your kernel with the latest CD/DVD-ROM driver patch
from http://www.kernel.dk. If, for
some reason, the patch fails, feel free to e-mail
me and I will help you. To do this:
Download the "DVD/CD patch" or "DVD/CD + IDE patch" (the latter
adds updated support for newer (DMA) IDE hardware as well as the
CD/DVD updates) appropriate to your kernel version. (For instance,
I use kernel 2.2.14, so I downloaded dvd-ide-2.2.14-2.diff.bz2,
the latest patch available for 2.2.14 as of this writing)
Decompress the thing. It will be a bzip2 file; to decompress
it, go: bunzip2 <filename>, where <filename>
is the name of the compressed patch file.
Change directories to /usr/src and go: patch -p0 <
<filename>, where <filename> is the name of the
now-uncompressed patch file.
Download the latest 2.2 or 2.3 patch appropriate to your kernel
version. (For instance, I use kernel 2.2.14, so I downloaded udf-2.2.14-2.diff.gz,
which was the latest patch available for 2.2.14 as of this writing)
Decompress the thing. It will be a gzip file; to decompress
it, go: gunzip <filename>, where <filename>
is the name of the compressed patch file..
Change directories to /usr/src and go: patch -p0 <
<filename>, where <filename> is the name of the
now-uncompressed patch file.
Reboot with your new kernel. Make sure everything's working properly,
et cetera.
Download the firmware file from http://opensource.creative.com/binaries.html.
It will have a name like "dvd1.ux" or the like; the one that was there
when I downloaded mine was DVD12.UX.
(If for whatever reason you can't find this thing, or anything else listed
in this tutorial, e-mail
me.)
Make the dxr2 device node: mknod /dev/dxr2 c 120 0
Download the latest "dxr2" tarball (dxr2-(SOMETHING).tar.gz) from http://opensource.creative.com/snapshot.html.
Decompress the thing-- e.g. tar -xzvf <filename>, where
<filename> is the name of the dxr2 tarball.
Compile and install the driver/program. cd into the directory that was
created (cd dxr2) and run:
make: If this errors out, complaining about "parse error
before `dvd_authinfo'", especially on Debian systems, try copying the 'asm'
and 'linux' include dirs from the kernel source tree into /usr/include.
To do this:
make insert: inserts all the modules into the kernel
make remove: (Once you've seen make insert work
without bugging out) Gets them back out again.
make install: Most importantly, installs dvdplay
into /usr/local/bin.
Set up the DxR2 modules to run on startup. Put this command into your
startup scripts: /sbin/modprobe dxr2. And while you're at it, run
it once right now, to get the modules in so you can begin playing DVDs
immediately!
For you Red Hat types-- the
appropriate file to add this line to the end of is
/etc/rc.d/rc.local. Other GNU/Linux systems may have the equivalent
file in a different location, or may not have such a file at all (in which
case you'll have to make your own custom "run at the end of the startup
sequence" script in /etc/rc*.d)
Download gdvd, a GNOME
front-end for dvdplay. There are others-- but this one, I know, works.
Compiling gdvd should be as easy as tar -xzvf <filename> ; cd
gdvd ; ./configure ; make ; make install, provided you have the
things gdvd requires installed.
Making darned sure the dxr2 modules are in the kernel (check
lsmod-- do you see them? If not, try modprobe dxr2 again.),
run gdvd. It may have been installed as something like
/usr/local/bin/gdvd_1a; in this case, it'll make it easier on you
to go ln -s <name of binary> /usr/local/bin/gdvd. I also find
that the following script makes playing DVDs a mite easier. I call the
script /usr/local/bin/dvd: