LS
2005-Sep-27 00:24 UTC
[Theora-dev] Question about number of frames in ogg/theora video file.
Hello. How can I tell the number of frames in ogg/theora video file, without actually reading the file? Or, how can I tell its playing time (which is basically the same thing). I didn't find the information in THEORA_STATE, THEORA_INFO, but with the codec installed (illuminable oggcodecs), Windows Media Player shows the ogg/theora file playing time, before it starts playing the file. Thanks! LS
illiminable
2005-Sep-27 15:14 UTC
[Theora-dev] Question about number of frames in ogg/theora videofile.
The short answer is you can't. My directshow filters are actually silently scanning the entire file to find it's duration. Which is why if you open a really huge file, it will take a little while to load... since it's actually building a seek index at the same time. In a single chained file... you need to search for the last page in each stream, get the granule pos, do the conversion to real time. And choose the higher value of all streams. In a multi chain file (which you won't find many of anyway)... you need to binary search for all chain boundaries and do the above process for each chain... then add it all together. Zen. ----- Original Message ----- From: "LS" <linesoft@plotinka.ru> To: <theora-dev@xiph.org> Sent: Tuesday, September 27, 2005 3:24 PM Subject: [Theora-dev] Question about number of frames in ogg/theora videofile.> Hello. > > How can I tell the number of frames in ogg/theora video file, without > actually reading the file? Or, how can I tell > its playing time (which is basically the same thing). > > I didn't find the information in THEORA_STATE, THEORA_INFO, but with the > codec installed (illuminable oggcodecs), > Windows Media Player shows the ogg/theora file playing time, before it > starts playing the file. > > Thanks! > > LS > > > _______________________________________________ > Theora-dev mailing list > Theora-dev@xiph.org > http://lists.xiph.org/mailman/listinfo/theora-dev > > >