Never mind, forgot about ogg_page_granulepos() lol ----- Original Message ----- > Still having problems with this algorithm. > I presume I should call vorbis_granule_time() and theora_granule_time() on > the first packet I write to each page to get the start timestamp for each > page for sorting? Or should I be woring with sorting at packet level?