[prev in list] [next in list] [prev in thread] [next in thread] 

List:       theora-dev
Subject:    [Theora-dev] Question about number of frames in ogg/theora
From:       ogg () illiminable ! com (illiminable)
Date:       2005-09-27 15:14:04
Message-ID: 001201c5c3b0$bb982d20$0200000a () tiger
[Download RAW message or body]

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
>
>
> 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic