[Matroska-devel] Re: Design ideas for the editingsystem - How to handle audio

Steve Lhomme steve.lhomme at free.fr
Fri Jan 30 20:52:51 CET 2004


Paul Bryson wrote:
> This occured to me as I was considering how to improve the Block2 design for
> Matroska.  The problem encountered in Matroska is that there are never exactly
> precise timestamps that you can use for an audio sample because each sample
> takes a length of time that cannot be expressed as a single number.  For
> instance, a single CD audio sample is 1/44100 seconds long.  There is not a good
> way to express the samples timecode as a rational number.  Its not a huge issue
> in Matroska because you can express the timecode with enough accuracy that you
> know exactly what sample you are talking about.
> 
> However, its also not as elegant as I would like so I was trying to think of a
> better way to do this, and one way was to store the sample number in the Block2
> and use that to calculate the timecode.  This seems simple since audio streams
> always have the same samplerate throughout the stream.  But then I remembered
> something that Steve mentioned.

You're reinventing the problem of Ogg. You need the codec to interpret a 
counter. Well, not exactly. But you don't need a new Block for that. I 
added such an element when we wanted better sample accuracy. It was in 
the BlockAdditional IIRC.

In Matroska the timestamp is what matters. If you change that everything 
gets complicated.




More information about the Matroska-devel mailing list