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

Gonzalo Garramuño ggarra13 at gmail.com
Thu Aug 8 04:14:26 EEST 2019


El 6/8/19 a las 20:20, Gonzalo Garramuño escribió:
> 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)
>
I found out that there's a routine called av_guess_frame_rate() which 
reports the proper frame rate as a Rational number.  Hope this helps 
someone dealing with the same issue I was seeing.

-- 
Gonzalo Garramuño



More information about the Libav-user mailing list