Hi I tried the advice of using
time_base = 1.0/(ticks_per_frame * frame_rate); to get the frame_rate It gives me frame_rate as 1000 fps for a video. Whereas the field r_frame_rate in AVFormatContext::streams gives 25 fps. What is this r_frame_rate? Is it not the actual frame_rate of the video? Appreciate any advice on the above. On Wed, Jan 13, 2010 at 11:38 AM, Sean McAllister <[email protected]>wrote: > On Tue, Jan 12, 2010 at 6:48 PM, S R <[email protected]> wrote: > > > Hi > > > > I tried to use the following command to check the frame rate of the > video. > > It is a > > > > AVFormatContext *pFormatCtx; > > .... > > > > printf("\n Avg Frame Rate = %d / > > %d\n",pFormatCtx->streams[videoStream]->avg_frame_rate.num, > > pFormatCtx->streams[videoStream]->avg_frame_rate.den); > > > > But I got the following errors during compilation. > > > > test.c:92: error: ‘AVStream’ has no member named ‘avg_frame_rate’ > > test.c:92: error: ‘AVStream’ has no member named ‘avg_frame_rate’ > > > > Any advice on what is wrong? How I can get the frame rate of the video? > > _______________________________________________ > > libav-user mailing list > > [email protected] > > https://lists.mplayerhq.hu/mailman/listinfo/libav-user > > > > I use AVCodecContext::time_base, and AVCodecContext::ticks_per_frame, > time_base = 1.0/(ticks_per_frame * frame_rate), so you can easily compute > it > that way. > _______________________________________________ > libav-user mailing list > [email protected] > https://lists.mplayerhq.hu/mailman/listinfo/libav-user > _______________________________________________ libav-user mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/libav-user
