[Libav-user] I'll ask in other words - how can I force input frame rate?

Steffen Ebersbach ebersbac at hs-mittweida.de
Mon Oct 10 08:43:55 CEST 2011


> wl2776 wrote:
>
> So, it is possible to force input frame rate. How can I do it in my
> application?
>

Hello,

in an own application you have to do this resampling by your self. If 
you have 2fps input and 25fps output, it means that you have to write 
each picture from the input 12,5 times to the output. In fact this is 
not possible, so you have to do 12 and 13 pictures for each second. The 
code should look like this

- read input sample

while < 12 (13)
     - write to the output
     - wait 40ms

.. and so on

Steffen


More information about the Libav-user mailing list