‘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
(h:m:s)
# 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

  1. Chris says:

    FYI: In BDInfo, you can get a count of the different frame types using the “Video Frame Types Count” chart type which produces a pie-chart with the count and proportion of I-, P- and B-frames. VC-1 has an additional “BI-frame” type which BDInfo lumps in with the B-frames for convenience.

    There is definitely some variability to the proportion of frame types as you said. One recent example that springs to mind is the US VC-1 encode of the animated film “9” which has an abnormally large proportion of I-frames. It has 14,520 I-frames for its rather short runtime of 1:19:24 – about a 1:8 ratio. Here is the chart for this:
    http://media.cinemasquid.com/blu-ray/titles/9/11673/video-frame-type-count.png

  2. Rsaeire says:

    I’ve read both you, Scott, and Chris mention I frames either here on other sites/forums and I can see that you both prefer using these frames for your screenshots; I assume given that they contain more data/bits than either P or B frames. My question is this, do you not find this quite limiting if you’re relying only on I frames for your screenshots, since they’re available so sparsely in a movie?

  3. Stephen Dawson says:

    Hi Rsaeire. I use ‘I’ frames mainly because my technique for extracting frames from Blu-ray discs works this way. More valid results would be to use a mixture of frame types, but life is too short. Even this doesn’t cover picture quality issues related to movement.

    Although a typicaly disc might have only one or two ‘I’ frames per second, that typically doesn’t prove especially limiting. The harder part is to find an exactly matching DVD frame. Generally, the less movement the sharper the picture. But then without relationships changing signficantly within the frame in a short period, identifying matching frames is hard.

  4. Rsaeire says:

    Thank you for the reply.

    I agree that finding corresponding DVD frames to match an existing Blu-ray can be hard, but I generally try to use the last frame before a camera angle change, as this makes matching frames a lot easier.

    Also, I have been reading your site on and off for quite some time and I’d like to say thank you for all the helpful information you’ve provided; I especially like your in-depth video related articles, e.g. “What’s the point of progressive scan PAL video?”, “What are Superbit DVDs?”, “What’s anamorphic widescreen video?”, etc.

Leave a Reply

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