Skip to content

Adapts the changes of avcodec API. Solves fast framerate 600 fps.

Jafari requested to merge s.jafari.m/vtk:FixvtkFFMPEGWriterFrameRate into master

Adapts the changes of avcodec API. Using deprecated avcodec_encode_video2() will result in FPS set to 600. avStream must also be adjusted to the correct time_base.

2016-04-21 - 7fc329e - lavc 57.37.100 - avcodec.h Add a new audio/video encoding and decoding API with decoupled input and output -- avcodec_send_packet(), avcodec_receive_frame(), avcodec_send_frame() and avcodec_receive_packet().

reference

Could be checked with an older version of 57.37.100 to see if it works fine without changes, otherwise at least frame-rate setting must still be applied on avStream and codec object AVCodecContext *cc.

This adaptation seems to be done in current version 9.0d, but I made a very quick test in it got a wrong FPS using ffmpeg-4.2.2.

Edited by Jafari

Merge request reports