Contents
DVD Playback With Totem
GNOME has a beautiful media player, Totem, and a great multimedia framework, GStreamer. But for a long time, there's been a glaring flaw in the user experience: this combination can't play DVDs to users' satisfaction. Right now, you can play an individual title if you know how, but you can't get menus, subtitles, and so on. (This is of December 2007 on a Fedora Cora 8 machine.) This situation has made a lot of people sad.
This page tries to serve as a point of organization for changing this situation. The hope is emphatically for this page not to become a place for people to complain about the situation and email those complaints to our hardworking developers. Everyone, most of all the developers, wishes that we had awesome DVD playback. Instead, the hope is that this page will be useful for two kinds of people:
- Interested developers who want to write code to help get things working.
- Interested skilled users who can test the bleeding edge and provide useful bug reports and diagnostics.
There are a few very important things to keep in mind regarding this problem:
- The DVD format is heavily patent-encumbered on many levels, so implementing many DVD features in Free Software is difficult from a legal standpoint.
- The companies that sponsor much of GStreamer's development (such as Fluendo) are often contractually or legally prohibited from working on DVD playback, meaning that nonprofessional community members will have to do the bulk of the coding here.
- While a lot of people want Totem and GStreamer to have awesome DVD playback, multimedia programming is pretty hard. Very few people have the skills necessary to get everything working to the level of quality that we'd all wish for.
A lot of the pieces needed for full DVD playback in Totem are there. However, if all of this half-finished code were just installed and enabled in Totem, the Totem developers would get a pile of bugreports about problems that aren't their fault and they can't do anything about. They don't want that, we don't want that. Patience and tact are extremely important.
The Current State of Play
I (PeterWilliams) am not a GStreamer developer or a Totem developer. So take all of this with a huge grain of salt. But, to the best of my understanding, the current problems blocking beautiful DVD playback are:
A relatively easy one: the newish DVD subpicture support code (the dvdspu element), which is necessary for many DVD features, lives in the gstreamer-plugins-bad module right now (December 2007), mostly because it lacks documentation and tests. Getting it moved into the gstreamer-plugins-good or gstreamer-plugins-ugly module would make it available to more of the users interested in DVD playback. A few more notes are below in the dvdspu section.
The GStreamer DVD menu element dvdnav, is very buggy.
At some point I read that some work on DVD playback was blocking on pending changes to the foundational playbin element. I have no idea if that's still true.
The Pieces of The Puzzle
Bugzilla Links
For the love of god, don't use this page to report bugs. Report bugs with Bugzilla. That's what it's for.
This is a search for all GStreamer bugs with "DVD" in the summary.
There is a tracker bug in GNOME Bugzilla but comments from Bastien make it sound like maybe it is not the right bug to follow.
There is a sort of related bug for Ubuntu.
Please don't file more bugs along the lines of "DVD playback doesn't work in Totem." Specific bug reports about a particular piece of the system, reported against the correct product and component, are helpful. But there are already a million bugs about "I don't have DVD menus" and filing more of them accomplishes nothing besides annoying people.
dvdnav
The dvdnav GStreamer element implements DVD menus. It lives in the gst-plugins-ugly module in the ext/dvdnav/ subdirectory.
The dvdnav element is extremely buggy. To even compile it, you need to not only pass --enable-dvdnav to configure, you also need to edit configure.ac to not forcefully disable the element. (Search for HAVE_DVDNAV=no.) If you don't know how to do these things, you really, really, really should not be trying to get the element working yourself.
There's a patch to the element filed in Bugzilla here. If I apply this patch and install the element and dvdspu, I get kinda-sorta-ok DVD menu support in Totem on Fedora 8. That's pretty cool.
It would be cool if someone with more in-depth knowledge could enumerate the known problems of dvdnav in a bit more detail.
libdvdnav
The dvdnav plugin relies on the underlying library libdvdnav. This project was inactive for a while, but recently (October 2007) had a new release under a new upstream. The new download site for libdvdnav is at the MPlayerHQ site. There is also a new mailing list for discussing the library. The Subversion repository is found at http://svn.mplayerhq.hu/dvdnav/. The new libdvdnav release now also contains the source for libdvdread.
dvdspu
The dvdspu GStreamer element implements DVD subpicture composition, as I understand it. It lives in the gst-plugins-bad module in the gst/dvdspu/ subdirectory. Subpicture composition is necessary for full menu support and DVD subtitles.
The dvdspu element was recently (September 2007) "donated by Fluendo" to GStreamer, according to the ChangeLog. According to its author, Jan Schmidt, it has a few missing features but is generally in good shape. It's not in -good primarily because it needs tests and documentation.
dvdread
The dvdread element actually gets DVD content off of disks and is the source of the DVD video stream. It lives in the gst-plugins-ugly module in the ext/dvdread/ subdirectory. It relies on libdvdread and, if the DVD is encrypted (as virtually all commercial movie DVDs are), the infamous libdvdcss.
The quality of dvdread does not appear to be the limiting factor right now. When the above libraries are installed, DVD video playback of individual tracks seems to work pretty well. You can experience this yourself by running totem dvd://0, for example. There is a year-old unapplied patch in GNOME bugzilla that is supposed to address some severe-sounding seeking problems, so it may be that dvdread does have some significant bugs.
dvdsrc
The reporter of the above bug in the dvdread element, Jason Gerard de Rose, reports working on a new libdvdread-based element. It can be found here, as part of his kungfu project. It does not seem to have been worked on since December 2006. The dvdread element has had only minimal work done since that date as well.
mpegstream
The mpegstream element, also in gst-plugins-ugly, decodes DVD MPEG2 streams. No idea as to its quality.
Totem
Totem's UI has very complete DVD support, and Totem can play DVDs using its Xine backend. There are a few missing pieces in the GStreamer backend: for instance, the 'DVD Menu' / 'Title Menu' / etc menu items don't do anything with the GStreamer backend. But once the GStreamer pieces fall into place, it will probably be extremely easy to fix these details.
Totem will automatically give an error when you try to play a DVD from its file menu. This is so the Totem developers aren't showered in bugs springing from exercising GStreamer's half-baked DVD playback code. This is an entirely reasonable thing to do. But it can be confusing because if you just insert a DVD, Totem will start playing its first title. This goes back to the fact that, with the right non-free plugins installed, Totem+GStreamer can play plain DVD video OK; it's full DVD support that's wonky.
dvdsub
The dvdsub element is another element in gstreamer-plugins-ugly. It lives in the gst/dvdsub subdirectory. According to its description, it "decodes DVD subtitles to AYUV video frames". Does anyone know the current status of this element?
Testing
Once it's known what needs testing, we should have instructions here so that competent users can test out the latest DVD work and report useful debugging information. But it seems like right now work isn't far enough along for widespread testing to be very much help.
Here's a sample pipeline copied from a bug: gst-launch -v dvdnavsrc ! dvddemux name=demux .current_video ! queue ! mpeg2dec ! ffmpegcolorspace ! dvdspu name=mix ! ffmpegcolorspace ! xvimagesink demux.current_audio ! queue ! a52dec ! audioconvert ! alsasink demux.subpicture_00 ! mix.subpicture. This requires the dvdnav and dvdspu elements to be available. A simpler pipeline that will show menus without doing the subpicture composition is: gst-launch dvdnavsrc ! dvddemux name=demux .current_video ! queue ! mpeg2dec ! xvimagesink demux.current_audio ! queue ! a52dec ! audioconvert ! alsasink. If the first pipeline shown works, Totem should be able to imperfectly play DVDs with menus.
What needs to be tested? What information needs to be gathered?
Comments
This patch goes into far too much details, especially when most of the plugins are available in 3rd-party repository. It also wasn't updated for 2.22 which has better DVD support in GStreamer. (BastienNocera)
