Re: Decoding Theora: Number of frames?

Michael Smith <[email protected]>
Newsgroups gmane.comp.multimedia.ogg.theora.general
Message-ID <[email protected]>
On Tue, May 4, 2010 at 7:27 AM, Stefan Weber <[email protected]> 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.

Mike
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.