From: Nicolas Dufresne
Date: Fri Jan 15 2016 - 12:21:30 EST

Le vendredi 15 janvier 2016 Ã 18:01 +0100, Kamil Debski a ÃcritÂ:
> I think we had a discussion about this long, long time ago. Should it
> be
> deterministic which frame Is encoded as a key frame? Should it be the
> next queued frame, or the next processed frame? How to achieve this?
> I vaguely remember that we discussed per buffer controls on the
> mailing
> list, but I am not sure where the discussion went from there.

In RTP use cases (and most streaming cases), all we care is that we
have a key-frame produced somewhere nearby after the request. In those
cases we use P frame only stream to reduce the bandwidth and only
request a key frame for recovery. This I believe that most common case.

Many decoders though also offer what they called an "automatic" key
frame mode. In the case of x264, there is also hints you can give to
the encoder about what type of video (film, anime, etc.) so it can
optimize all this. I believe this is very advance and there is no
particular need for it.

> > - A way to trigger a key frame to be produce
> > - A way to produce a I-Frame only stream
> This control can be used to do this:
> - V4L2_CID_MPEG_VIDEO_GOP_SIZE (It is not well documented as I can
> see ;) )
> ÂÂÂÂÂÂÂÂ+ If set to 0 the encoder produces a stream with P only
> frames
> ÂÂÂÂÂÂÂÂ+ if set to 1 the encoder produces a stream with I only
> frames
> ÂÂÂÂÂÂÂÂ+ other values indicate the GOP size (I-frame interval)
> > - A way to set the key-frame distance (in frames) even though this
> could
> > possibly be emulated using the trigger.
> As described above V4L2_CID_MPEG_VIDEO_GOP_SIZE can be used to
> achieve this.

Great, my memory failed on me, should have checked. This is exactly
what I was thinking. So Wu-Cheng Li patch is really what we need in the


Attachment: signature.asc
Description: This is a digitally signed message part