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
