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

Michal Svec rebel at atrey.karlin.mff.cuni.cz
Mon Jan 10 16:51:48 CET 2011


On Mon, 10 Jan 2011, Nico Sabbi wrote:

>> 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.

Hmm, I am aware of that pain.

Can't we at least subtract the initial number (for instance that 05:30:24) 
from the displayed time when showing it to the user, eg. in OSD? That 
could do the trick and at the same time prevent any need to track any time 
differences, etc.

Thanks
Michal



More information about the MPlayer-users mailing list