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

James Almer jamrial at gmail.com
Thu Aug 15 18:54:06 EEST 2019


On 8/15/2019 11:34 AM, Tomas Härdin wrote:
> 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)

Afaik, keyint_min is minimum interval/distance between keyframes. So
yes, if it's being used as max distance then it's wrong, as that's what
gop_size is for.

> 
> /Tomas
> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
> 



More information about the ffmpeg-devel mailing list