[Matroska-devel] Re: Timestamp precision in matroska files

Steve Lhomme steve.lhomme at free.fr
Wed Jan 7 09:42:20 CET 2004



Paul Bryson wrote:

> I just realized that this is really easy for any audio format that doesn't have
> a variable number of samples/packet. (Anything other than Vorbis)
> 
> (1/(number of samples per packet))*1000000000
> 
> For MP3 this would be:
> 
> (1/1152)*1000000000
> 
> or
> 
> 868055.5555
> 
> So, round the number and set TimecodeScale to
> 
> 868055
> 
> This should allow for sample accurate seeking and shouldn't be much less
> efficient than using 1ms.

I don't know what this calculus is about. But look at yesterday's 
channel log. I explained why it's impossible to have such accuracy the 
way it is done now.

BTW, rounding is just what proves that it's impossible. That's just an 
approximation, as everything else.

You also forget to mention that sample accurate seeking means that you 
know which sample you're looking for in the frame. Not just the first 
decoded one. And this is written nowhere. Well that was the case until I 
introduced new elements ;) I'll see if the Chapters need to be updated 
too to allow sample accurate seeking.




More information about the Matroska-devel mailing list