[theora] oggz reading & seeking

ogg.k.ogg.k at googlemail.com ogg.k.ogg.k at googlemail.com
Mon Aug 24 07:48:09 PDT 2009

> how can i read only sound data, or only video data using liboggz, say
> something like this: oggz_read_sound(1024), oggz_read_video(1024).

I think you'll have to add that layer yourself. Beware not to cause too much
buffering while doing so, though.

>          Second of all i tried using liboggz's seek function. Immediately
> after the seek i get some "garbage" frames: how can i address this issue?

You need to seek to the last keyframe at or before your seek point, as inter
frames build on that keyframe. I believe liboggz is being worked on to have
some code to help with that, but for now, you'll have to seek in two steps:
First seek wherever you want to get, then seek to the right keyframe, which
you can deduce from the first seeked frame's granpos.
See http://wiki.xiph.org/GranulePosAndSeeking for more info.

More information about the theora mailing list