[Libav-user] How can I emulate "-r" switch programmatically?

wl2776 wl2776 at gmail.com
Wed Oct 5 13:15:57 CEST 2011

I'm writing an application, remuxing streams.
It has the raw motion jpeg as an input and saves it to .avi files.

My problem is that motion jpeg has a frame rate of 2fps, but the resulting
files have 25fps.
I know the accurate frame rate value, because all my input frames have
timetamps, stored separately.

I have the following code snippet:

However, av_dump_format anyway writes:

That is, setting framerate to 2 fps had no effect.

However, I've managed to do the same using ffmpeg command line utility.
It writes 2pfs, 2tbr, 1200k tbn, 2 tbc and the resulting videos have correct
frame rate.

Here is the full output:

View this message in context: http://libav-users.943685.n4.nabble.com/How-can-I-emulate-r-switch-programmatically-tp3874115p3874115.html
Sent from the libav-users mailing list archive at Nabble.com.

More information about the Libav-user mailing list