Stephen's Homepage

This page last updated in Jan 2009

Linux & DVDs

Okay, there are lots of sites about DVDs and Linux. However despite that there are a few things that took me a while to find and/or sort out .. so in no particular order are some tit-bits that might help somebody out there.

I've included some software, or links to software here. This software works for me - I cannot guarantee that it will work for you, or even that it won't damage your hardware.

My original DVD playing setup was a Creative Labs DXR3 and 12X DVD Drive, which were in a Celeron 366 based PC running Linux 2.2.18. The kernel was later updated to 2.4.20, and then the DXR3 moved to my 'Mini-ITX' machine so I can use that for DVD playback as well as playing MP3s.

RPC2 Region Setting DXR3 VIA Mini-ITX Sony VAIO FX501 Changing title key Creative Infra Reciever

The standard repository for Linux DVD related information is http://www.linuxvideo.org/, so if you haven't already been there I strongly recommend you try and find what you are looking for there first.

If you're looking for a software DVD player, I recommend Xine - although it's not fast enough to do full framerate software playback of DVDs on my Celeron 366.

RPC2 Drives/Region setting

According to http://developers.videolan.org/libdvdcss/index.html, libdvdcss (which is used for reading and decoding DVDs by most Linux software) does not require the region to be set, even on the RPC2 drives described below. It manages to read from the DVD regardless.

Many thanks to Rob Teng for bringing this point to my attention. With this in mind it should not be necessary to set the region on the drive using the procedure below, but I'll leave the information here in case anyone does find that they need it.

If you have a new DVD drive it may well be RPC2 which means the drive itself is supposed to check the region code on the DVD. One fix for this involves finding a cracked firmware for the drive that removes this check. However before doing this you might want to check your drive works for DVD playback before invalidating the warranty .. and unless you want to boot into Windows this requires a Linux program to set the region.

IMPORTANT: most drives only let you set/change the region 5 times. This limit is built into the drive firmware so you don't get round it just by running Linux! Please also read the note above about libdvdcss, you may find that you do not need to set the region on the drive to play DVDs under Linux!

DXR3 Decoder

Yeah, you probably know http://dxr3.sourceforge.net/. I have the BT865 based version which wasn't initially supported, but it was in the CVS version months and months before version 0.7 was released .. so if you have problems I urge you to build and try the CVS version of the drivers.

When I last tried overlay support it was very experimental (I couldn't get it to give a stable picture until August 2001) .. I previously used the S-Video cable to loop the TV-Output of the DXR3 into my TV tuner card to watch DVDs. I moved the DXR3 in my little 'Mini-ITX' based computer (which was plugged into the living room TV), so I've not had cause to test overlay support recently.

DVD playback on a VIA Mini-ITX/C3-800 System

Unfortunately the 800Mhz VIA C3 processor isn't fast enough to cope with software playback of DVDs. The C3 is clearly less powerfull than an equivalently clocked Intel or AMD processor in this respect, and the situation probably isn't helped by the fairly slow graphics chip (which shares the system RAM). Using Xine I managed around 95% framerate, which isn't really good enough .. so I'm now using my DXR3 decoder in the system's single PCI slot.

If anybody has any tips for increasing the performance to allow software playback then I'd be very interested in hearing them.

I've since replaced the DXR3 with a Hauppauge PVR 350, changing the function of the Mini-ITX computer to a 'digital video recorder': allowing me to record TV digitally and pause 'live' TV.

I'm not currently aware of any way to use the MPEG2 decoding on the PVR350 for DVD playback. If anyone has this working I'd be delighted to hear about it!

DVD playback on a Sony VAIO FX501 laptop

If you've got Linux working (which it should do, though using either the latest ACPI kernel patches or a 2.5 or newer kernel and enabling ACPI is definately recommended), software playback of DVDs on this laptop works fine. In fact I prefer the Linux playback to the Windows playback, Windows gives me funny audio-clipping that I don't get under Linux (and involves booting the laptop into Windows, which I haven't done for a while now). The laptop is based on a 1Ghz AMD Duron processor, so it isn't too surprising that it can cope with software playback. Using atitvout playback to a TV works, and it is even possible to playback to both the TV and screen (although TV Out has been broken by an upgrade to Fedora Core 2 with it's 2.6 kernel and X.org rather than XFree86). If you've found a awy to fix this then please let me know.

I recommend disabling and battery level monitoring software (i.e. temporarily remove it from the panel or whatever) during DVD playback. Currently the ACPI code causes the machine to freeze for a short time while reading the battery status and this is reflected by slightly choppy DVD playback.

DVDs with a changing title key

The encryption on DVDs is split into two parts. To decrypt the data you need a disk key and a title key. Some DVD films change title key part way through (my European copy of `Chain Reaction' does). At the moment neither Creative's DXR3 software or OMS cope with this - they try and decrypt the entire film using the same title key. (OMS could be fixed at any moment of course). This causes the second part of the film not to play.

I fixed this by a kludge to src/plugin/input/input_udf.c. I emailed this to the author but he didn't reply and nothing has happened in CVS yet, so I'll put it up for download here. The patch simply forces the software to re-read the title-key every time OMS calls the seek function. The title key only appears to change between .vob files on the DVD and OMS always seeks when moving between files so this works. It also works when you jump forward or backward between chapters. There's probably a much nicer way to do this but I am not an expert - and this method doesn't seem to have any unwanted side effects for me.

This code is now very old, so I don't know what versions of OMS it will work with. I've been using Xine for all DVD playback recently, and if persuaded can probably dig out and update my corresponding patch for Xine.

I have code that allows you to playback individual .vob files (without resorting to invoking css_cat by hand) by altering input_file.c to include calls to the CSS code, but my patched version is very unfinished (it has a couple of issues, it won't playback .vob files that aren't encrypted and you need to run it as root). If people request it I might be persuaded to finish it - I use it as it is to playback films where OMS fails to parse the .ifo information properly (this at the moment this includes the European version of `Tomorrow Never Dies' [though I think that's now been fixed]).

Creative Infra Receiver (sometimes bundled with DXR3)

http://www.lirc.org/.

A Creative Infra Receiver & PC-DVD remote came bundled with my dxr3. The Receiver plugs into the serial port. I wrote some demonstration code which Christoph used to write the `hw_creative' driver that is included in the 0.6.3 (and newer) releases, so if you have a serial device like mine you should find lirc now works for you. You should also find my configuration file in remotes/creative - if your remote is the same as mine that should work with your remote - if it doesn't work use irrecord to create a new one.

Originally it was necessary to compile LIRC specifically with support for this receiver, but that is no longer the case. When running lircd you must specify the "creative" driver (for example, include -H creative on the command-line).

I'm currently using my receiver with MiniMyth. The remote isn't ideal, but it has enough buttons to support all the basic functions that I want. My minimyth.conf file includes the following:

MM_LIRC_DRIVER="creative"
MM_LIRC_DEVICE="/dev/ttyS0"
MM_LIRC_KERNEL_MODULE="8250"
MM_LIRC_FETCH_LIRCD_CONF="yes"

This site is best viewed with any browser Valid HTML 4.01! © Copyright 2009, Stephen White
http://www.ox.compsoc.net/~swhite/