[Vorbis] Granule Position Information:

Michael Smith msmith at xiph.org
Tue Sep 13 04:24:26 PDT 2005


On 9/13/05, Ravi Lakkundi <ravilakkundi at yahoo.co.in> wrote:
> Hi,
> 
> If this is true:
> 
> "Granule Position Information in Ogg Header is a hint
> for the decoder and gives some timing and position
> information."
> 
> So say if granule position is 10000, it means that
> 10000 PCM samples are encoded in this page
> approximately.

Incorrect. It means that if you decode up to the end of this page from
the beginning of the stream, you'll have a total of precisely 10000
samples (assuming all the data was there, and you didn't lose any).
Thus it gives precise and absolute positioning information, as
required for seeking, for instance.


> 
> If this is true we can neglect this information, it
> will not effect the decoding right(but might effect
> for streaming)?

Incorrect. Vorbis sort of 'overloads' this field; it must be provided
to the decoder for correct handling of beginning and end of stream.

You also need it for seeking, obviously.

Mike


More information about the Vorbis mailing list