[Ffmpeg-devel] Re: getting the frame-rate

Burkhard Plaum plaum
Thu Aug 25 21:53:16 CEST 2005


IOhannes M Zmoelnig <zmoelnig <at> iem.at> writes:

> i do not think that this is a valid argument.
> most formats do have a constant framerate (i think); those with an 
> unknown or variable framerate could return an error-value or an invalid 
> framerate (like -1)

Ok, lets be more precise:
99% of the footage has indeed a constant framerate. But many formats allow,
at least theoretically, nonconstant framerates of some kind:

- AVIs can have zero size frames, which means that the frame before will
  be shown longer. 
- MPEG-2 has some flags for repeating fields, which can also
  result effectively in a nonconstant framerate. 
- Quicktime allows individual durations for each frame (via the stts atom) 
  but in most mov files I have, they are all the same.
 
Normally, one will assume a constant framerate, but if you encounter one of the
cases above, you'll get A/V sync problems. Depends on the material you want to
process and how bullet-proof your application should be.

> what happens if there are formats that do not have a constant image-size 
> any more ? will you remove the dimension-information from the API ?? 

I won't remove anything since I'm not an ffmpeg developer :)

Cheers

Burkhard





More information about the ffmpeg-devel mailing list