On Mon 21.06.2004 at 01:20:04PM +0200, Dirk Meyer wrote:
> Matthieu Weber wrote:
> > On Mon 21.06.2004 at 09:26:38AM +0200, Dirk Meyer wrote:
> >> o does someone has a link to a ts spec? I would like to include
> >
> > I don't, but if you're not afraid of reading code, take a look at
> > libdvbmpeg.
> 
> I'm not afraid, I did it for some mpeg length stuff. But I prefer a
> nice doc. I found one and your link is a good addition. I have a small
> piece of code detecting that the file is a ts or not by scanning the
> first 2 * 188 - 1 bytes. 
> 
> >>   support for it into mmpython:
> >>   - get length of the file
> >
> > Probably by calculating a difference between the first and last PTS in
> > one of the streams? But the PTS can be reset to 0 at some point in the
> > stream, so scanning of the whole file might be needed in this case (and
> > scanning 5 GB takes time...). 
> 
> Resetting is bad :-( Maybe scan in 10 MB intervall, not everything. I
> need to find out.

Or scanning the beginning, the end, and if the end is lower than the
begining (i.e. a reset happened), try to find the place of the reset by
dichotomy. It might also be that the reset always happen at the same time,
and in this case, knowing this time is enough to calculate the length.
I can try to check when the reset occurs, and find out if the value is
always the same.

> One second: resetting may not be bad. Maybe they reset when a new
> show.

I think not (at least not here): I often have the timer in mplayer
showing 22 hours and something (well, at least I *guess* that mplayer is
displaying time based on PTS), and this is absolutely not related to the
current time, and it is not reset from show to show.

Besides, I also have also played with Thomas' timeshift patch and
implemented a DVB timeshift in MPlayer-1.0pre4 and my dvbrecord
(modified tzap program that saves the stream to a file, or for that
case, into the timeshift's ringbuffer). It crashes sometimes, I haven't
had time to find out why, but basically it works.

Matthieu
-- 
 (~._.~)        Matthieu Weber - Université de Jyväskylä         (~._.~)
  ( ? )                email : [EMAIL PROTECTED]                  ( ? ) 
 ()- -()               public key id : 452AE0AD                  ()- -()
 (_)-(_)  "Humor ist, wenn man trotzdem lacht (Germain Muller)"  (_)-(_)


-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
Freevo-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-users

Reply via email to