[Libav-user] fps wrong in doc/examples and in my own code

Gonzalo Garramuño ggarra13 at gmail.com
Wed Aug 7 02:20:17 EEST 2019


I have a problem with the new codecpar api in that I cannot get it to 
encode the right fps.  By fps I mean what ffprobe reports as fps in the 
Stream section and what my viewer uses as fps (stream->avg_frame_rate).

The problem also shows up in the demo doc/examples/muxing, which when 
encoded at 1/25, ffprobe reports:

     Stream #0:0: Video: h264 (High) (avc1 / 0x31637661), yuv420p, 
352x288, 252 kb/s, 25.10 fps, 25 tbr, 12800 tbn, 50 tbc (default)

That is, 25.10 fps instead of 25.  If I encode breaking the new api, like:

     stream->codec->time_base = avctx->time_base;

then the fps result is correct, but I get a warning of deprecation of codec.

So I am missing something rather obvious and maybe someone can clarify 
for me if I am using something wrong.

-- 
Gonzalo Garramuño



More information about the Libav-user mailing list