[Libav-user] h263 frame rate

David Longest david.longest at apx-labs.com
Tue Sep 18 18:27:02 CEST 2012

After looking further into it, I have been looking at the AVPacket pts and dts in order to determine the frame delay. Instead the proper timestamps are being placed in the AVFrame pts using the AVCodecContext time_base.

I am currently attempting to play back video at 15 fps. The AVStream's time_base is 1: 1200000 while the packet "pts" gets updated by 4004 every packet, resulting in ~30fps. However, after decoding the AVFrame using avcodec_decode_video2, we get the time_base of 1001:30000 in AVCodecContext, but the AVFrame's PTS updates by about 2 each frame. This gives a frame rate of ~15fps which is what I'm looking for.

In libavcodec 54.23.100, should the AVFrame and AVCodecContext be used for determining presentation times for all codecs or is it specific to h263?

More information about the Libav-user mailing list