GOP, B Frames and Codec Threads - What Do They Mean?

A GOP (Group Of Pictuires) always starts with an I-frame (Intra frame).
An I-frame contains all the information needed to produce the picture for that frame, it does not depend on the contents of any other frame. If the GOP consists of only I-frames it would emulate an old cinematographic spool of tape, where e.g. damage to one frame would not affect any other frame.

The GOP can also contain zero or more B-frames (Bi-directional frame).
B-frames consist of information that describes the changes in the picture between this frame and the previous one. So damage or corruption of an I-frame or B-frame would affect the validity of subsequent consecutive B-frames.

The GOP can also contain zero or more P-frames (Predictive frames).
P-frames consists of information that describes the changes in the picture beween this frame and the previous I-frame and also the following I-frame. In this way any discrepancies or corruption within previous B-frames are eliminated from this P-frame onwards.

e.g. IBBBPBBBPBBBIBBBPBBBPBBBI (GOP = 12)

If you have a GOP of 1 (only consists of I-frames), you can easily jump (move the playhead) to any frame. The higher the GOP number the more difficult it is to move to playhead to a particular frame, since that frame may be a B- or P-frame and you have to seek to the corresponding I-frame (and intervening B-frames) to get the whole picture.
This becomes even harder if you have multiple tracks that may not have the same GOP number so that their I-frames to not coincide, or even if the GOP numbers are the same but the I-frames are aligned differently. Also playing in reverse is considerably harder for the hardware to do.

Obviously the main advantage of high GOP numbers is that the filesize is less than with large GOP numbers (usually considerably less unless there is a huge amount of motion between consecutive frames). The main disadvantage of large GOP numbers is the amount of processing power needed to create/handle the B- and P-frames.

@moonthink I hope this clarifies the situation for you.

6 Likes