[FFmpeg-devel] [PATCH] cinepakenc: When rd_frame() doesn't use MC, mark pkt as keyframe and reset curframe

Tomas Härdin tjoppen at acc.umu.se
Thu Aug 15 17:34:30 EEST 2019


Hi

Attached patch detects when the cinepak encoder has generated a
keyframe on its own, and pushes the generation of forced keyframes into
the future. This is similar to what msvideo1enc.c does.

Example:

$ ./ffmpeg -i fate-suite/zmbv/zmbv_32bit.avi -keyint_min 20 -vcodec
cinepak out-before.avi
$ make
$ ./ffmpeg -i fate-suite/zmbv/zmbv_32bit.avi -keyint_min 20 -vcodec
cinepak out-after.avi

out-before.avi: 667338
 out-after.avi: 660928

Aside: what is -keyint_min for exactly? It seems to be used as a max in
msvideo1enc.c, but libx264.c and libxavs.c uses it and gop_size as
minimum and maximum respectively.. Feels like the relevant encoders
need to be brought into line (assuming it doesn't break user scripts)

/Tomas



More information about the ffmpeg-devel mailing list