‘I’ frame rate

MPEG2, VC1 and MPEG4 AVC are all video compression systems that work both intra-frame, and inter-frame. Intra-frame is like JPEG (or like DV for that matter). Each frame of the video is treated as its own independent entity and compressed as such (lossily, throwing away some low level information). Inter-frame adds to this by comparing between different frames and making use of their similarities.

One way of thinking about this is that system will compress the first frame of the picture independently, and then for the next frame it will merely hold information about how that frame differs from the first frame, additionally compressed. The third frame could hold information about how it differs from the first or second. Indeed, this process could continue for 150,000 frames for the entire length of the movie.

In practice, though, in fairly short order there would be so much drift away from what should be that the picture quality would become dreadful. So what happens is that there are independently compressed frames placed frequently through the movie and the other frames refer to these (both forwards and backwards).

With DVDs, these ‘anchor’ frames or ‘I’ frames were typically every 12th frame, but sometimes every 15th. Sometimes in addition to being regularly spaced, additional ones were placed at hard scene cuts. That made sense: if the entire picture has changed, what’s the point of recording differences? You might as well record the original picture, which is after all the differences between it and nothing.

But that was fairly rare. Most DVDs seem to just use a 1:12 or 1:15 regular meter for ‘I’ frames.

Blu-ray discs seem to be more variable. I have not conducted a formal study, so the next remark is merely my impression so far, and may be subject to confirmation bias. However, with VC1 discs in particular I regularly see ‘I’ frames not at hard scene cuts, but at the next frame after that. That makes sense given that these compression systems can compare ahead, as well as behind.

Now in a previous post I talked about the different number of ‘I’ frames in the first two Lord of the Rings movies. I didn’t have a record of how many there were in the first one, but I do know for certain that there were between 12,000 and 12,999, and I seem to remember that it was not near either of those extremes, so I’m going to assume that there were 12,500 (rather than rip all the frames again, which takes all night).

I now have the precise count for the second and third installments. So let’s check them out:

Movie Run time
# of ‘I’ frames ‘I’ frames:total frames
The Lord of the Rings: The Fellowship of the Ring 2:58:24 12,188 1:21.1
The Lord of the Rings: The Two Towers 2:59:24 19,721 1:13.1
The Lord of the Rings: The Return of the King 3:21:01 13,479 1:21.5

So what affect does the proportion of ‘I’ to all frames have on picture quality? On the evidence so far, within a reasonable range, none. According to the Blu-ray.com review of this trilogy, the picture quality in the above order is mediocre, hugely better, slightly better again. No correlation to the above figures at all.

Update (10:34am): Two corrections above. First, I made a dumb mistake, the reason for which I’m not even going to attempt to explain since it seems even dumber than the mistake. But anyway, I added an extra thousand to the number of ‘I’ frames in The Two Towers, bringing it to 20,721 when it should have been 19,721. I have now changed this in the table above and recalculated the ratio.

Second, Chris (aka CinemaSquid) in comments points out that his wonderful utility program, BDInfo, actually counts the number of ‘I’, ‘P’ and ‘B’ frames in the video stream, something which I had quite forgotten. So instead of ripping all the ‘I’ frames from a movie in order to count them, I can simply scan it with BDInfo! Which means, it takes about an hour instead of six or seven. So I’ve gotten a precise count for The Fellowship of the Ring, put that in the table and recalculated the ratio for that one as well.

The new figures don’t change the conclusion.

(As a test — since I like to recheck things as much as possible — I shall now rescan The Return of the King in BDInfo and see if it reports 13,479 ‘I’ frames.)

Update 2 (11:54am): Scan completed. BDInfo reports 13,480 ‘I’ frames. When one technique gives a result that differs from another by less than 0.01%, that’ll do for me.

Update 2 (1:28pm): Also did The Two Towers. Same result as shown in the table.

This entry was posted in Blu-ray, Codecs, Compression, How Things Work, Video. Bookmark the permalink.

4 Responses to ‘I’ frame rate

Leave a Reply

Your email address will not be published. Required fields are marked *