[Ffmpeg-devel] getting the frame-rate
Thu Aug 25 16:11:31 CEST 2005
IOhannes M Zmoelnig wrote:
> this might seem rather obvious, but i haven't found any answer to this,
> neither in any header-files nor in google. i have to admit that i didn't
> try to read the code of mplayer or the like.
> if this is the wrong list, please re-direct me. anyhow:
> i am writing an application (pd/Gem) that uses ffmpeg to decode video. i
> would like to know the frame-rate of an opened video-stream/file/whatever.
> what is the correct way to do that ?
See libavcodec/utils.c near line 787: 1/av_q2d(enc->time_base)
> i found the "frame_rate" field in AVCodecContext, but it seems to be no
> longer in use.
No such field anymore, which version are you using?
> i also found the variable "pts" in AV_COMMON_FRAME which seems to be
> related to this, but i am really unsure about this.
> note: i am using debian (with christian marillats packages) and on 3
> machines at home i have installed an avcodec.h with the 0x000409; all 3
> files differ significantly (at least, regarding the frame_rate and
> of course this is a problem with the debian-packages.
> however i would like to know what is the advised way to get the
> frame_rate in the future (eventually the debian-packages will be updated).
> so is the API already fixated with this peculiar feature ?
> (if not i will, for now, just _not_ try to read the framerate when using
> ffmpeg-devel mailing list
> ffmpeg-devel at mplayerhq.hu
T +32  2 790 29 41
F +32  2 790 29 02
E mailto:mbardiaux at mediaxim.be
Vorstlaan 191 Boulevard du Souverain
Brussel 1160 Bruxelles
More information about the ffmpeg-devel