sometimes doesn't detect main title - patch included

Bug #145801 reported by Sam Brightman
6
Affects Status Importance Assigned to Milestone
mplayer (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

Binary package hint: mplayer

there are some DVDs for which mplayer(-nogui) does not seem to reliably detect the main title when simply using "mplayer dvd://" - other players seem to manage this. one is forced to manually search through (mplayer dvd://1, mplayer dvd://2 etc.). i'm aware this needs more info, but i am reporting from several months ago and have forgotten which DVDs caused the problem.

Tags: patch
Revision history for this message
kko (kko) wrote :

This is a missing feature in mplayer, but for what it's worth, I'll confirm this report.

(Any DVD with the main title not as title 1 will show this. As a workaround play dvd://1-99 and hit PageUp until you find the title you're searching for.)

Changed in mplayer:
status: New → Confirmed
Revision history for this message
Sam Brightman (sambrightman) wrote :

I created this patch to attempt autodetection of the main title based on maximum title length. I haven't actually got a DVD with me at the moment, so have been unable to test it. But it compiles cleanly and looks right ;) Can someone review/test please? I should be able to test tonight or over the weekend. Don't know how this works in terms of upstream...

Revision history for this message
Sam Brightman (sambrightman) wrote :

I had changed the wrong variable for the default title number and was reading teh VTS files too often. This updated patch has the loops reorganised to only open the VTS files once - although it still has to skip over titles that are not within that VTS rather than knowing straight away where to start looking. However, this is the method used elsewhere in stream_dvd.c too, so it may not be possible to do it better.

At the moment this code appears to be working (i.e. selects the longest title). However, I've been testing on Cygwin, and mplayer actually segfaults in the audio decoding phase on my test DVD.

Note that at the moment I am just selecting the longest title, I have another version which selects the title at the start of the longest title set - I don't really know which makes most sense. I think the version supplied is the most intuitive (title not titleset). I only mention this because my test DVD has loads and loads of titles (extras disc). The longest title and longest title set start are the same.

Revision history for this message
Sam Brightman (sambrightman) wrote :

I can confirm that the previous patch works correctly as compiled on the latest Hardy package of mplayer (1.0rc2-0ubuntu13). I have also tested it on a "normal" DVD where the first track is in fact the correct one (i.e. mplayer works without the patch) and there is no regression.

Revision history for this message
Sam Brightman (sambrightman) wrote :

Did anyone else have any success with this? Any interest whatsoever?

Revision history for this message
kko (kko) wrote :

I can confirm that the patch works as advertised on Hardy. (Tested on one DVD with main title as title number 2.)

(The compiled mplayer didn't do OSD properly, but I believe it simply didn't find the fonts because I didn't install the package.)

Sam Brightman - thank you for the patch. One suggestion, if you feel like tinkering some more with this:

If I do "mplayer dvd://2", I get the following output:
--clip--
Playing dvd://2.
There are 6 titles on this DVD.
There are 32 chapters in this DVD title.
--clip-- (etc.)

With your patch, if I do "mplayer dvd://", I get this:
--clip--
Playing dvd://.
There are 6 titles on this DVD.
There are 32 chapters in this DVD title.
--clip-- (etc.)

When requesting "dvd://", could you modify the output so that the first line above would read, instead of
"Playing dvd://."

e.g.
"Playing dvd:// - title N selected." (with N being the appropriate number)

or if it makes any difference, by adding a new line like this:
"Playing dvd://.
Selected title N."

(I have no idea what file is responsible for the console output.)

Revision history for this message
Bryce Harrington (bryce) wrote :

We've generally not carried ubuntu-specific patches for mplayer historically, so the right procedure for this patch would be to send it upstream, either to Debian or to the mplayer list directly, and get it included there. But I'll leave this bug open in case it does look viable to include in our mplayer.

Changed in mplayer (Ubuntu):
importance: Undecided → Wishlist
importance: Wishlist → Medium
status: Confirmed → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.