[Libav-user] I'll ask in other words - how can I force input frame rate?
wl2776
wl2776 at gmail.com
Mon Oct 10 09:32:28 CEST 2011
Steffen Ebersbach-2 wrote:
>
>> 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
>
Sorry for repeating quotes, one more thing, which probably is not obvious.
You can specify "-r" switch (set frame rate) in the command line of ffmpeg
*before* "-i" switch.
This makes ffmpeg to consider that *incoming* frame rate is given from
outside and it should not neither determine nor assign a default value.
--
View this message in context: http://libav-users.943685.n4.nabble.com/How-can-I-emulate-r-switch-programmatically-tp3874115p3889404.html
Sent from the libav-users mailing list archive at Nabble.com.
More information about the Libav-user
mailing list