[FFmpeg-devel] Changing the framerate of an putput stream dynamically
sharleen_go at ymail.com
Thu Nov 30 16:27:48 EET 2017
I was wondering if someone has ever tried modifying the code of FFmpeg to support varying the framerate during streaming. So far, I tried to re-initialize the AVCodec Context of the output stream to apply the new framerate. Whenever I would suddenly change the framerate (from inside ffmpeg .c code, without any logic just through time), I would get a bunch of Non-monotonous DTS in output stream... errors. Furthermore, if I increase the framerate the errors would appear but streaming doesn't stop. If I decrease the framerate, frames would constantly be dropped and streaming stops. I am no video encoding expert so I really have no idea regarding the math behind the calculation of encoding parameters and such.
If anyone has an idea please help me out. What exactly is the proper way of changing the framerate, aside from re-initializing the AVCodec Context, what else must be recalculated?
More information about the ffmpeg-devel