… for Codecs & Media
Tip #829: Why Are Some Codecs “Inefficient?”
Larry Jordan – LarryJordan.com
GOP compression yields smaller files, but those files are much harder to edit.
One of the key reasons for transcoding highly-compressed camera masters into an intermediate (or mezzanine) format is to make the media more “efficient.” But, what makes some codecs efficient and others not?
In general, there are two ways that media can be compressed:
In I-frame compression, each frame in a sequence is compressed individually. The entire contents of the frame are contained in that compressed image. This means that to display that image, all the computer needs to do is uncompress that one frame.
In GOP compression images are compressed in groups; generally containing either 7 or 15 frames. The first image is compressed in its totality. However, for each remaining image in the group, only those pixels that are different in each frame from the preceding frame are compressed and stored in the file.
NOTE: GOP (pronounced “gop”) is an acronym for “Group of Pictures.”
GOP compression creates far smaller files because only portions of each frame are getting compressed.
However, in order to display a GOP-compressed frame, the computer needs first to find the first frame in the group and decompress it. Then, it needs to add all the changes stored in all the frames after the first frame and up to the frame the playhead is parked on.
While GOP compression creates very small files, the computer has to work VERY hard to display each frame as you jump randomly around in the timeline. This is especially true as multiple clips are stacked above each other. Each group needs to be decompressed separately.
GOP compression is perfect for playback, because the changes in each frame can easily be added to the currently displayed frame. However, video editing means that we are randomly jumping from one frame and clip to another. In those situations, I-frame compression is much more efficient because only one frame needs to be decompressed, not an entire string.