[theora] Decoding Theora: Number of frames?
s_weber at blyth.ch
Tue May 4 11:36:00 PDT 2010
> On Tue, May 4, 2010 at 7:27 AM, Stefan Weber<s_weber at blyth.ch> wrote:
>> Hi all
>> I'm currently writing a decoder for Ogg Theora videos.
>> Since I'd like to show the progress of the video, I need to know how to
>> read the current (with granulepos?) and total number of frames from the
>> Theora header.
>> I didn't find an appropriate field in the header specifications for the
>> total number.
> Theora is designed as a streaming format; there is no mandatory header
> with this information. There is now a specification for an Ogg Index
> which has index information that can presumably give you this, but
> that isn't commonly found in real-world files yet.
> Instead, you'll need to seek to the end of the file, find the final
> page of the theora stream, and use the granulepos from this page to
> calculate it.
Allright that sounds reasonable, I will give that a try tomorrow. Thank
you very much for your fast answer Michael.
More information about the theora