GOP or “Group of Pictures” is a term that refers to the video structure representing how digital video is grouped. But before we get into understanding GOP, let’s start with the basics of the video structure. When a video is encoded to be viewed on television or by any streaming platform, it’s important that it is compressed. In order to more easily transmit digital media, video compression is used to turn large raw video files into smaller video files that can transmit more easily over limited bandwidth. Video compression works by locating and reducing redundancies within an image or a sequence of images. A video is composed of a sequence of frames displayed at a given frequency. In most common video content, each frame is very similar to those that precede and follow it. Though there might be lots of movement in the subject of the content, the background and a large portion of the image is usually the same or very similar from frame to frame.

 

data-compression-technology

Figure 1: Encoding video for data transmission uses data compression technology
(https://lensec.com/about/news/newsletter/lpn-03-20/video-compression-flowchart/)

 

Video compression takes advantage of this by only sending some frames in full (known as Inter-frames or I-frames) along with the difference between the I-frame and the subsequent frames. The decoder then uses the I-frame plus these differences to accurately re-create the original frames. This method of compression is known as temporal compression because it exploits the fact that information changes in a video slowly over time. A second type of compression, known as spatial compression, is used to compress the I-frames themselves by finding and eliminating redundancies within the same image.

This brings us back to the concept of Group of Pictures. Put simply, a GOP is the distance between two I-frames measured in the number of frames. I-frames are sometimes referred to as “Keyframes” as they are the key that the other types of frames are structured around. Figure 2 below shows a simple representation of a single GOP. As you can see, it begins with the keyframe (blue) and the white frames contain the information used to create the appearance of motion when referencing the keyframe.

 

Figure 2: GOP with Keyframes
(https://aws.amazon.com/blogs/media/part-1-back-to-basics-gops-explained/)

 

Let’s look at one example: If you’re watching a compressed video at 30 frames per second, you’re not really seeing 30 full pictures. Instead, you’re seeing sets of GOPs similar to the one pictured above. Depending on the codec, a GOP could consist of very large or very small GOP lengths. Within a typical GOP, you have three types of frames: I-frames, P-frames, and B-frames. Every GOP begins with an I-frame, which contain the complete image. After this comes the P-frames (Predicted frames) and B-frames (Bi-directionally predicted frames). P-frames reference past frames and B-frames reference past and future frames. P-frames and B-frames are incomplete images that reference the I-frame and surrounding images to fill in the blanks. P-frames and B-frames contain either bits of new visual information to replace parts of the previous frame or instructions on how to move around bits of the previous frame to create the appearance of motion. By processing and compressing GOPs instead of individual frames, file sizes and stream bitrates can be significantly reduced. Figure 3 below is a representation of these different types of frames, arranged into one Group of Pictures.

 

Figure 3: GOP with B-Frames and P-Frames
(https://fr.wikipedia.org/wiki/Fichier:Group_of_pictures_illustration.jpg)

Optimizing your GOP Length

The length of your GOP has important implications in regards to video quality. A shorter duration can preserve more visual information, especially in high-motion video, but is less efficient in that it needs a higher bitrate to look good. A longer GOP is useful in low-motion videos where very little in the frame changes, allowing for reduced redundancy which can look better at lower bitrates. Longer GOPs are better suited for maximum compression on a given bandwidth while smaller GOPs are better suited for scene changes, rewinding, and resiliency to media defects.

 

Open and Closed

GOPs can be divided into two categories: ‘Open’ and ‘Closed’. Open GOPs are those where frames in one GOP can refer to frames in other GOPs for redundant blocks. You see this in Figure 4 below where the last two B-frames refer to the I-frame in the next GOP for redundancy.

 

Figure 4: Open GOP has frames that refer to frames outside the GOP for redundancies
(http://tiliam.com/Blog/2015/07/06/effective-use-long-gop-video-codecs/)

 

On the other hand, closed GOPs are those in which frames in one GOP can only refer to frames within the same GOP for redundant blocks. An IDR frame is a special type of I-frame that specifies that no frame after the IDR frame can reference any frame before it. Through the use of these IDR frames, we form closed GOPs which can’t refer to frames outside the GOP. The IDR frame acts as a buffer between GOPs, closing them off to references from other GOPs. This can be seen in Figure 5 below where a closed GOP is shown with an IDR frame.

 

Figure 5: A closed GOP can’t refer to frames outside the GOP for redundancies
(http://tiliam.com/Blog/2015/07/06/effective-use-long-gop-video-codecs/)

 

All in all, GOP structure is an extremely useful concept in the world of digital media that allows us to properly compress video streams and significantly reduce stream bitrates while maintaining maximum quality for a variety of applications. Encoding using I-frames, P-frames, and B-frames is an integral part of video compression in the modern digital media world and understanding the correct GOP structure for your content is vital for proper quality control and providing the best viewing experience to the viewer.

 

GOP Verification Tools

One integral step in the typical media workflow processing is use of QC software, such as Venera Technologies Pulsar (for on-premise QC) and Quasar (for cloud-based QC). Pulsar & Quasar offer variety of GOP level checks and are the most effective way to prevent GOP related problems in many types of content. For example, in low-motion video a larger number of B-frames can look fine, and deliver great compression ratios, but in faster motion video it will consume more processing power to decode. Using Pulsar/Quasar, the user can verify that the media has the proper GOP structure, and therefore would represent the best visual quality to the viewer.

There are many options for GOP verification within Pulsar/Quasar. Since proper validation of GOP structure is an important aspect of quality control in digital media, Pulsar/Quasar make it easy to verify GOP length, verify the presence or absence of different types of frames, and check for a multitude of GOP compliance aspects. These checks can be automated and the process is as easy as customizing a template for the GOP qualities you wish to maintain and scanning files in any folder to ensure compliance.

 

 

One important check within Pulsar/Quasar is the ability to specify a range (in frames) of GOP lengths in order to verify the content falls within that range. This distinction has large implications on the file size and bandwidth required for your digital media. Another is the GOP Category verification. This allows you to specify long GOPs or I-frame only GOPs. Pulsar/Quasar also offer checks for the presence or absence of B-frames, Max consecutive I-frames, distance between I-frames, and max consecutive B-frames. Furthermore, both software solutions also allow you to verify Closed or Open GOPs.

Pulsar/Quasar support a wide range of media formats and offer comprehensive quality checks, including extensive GOP related compliance checks. They are solutions that can dramatically increase your QC efficiency when used effectively. They can be integrated into your workflow in a multitude of locations and template customization allows you to tailor them to your specific needs.

For additional information about Pulsar, please visit https://stage.veneratech.com/pulsar

For additional information about Quasar, please visit https://stage.veneratech.com/Quasar

 

Please follow and like us:
Twitter
Visit Us
Follow Me
LinkedIn
Share