I am running a use case where I am setting the I-frame (and IDR) interval to 30 frames. If I call forceIDR every 45 frames I will see Intra frames on 30 45 61 90 92 122 135 …
I understand from Encoding interval and initial frame for i-frames and IDR that for some reason the internal interval counter does not reset after calling forceIdr (this is a bug in my opinion). but what is not addressed is that calling forceIdr causes the frame interval count to skip the inserted I frame. So instead of the next I-frame occurring at the 30th frame it occurs 31 frames later.
My real use case is that I want to flush the encoder every x frames. Suppose that is every 60 frames. We have implemented after our flush call to force the next frame as IDR as some times we need to guarantee the stream can be “cut”. What is happening is that we end up seeing 2 I-frames back to back.
Requesting that setting forceIDR resets the interval count between I-frames. At the very least it should not be skipping counting the I-frame as a frame in the interval count.