VP8 encoder keyframe interval

815 views
Skip to first unread message

Matthew Heaney

unread,
Jun 25, 2010, 1:53:25 PM6/25/10
to WebM Discussion
Does anyone know the magic incantation to force the VP8 video encoder
to honor the keyframe interval settings? I set the min and max
keyframe distance parameters to the same value (50, as the framerate
is 25 fps), and the keyframe mode to "disabled", yet the compressor is
only giving me a single keyframe at the beginning of the clip (which
is about 147 sec). What other settings should I use to get a keyframe
every 2 sec?

Thanks,
Matt

James Zern

unread,
Jun 25, 2010, 2:00:48 PM6/25/10
to webm-d...@webmproject.org
The encoder wrapper in libvpx special cases min=max when the mode is
_AUTO and will force the encoder to produce keyframes on that
interval. To my knowledge _DISABLED will in fact disable key frame
production.

From vp8_cx_iface.c:vp8e_encode
/* Handle fixed keyframe intervals */
if (ctx->cfg.kf_mode == VPX_KF_AUTO
&& ctx->cfg.kf_min_dist == ctx->cfg.kf_max_dist)
{
if (++ctx->fixed_kf_cntr > ctx->cfg.kf_min_dist)
{
flags |= VPX_EFLAG_FORCE_KF;
ctx->fixed_kf_cntr = 0;
}
}

Andy Shaules

unread,
Jun 25, 2010, 2:03:15 PM6/25/10
to webm-d...@webmproject.org
Disabled means you will pass in flag to encode function when you want a key
frame

Re-enable key frame and you will be good to go.

> --
> You received this message because you are subscribed to the Google Groups
> "WebM Discussion" group.
> To post to this group, send email to webm-d...@webmproject.org.
> To unsubscribe from this group, send email to
> webm-discuss...@webmproject.org.
> For more options, visit this group at
> http://groups.google.com/a/webmproject.org/group/webm-discuss/?hl=en.
>

Reply all
Reply to author
Forward
0 new messages