Log in

View Full Version : min-keyint functionality


cpelliott
27th January 2009, 16:04
My question is about the functionality of min-keyint and also its use.

Does it set the minimum distance between key frames or between I frames?

In either case what would be the benefit of setting it above 1? Are there decoders that don't function properly if I frames are too close together?

If the functionality is for key frames, then I am really confused as to its use. If there is a scene change, but min-keyint prohibits a new key frame, it would seem that x264 would still produce an I frame and that future P and B frames would not reference anything before that I frame. In effect it would be a key frame that just wasn't marked as such.

It seems that setting min-keyint to anything other than 1 might restrict x264 in its quest for the highest efficiency. I'm just trying to get maximum coding efficiency without breaking decoder compatibility (for me, currently PopcornHour A-100).

kemuri-_9
27th January 2009, 17:22
min-keyint is the minimum distance between IDR frames.

best explained by example:
1. frame 40 is an IDR frame
2. scenecut triggers at frame 50.

if min-keyint is >10 (default 25) then frame 50 will be an I frame.
if min-keyint is <=10 then frame 50 will be an IDR frame.

afaik, some decoders/standards have restrictions on the distance between IDR frames

i.e. meGUI's blu-ray settings has min-keyint as 2 rather than 1, this prevents consecutive IDR frames.

cpelliott
27th January 2009, 17:46
min-keyint is the minimum distance between IDR frames.

best explained by example:
1. frame 40 is an IDR frame
2. scenecut triggers at frame 50.

if min-keyint is >10 (default 25) then frame 50 will be an I frame.
if min-keyint is <=10 then frame 50 will be an IDR frame.

Thank you for the info on the functionality. In the case listed when the first frame of the new scene is not an IDR frame, I guess it will have all the characteristics of an IDR frame (future frames will not likely reference frames before it) except it will not be marked as such. The only effect on efficiency is that since it couldn't be marked as an IDR, max-keyint could force an IDR earlier than otherwise. Since I'm trying to squeeze out the highest efficiency for a fixed size, I should reduce min-keyint to the minimum size permitted by my decoder. It is a Sigma Designs chip typically used in Blu-Ray players, so I will try 2.

In my current encode with defaults for min-keyint and max-keyint, I see as many as 6 consecutive I frames (the first also being an IDR frame). It is curious to me why a decoder would be fine with numerous consecutive I frames, but be unhappy if they are marked as IDR frames. Does anyone know what the min-keyint requirements are for common decoders (PC-based, PS3, AppleTV) and how the default of 25 came about?