[Ffmpeg-devel] Frame count/seeking

Kenneth Aafløy kenneth
Sat Jul 2 02:08:17 CEST 2005


l?rdag 2. juli 2005, 01:47, skrev Ian Gowen:
> Is there an easy way to determine the frame count of a file?
> Right now what I'm doing is reading the whole file and keeping
> a counter but needless to say that's slow; is there a better way?

If the format you are reading from has a parser that would be quicker!
Still you 

> Also, I'm a little fuzzy on how to interpret AVStream.time_base. How
> do I get that in frames per second?

Let me see if I can figure out this:

 double rate = av_q2d(stream->r_frame_rate);

Kenneth





More information about the ffmpeg-devel mailing list