[mythtv] DVD playback - average length of a VOBU? (related to ticket #4492)

Ronald Frazier ron at ronfrazier.net
Wed Jan 30 13:10:26 UTC 2008

Thanks for the feedback

> DVDs in the vobu search information provide offsets to 0.5, 1.0, 1.5,
> 2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 5.5, 6.0, 6.5, 7.0, 7.5, 10, 30 and 60
> second backwards and forwards.

So if I understand you, the code, and that dsi_pkt spec correctly, the
DVD contains a jump offset table in each packet on the disc, so at any
given point in the movie you can instantly jump back any of those
intervals without having to do anything but look in the table and add
the appropriate offset you your current location (except for special
case handling at state/end of disc). Correct?

OK, so since we have fixed increments we can jump, that answers the
other question I had about the seekSpeedMap....why are the values for
60x and especially 120x so far out of proportion with the rest of them
seekSpeedMap values. everything else is a 2.5 or 3 ratio, while those
two are 4 and 6 ratios. The answer...the seek table gets sparse at
more than  7.5 seconds, so thats the closest available.

> I should write in a condition to do nothing if someone enters  a speed that is
> not in the mapping. I suppose this info is fed to the dvdnav function
>  and it goes crazy and seeks to some unexpected spot on the dvd.

Well, rather than do nothing, the way I'd approach it is, instead of
using seekSpeedMap to map every one of myth's possible seek speeds to
a specific entry in the VOBU offset table, I'd probably have the
seekSpeedMap map every value in that table to an approximate myth seek
speed. Then when DVDRingBufferPriv::Seek is called, it could find the
entry in the seekSpeedMap that most closely matches whatever value it
was passed. I'll take a shot at this when I get a chance.

> would also suggest you read dvd_time_search_within_cell()  in
> libmythdvdnav/searching.c
> and http://dvd.sourceforge.net/dvdinfo/dsi_pkt.html with focus on the
> sri_bwda and sri_fwda labels.

Thanks. I had already looked through that function, but without
knowing the specification you provided me I had no real clue why it
was doing what it did.


More information about the mythtv-dev mailing list