Re: Decoding Theora: Number of frames?
Stefan Weber <[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 > Allright that sounds reasonable, I will give that a try tomorrow. Thank you very much for your fast answer Michael. cheers