Inter-Frame Compression

Inter frame compression header

What Is Inter-Frame Compression?

Inter-frame compression is a way of reducing the size and improving the quality of video files. It’s a form of video compression that allows the encoder to analyze and send “keyframes” to compress, using them as a reference for other frames. Since most frames have a lot of carryover information (colors, objects, etc.), inter-frame compression can compress faster. It differs from intra-frame compression, which compresses each frame individually.

I, P, and B Frames

We called them “keyframes” before, but there’s a little more to them than that. These frames are divided into three distinct types:

  • I-frames are intra-coded frames and are the actual keyframe that is compressed and used as a reference for the decoder. They contain all the information needed to decode the entire frame, so they’re used as references for other frames. I-frames are also used to reduce the number of bits required to encode a frame by providing an overview of what happens in each scene or shot.
  • P-frames are predictive frames that use previously decoded I or P-frames as reference images (as well as other P-frames). They’re often called “difference” frames because they represent differences between those references and their contents. If you have an image A and want to get image B by applying some changes to A, then B would be an example of what you end up with after making those changes.
  • B-frames are bi-directional prediction frames; they use previous and subsequent frames as references when encoding their content into a compressed bitstream using motion compensation techniques such as block matching or macroblock pattern comparison.

Inter frame compression

What About S-Frames?

Within the new AV1 codec, inter-frame compression adds a new “S-Frame”. This frame is a P-frame that only uses an I-frame as a reference, relying on the rest of the video stream for other information.

These were created as a new way to allow Adaptive Bitrate Streaming to stream smaller segments while maintaining a similar quality. These S-frames can be a lower resolution than other frames, but it still speeds up streaming.

Compressing Videos with Cloudinary

By using inter-frame compression, you can deliver high-quality videos with smaller file sizes, reducing bandwidth requirements and improving the overall user experience. And the best way to do this is with Cloudinary’s Media Experience Cloud.

With Cloudinary, our Dynamic Delivery allows you to create an original, optimized image or video at any resolution and automatically adapt it according to your viewer’s device, browser, and network conditions. Additionally, Cloudinary’s robust API and integrations make automating the entire media management and delivery process easy, freeing up valuable time and resources for your team.

If you don’t have a Cloudinary account, you can sign up for free today!