![]() ![]() Video encoders attempt to “predict” change from one frame to the next. Professional-grade video compression software like ffmpeg allows explicit control.Īlso read: What You Need to Know About Video Encoding Interframe Prediction (P-frames and B-frames) ![]() For consumers, the frequency of I-frames is often determined indirectly by the “quality” setting in the encoding software. A bandwidth-optimized application would insert I-frames as infrequently as possible without breaking the video stream. ![]() However, if I-frames are too far apart, the accuracy of the video’s predictive frames will slowly degrade into unintelligibility. ![]() The farther apart the I-frames, the smaller the video file can be. In codecs that use predictive frames like H.264, I-frames are periodically shown to “refresh” the data stream by setting a new reference frame. It’s less efficient but produces a higher-quality raw image file. Because there are no predictive frames, the only compression that can be achieved is by compressing the image within a single frame. This encoding often takes places in the YCbCr color space, which separates luminosity data from color data, allowing motion and color changes to be encoded separately.įor non-predictive codecs like DV and Motion JPEG, that’s where we stop. They are still compressed by an image compression algorithm like JPEG. Because I-frames use no predictive data, the compressed image contains all the data used to display the I-frame. I-frames are compressed independently, in the same way still images are saved. The algorithm has an idea of where the image “starts” (the first I-frame) and where the image “ends” (the second I-frame), and it uses partial data to encode a good guess, leaving out all the redundant static pixels that aren’t necessary to create the image. The B-frame looks at the P-frame and the next I-frame and “averages” the motion across those frames. In the above example, it needs to track how the dots move across the frame, but Pac-Man can stay where he is. P frames need only store the visual information that is unique to the P-frame. B-frames are bi-directionally predicted, using data from both the last P-frame and the next I-frame. P-frames are predicted based on how the image changes from the last I-frame. Every I-frame contains all the data it needs to represent an image. This interframe prediction encoding is what’s responsible for digital video compression’s unnerving artifacts: parts of an old image moving with incorrect action because something in the encoding has gone haywire. It doesn’t make sense to encode the background image for every frame: instead, you can encode it once, then refer back to it until you know the video changes. Imagine, for example, a one-minute shot of a character’s face slowly changing expression. By encoding redundant data a minimum number of times, file size can be reduced. Video compression algorithms look for spatial and temporal redundancies. While it’s no longer the newest video compression format, it still provides a sufficiently detailed example for explaining big-picture concepts about video compression. In this post we’re using H.264 as the archetypal compression standard. The additional dimension and time means different mathematical and logical techniques are applied to the video file to reduce the size while maintaining video quality. Modern video compression algorithms aren’t the same as the image compression algorithms you might be familiar with. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |