encodingdecodingmultimedia

Can GOP have more than 1 I-frame?


According to this GOP can have more than one I-frame.

According to wikipedia:

An I frame indicates the beginning of a GOP.

If every I-frame starts new GOP it implies one I-frame per GOP.

I believe that wikipedia is wrong. But I have also other questions. I found that:

each GOP is independant: all frames needed for predictions are contained within each GOP

If this is correct then it means that each GOP must start with key frame (I-frame which is also IDR). I saw contents in which they're not, so maybe assumption about GOP independence is incorrect.

So here are my questions:

  1. Can GOP have more than 1 I-frame?
  2. If #1 is "no" then why not all I-frames are key frames? Aren't GOPs suppose to be independent?
  3. If #1 is "yes" then must GOP at least start with IDR?
  4. Is there some format that has variable GOP length? I mean e.g. one GOP is IPP, second is IPPPPP and third is IPPP.
  5. What about content that has e.g. 600 frames. I 19*P, I 19*P (...) but has only one key frame (first I-frame). Does such content has GOP length 600 or 20?

Solution

  • After some more research I found those (but please correct me if I'm somewhere wrong):

    1. Yes GOPs can have more than 1 I-frame although it's not usual, so wikipedia is wrong.
    2. ---
    3. No, they don't have to. GOPs doesn't have to be independent (encoded as closed), they can be encoded as open.
    4. Yes, there are algorithms which detect scene change and they can generate variable GOPs, although I don't know how it binds with answer for the first question.
    5. In such case GOP length is 20