[MPlayer-users] Wrong time on kaffeine's m2t files

Nico Sabbi nicola.sabbi at poste.it
Mon Jan 10 11:23:05 CET 2011


premise: hand-quoted.


Michal Svec ha scritto:

>I would expect that for other streams which don't have the time embedded
>mplayer counts the time passed and displays it correctly. Can't we just
>use the same mechanism here? It's definitely not of questionable utility,
>knowing where in the stream I am (at least without having to subtract
>completely random numbers).

It's a different case: in dvd streams there are additional time informations embedded
in the stream itself, maybe in some network stream too.
MPEG streams have broken timestamps by design that must be complemented  by some
sideband information (as in dvds).

The obvious fix is:
-start the stream time at 0
-keep track of the time difference between the last saved pts and the current one
  provided that the difference is not higher than 1 second. If it's higher increase
  it by .... what amount? every value is totally arbitrary


As you can see the stream time will never be precise and for this reason the user should never
be allowed to stream_seek in it.

Every now and then this request pops up and some patch is posted, but people don't seem
to realize that a method like the above is fundamentally imprecise, thus broken.





More information about the MPlayer-users mailing list