[Theora-dev] ogg and keyframes

Wim Taymans wim at fluendo.com
Mon Sep 27 07:13:05 PDT 2004


When doing a live ogg+theora stream on our server we ran into the
following problem: When a client connects we send out the theora header
pages followed by the actual live stream pages. The problem is that the
first ogg data page does not have the right page number (2), which
causes libogg to not want to decode the first _packet_ of that page.
Since that first packet happens to contain the keyframe of the theora
stream, most players (Mplayer) don't properly show the first frames
until a new keyframe is received. This is not nice.

In comming up with a solution we can see following scenarios:

1) libogg does not refuse to decode the first packet, just warn. This
requires changing libogg behaviour.
2) players don't show frames before they receive a keyframe.
3) The server (or theora encoder) inserts an empty packet in the page
with the keyframe.

Any opinions on how to solve this issue? I would prefer option 1, may it
is possible now to decode the first packet after a sync error, I don't


More information about the Theora-dev mailing list