[Theora] Stream Test

Robert Smith rob at visonair.tv
Fri Apr 7 13:50:21 PDT 2006


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?

Before sorting pages I get the following: (0746762972=Theora stream, 
1034629198=Vorbis Stream)
00:00:07.732: serialno 1034629198: Packet out of order (previous 
00:00:07.733)
00:00:25.866: serialno 0746762972: Packet out of order (previous 
00:00:25.867)
00:00:39.333: serialno 0746762972: Packet out of order (previous 
00:00:39.334)
00:00:48.552: serialno 1034629198: Packet out of order (previous 
00:00:48.600)
00:00:50.665: serialno 1034629198: Packet out of order (previous 
00:00:50.666)
00:01:21.933: serialno 0746762972: Packet out of order (previous 
00:01:21.943)
00:01:34.533: serialno 0746762972: Packet out of order (previous 
00:01:34.551)
00:01:47.200: serialno 0746762972: Packet out of order (previous 
00:01:47.206)
00:01:59.582: serialno 1034629198: Packet out of order (previous 
00:01:59.600)
<end of stream>

After sorting pages I get: (1967306526=Theora stream, 1639026586=Vorbis 
Stream)
00:00:00.000: serialno 1967306526: Packet out of order (previous 
00:00:00.348)
00:00:00.466: serialno 1967306526: Packet out of order (previous 
00:00:01.393)
00:00:01.533: serialno 1967306526: Packet out of order (previous 
00:00:02.438)
00:00:02.600: serialno 1967306526: Packet out of order (previous 
00:00:03.482)
00:00:03.600: serialno 1967306526: Packet out of order (previous 
00:00:04.551)
00:00:04.600: serialno 1967306526: Packet out of order (previous 
00:00:05.619)
00:00:05.733: serialno 1967306526: Packet out of order (previous 
00:00:06.640)
00:00:06.600: serialno 1967306526: Packet out of order (previous 
00:00:07.732)
00:00:07.800: serialno 1967306526: Packet out of order (previous 
00:00:08.707)
00:00:08.733: serialno 1967306526: Packet out of order (previous 
00:00:09.775)
00:00:09.866: serialno 1967306526: Packet out of order (previous 
00:00:10.913)
oggz-validate: maximum error count reached, bailing out ...


>From my point of view, the second one looks worse, or is this normal?....
(The strange thing is the second file will play with one of the players I 
have, the first won't!)

Any suggestions? (I can't post code, there's too much.)

Rob
----- Original Message ----- 
> The problem is in the order you write out the pages. They have to be
> sorted in strictly non-decreasing order by the time-equivalent of
> their granulepos field. This is important for efficient seeking, and as
> a side effect does a reasonable job minimizing buffer requirements
> on the player side. The following algorithm should work:
>
> Maintain a queue of pages for each substream. If all queues are full,
> write out the page with the lowest timestamp (as returned by
> vorbis_granule_time() and theora_granule_time()) and remove it
> from its queue. If any queue is empty, compress more data until all
> queues are again full.





More information about the Theora mailing list