[DVDnav-discuss] determining the exact size of a stream
Nicola.Sabbi at poste.it
Mon Sep 15 17:19:22 CEST 2008
On Monday 15 September 2008 16:44:56 Sergey 'Jin' Bostandzhyan wrote:
> recently I found out about the release of the forked libdvdread
> library, which is actually a good thing since the original lib
> seems to be dead.
> I did not switch to the forked version yet, but will try it soon.
> In the meantime I have a couple of questions and I hope that you
> guys can help me out.
> I am one of the authors of MediaTomb (UPnP media server project),
> currently we are adding a feature that should allow users to watch
> DVDs on their UPnP players. The idea is to parse the DVD or a DVD
> iso and create a structure of virtual objects and containers on the
> server, which consist of titles, chapters, audio tracks/languages.
> Selecting those for playback would extract the corresponding MPEG
> stream from the DVD and offer it via HTTP to the UPnP player.
> It was quite a pain to figure out how to use the library,
> play_title.c from libdvdread 0.9.7 was a great help, btw I noticed
> that it is no longer included in the forked release. So first
> question: are there any plans to add a somewhat higher level,
> easier to use API?
libdvdnav is the high-level, easy to use library
> In the end I was able to get an MPEG stream, matching my
> title/chatper/angle selection from the DVD via libdvdread.
> Implementing seeking support is next on my list, most UPnP players
> do this via HTTP range requests, so I need to know the size of the
> stream in bytes.
> And here is the problem:
> in order to get the exact size I need to read nav packets, then
> parse the dsi packets and basically follow the flow of the cells.
there's nothing like that, that I remember, in dvdnav, but it
can be added
> Unfortunately this requires reading and parsing through the whole
> DVD and takes up to 30 seconds or more. I tried to calculate the
> length by using the sector information which seemed to be very
> fast, but the results were simply wrong.
> Is there a way that would allow to quickly determien the size of
> the MPEG stream for a particular title/chapter/angle selection?
> In case anyone is interested to see my attempts :)
> Kind regards,
just summing the amount of sectors for every cell describing the title
(in the PGC) should suffice
More information about the DVDnav-discuss