past frame (for example, it is likely that the sky will still be on the top of the frame and that it will still be blue), it is possible to predict portions of a future frame. P-Frames(Predictive) reference the nearest previous I-frame. Video data that contains only I and P frames requires less bandwidth than video that contains only I-Frames for comparable quality.
With I-Frames and P-Frames being generated, it is possible to place the P-Frame some number of frames away from its reference I-Frame, and calculate the contents of the frames in between using both the I-Frame and the P-Frame as references. These frames are called B-Framesand are bi-directional (i.e. they are based on a predicted future frame and on a past frame). Also note that B-Frames are based only on I-Frames and P-Frames, never on past B- Frames, so errors are not propagated. VBricks can be configured to produce I-Frames only, I and P-Frames only, or I, B and P-Frames. In terms of bandwidth usage, I-Frames use the most, B-Frames require the least. It follows then that I-Frames contain the most information and B-Frames contain the least information.
Group of Pictures (GOP)
The collection of I, B, and P frames makes up a Group of Pictures (GOP). The selection of GOP parameters is a trade-off between bandwidth usage, picture quality, sensitivity to transmission errors, and delay. An extended GOP will be more sensitive to transmission errors than a small GOP because any error can affect the entire GOP. It is possible to configure the GOP several ways, for example, I only, IP, IBP, IBBP, etc.
Reference Distance
Reference Distance and Intrapicture Distance are set in Configuration: Encoder > Video. The Reference Distance defines the number of consecutive B pictures there are between an I or P picture and then next I or P picture:
1.No B picture
2.One B picture between I or P pictures
3.Two B pictures between I or P pictures
The Intrapicture Distance can be set between 1 and 19 (default is 15) for MPEG-2. The value refers to the number of P or B frames between I frames and defines the Group of Pictures (GOP).
Interrelationship
Table 2 Reference Distance Settings illustrates various combinations Reference Distance settings (up to 3) and GOP Length (up to 19). The GOPs are shown in display order. More P and B frames increase the compression ratio; however, B frames increase the overall delay. In general, it is best to chose the highest compression ratio and then try lower ratios (e.g. lower reference distance) if the video experiences transmission problems.
In operation, a P-Frame will be generated and transmitted before the B-Frame. An MPEG decoder must, therefore, reorder the incoming frame to display the I-B-P frames in the correct order. This is done using "presentation time stamps" created by the MPEG encoding and multiplexing process. This reordering process requires one or more frames be held in the decoder buffer, waiting it's turn for display, therefore increasing the delay. At 30 frames per second, each frame requires approximately 33 milliseconds. Synchronized audio is also compressed using MPEG, and is multiplexed with the video to create an MPEG Transport Stream.