Briefly explain what are I frames, B frames, and P frames?

In the field of video compression a video frame is compressed using different algorithms with different advantages and disadvantages, centered mainly around amount of data compression. These different algorithms for video frames are called picture types or frame types. The three major picture types used in the different video algorithms are I, P and B. They are different in the following characteristics:

I‑frames are the least compressible but don't require other video frames to decode.
P‑frames can use data from previous frames to decompress and are more compressible than I‑frames.
B‑frames can use both previous and forward frames for data reference to get the highest amount of data compression.

Three types of pictures (or frames) are used in video compression: I, P, and B frames.

An I‑frame (Intra-coded picture) is a complete image, like a JPG or BMP image file.

A P‑frame (Predicted picture) holds only the changes in the image from the previous frame. For example, in a scene where a car moves across a stationary background, only the car's movements need to be encoded. The encoder does not need to store the unchanging background pixels in the P‑frame, thus saving space. P‑frames are also known as delta‑frames.

A B‑frame (Bidirectional predicted picture) saves even more space by using differences between the current frame and both the preceding and following frames to specify its content.

P and B frames are also called Inter frames. The order in which the I, P and B frames are arranged is called the Group of pictures.

I frames, B frames, and P frames are video frame types used in video codecs. I frames can be decoded without reference to any other frames. They are self-contained descriptions of one frame of the video. P frames and B frames on the other hand reference other frames and must be decoded after the frames they reference have been decoded. P frames only reference frames from earlier in the video whereas B frames can reference frames from earlier or later. Decoding B frames therefore requires decoding the video frames in an order different from the playback order.