For everyday use, I often make backups of DVDs. I do this by storing the DVD on disk with DVD Shrink, which works really nicely under Wine, and then burning the thing as a data DVD with K3b.
But. There’s a slight problem. The DVD’s play fine on my standalone DVD player (a real Lenco!) as well as under Media Player Classic, but XINE refuses to play them, giving output like:
$ xine dvd://
This is xine (X11 gui) - a free video player v0.99.1.
(c) 2000-2003 The xine Team.
libdvdnav: Using dvdnav version 1.0 from http://xine.sf.net
libdvdread: Using libdvdcss version 1.2.8 for DVD access
libdvdread: Attempting to use device /dev/hdd mounted on /media/cdrom1 for CSS authentication
libdvdnav: Can't read name block. Probably not a DVD-ROM device.
libdvdnav: Unable to find map file '/home/meilof/.dvdnav/.map'
libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: faild to read VIDEO_TS.IFO
The problem here is probably in UDFFindFile: because I put the data DVD in my DVD drive, libdvdnav naturally assumes it’s a media DVD with UDF, which it’s not.
The same set of files does play nicely when played from the hard drive, e.g.:
xine dvd://home/meilof/dvd/
This gives rise to a very simple workaround to fool XINE into thining the files are not actually on a DVD drive, by creating a symbolic link to the DVD drive in my home directory. Indeed, after running:
ln -s /media/cdrom1/ /home/meilof/dvd
the above xine command runs fine. Of course, this is still a pretty preliminary solution. It also has the disadvantage of needing to mount the DVD before viewing, which libdvdnav would normally do automatically for us. The real solution would be to edit libdvdnav to fix this behavior.
I didn’t do that yet, but I did do a small fix that at least gets rid of the symlink: I added support for an environment variable DVDNAV_NO_DEVICE which, if set, makes libdvdnav stop trying to get the device from a direcory. The patch for the latest libdvdnav is here. To apply, go to the src/dvdread subdirectory of your libdvdnav sources, and enter:
patch < libdvdnav-dvdreader-nodevice-diff dvd_reader.c
Unfortunately, Xine ships with its own version of libdvdnav, so to have the fix in Xine as well, you need to apply the patch in the Xine source tree (src/input/libdvdnav subdirectory), too, and rebuild Xine. After that, a data DVD with video on it can be played with something like:
DVDNAV_NO_DEVICE=yes xine dvd://media/cdrom1/
If you'd ask me what's the added value of this over the symlink workaround (since you still need to mount and all), I would honestly don't know
I may have a bit of a closer look about whether I can get it to work automagically, without the environment variable.