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

Måns Rullgård mru
Fri Aug 26 01:45:21 CEST 2005


Rich Felker <dalias at aerifal.cx> writes:

> On Thu, Aug 25, 2005 at 05:44:23PM +0200, IOhannes M Zmoelnig wrote:
>> Burkhard Plaum wrote:
>> >For some formats, the framerate isn't constant, so even if you'll get some
>> >value for it, it will be meaningless. At least for asf, rm and mov/mp4, 
>> >there is no other possibility than to use the individual timestamps
>> >of the frames.
>> 
>> 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)
>
> All formats have a time base, which may or may not correspond to
> framerate. This is the most you can know.

Well, MPEG1/2 have a time base of 90 kHz, but the frame periods are
always from a small set of multiples of this basic unit.  In any given
stream, the time base is something like 1/25 s, even though the file
format time base remains 90 kHz.

>> 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 ?? 
>
> No. If it were a real issue, the image dimension information would be
> generalized in such a way as to _handle_ changing dimensions. (In such
> a stupid hypothetical situation...)

Digital TV often changes aspect ratio, with some programs being 16:9,
and others 4:3.

-- 
M?ns Rullg?rd
mru at inprovide.com





More information about the ffmpeg-devel mailing list