From XiphWiki
Jump to: navigation, search

This page combines questions related to all Xiph projects.

General Ogg questions

What is a granulepos ?

A granulepos is a representation for a timestamp on a scale specific to the codec. Conrad Parker clarifies the definition of granulepos as "representing the presentation time for the last presentable data item in an Ogg packet."

How does the Ogg packet number work ?

The Ogg bitstream does not store packet numbers in the bitstream. Only page sequence numbers are stored. libogg will count packets and give each Ogg packet a packet number. Normally these are in sequence; when Ogg notices a discontinuity however (page sequence numbers don't match up (FIXME: is this actually in the code ?), or the lacing values don't match up) it will increment the page counter by 1, which thus shows up as a missing packet (see, _packetout()).