Video/DVD frames: How can you start in the middle?

From what I understand, the first little bit of data on a DVD or videotape tells the player what the first frame looks like. For every frame after the first one, it just tells the player what’s different from the previous frame, because usually two consecutive frames are nearly identical, so this saves a lot of space on the disc.

If this is right, then how can I start in the middle of a scene? Wouldn’t the player see the frame I want to start at (let’s say it’s the 1,000th frame) and say, “Okay, so it’s the same as frame 999, except for the pixels indicated. But what’s 999 look like? Well, it’s just like frame 998, except…” and so on all the way back to frame 1? In other words, just to get one frame a few minutes into the movie, it would have to scan the thousands of frames leading up to it, which I imagine would be fairly time-consuming, even on a relatively fast player.

I suspect this is solved by periodically including data for an entire frame, but if this is right, how often do they put in a whole frame? At the beginning of a scene, or at some arbitrary interval, like every 10 seconds? Or, does the machine that encodes the DVD notice that two consecutive frames are very different, (i.e. when it switches to a different angle) and decide that it’s not worth it to use the normal method since nearly a whole frame is being encoded anyway?

Incidentally, is this also why “rewinding” is kinda choppy compared to “fast forwarding,” since it’s trying to calculate frames in the opposite way from how they intended it to be viewed?

I don’t have an answer, but I just wanted to say thats an excellent question, and well written. I’ve just learned from reading your question how a DVD stores film - something I’ve been curious about!

After a few interpoplated frames, one entire new frame’s info is stored; subsequent frames use that as a reference. I imagine someone will be along soon to tell use just how many frames that is or can be.

If you want to start in the “middle,” all the software has to do is back up a few partial frames until it finds a full one. That doesn’t sound too difficult, does it?

In general, I suppose that would work, but what if (hypothetically) the film is completely stopped for a long period of time? Have you seen Big Trouble? IIRC, there’s a few “freeze-frames” like this but they only last a couple seconds. Anyway, hypothetically, that system wouldn’t always work, right? Or am I missing something else?

These frames are called key-frames. They are spread through out a video clip and are used as reference points for subsequent frames.

How often are they included? That depends on the format of the video. Taking Divx for example, one key frame is inserted around every 300 frames by default, but you can change this to your particular needs.

These frames are called key-frames. They are spread through out a video clip and are used as reference points for subsequent frames.

How often are they included? That depends on the format of the video. Taking Divx for example, one key frame is inserted around every 300 frames by default, but you can change this to your particular needs.

Additionally, on professionally-mastered DVDs, the compression is usually tweaked by hand, with more I-frames used on high-action scenes (to reduce artifacts) and fewer I-frames used on slower scenes to save space.

Video tape is an analog medium which does not use computer compression – although you could say it uses analog compression because, like jpg, it separates luminance and crominance and it gives more bandwidth to luminance to which the eye is more sensitive.

In MPG4 the frames are grouped together in blocks so that you cannot take a random frame independently and decode it, just like you cannot decode a pixel independently in a JPG photo. MPG4 derives frames from past and future frames and so frames are stored in different order than their natural order because you need the past and future key frames to develop the intermediate frames.

Compression is a fascinating topic. It is amazing how fast the state of this art has advanced in the last decade.

BTW, here’s a neat experiment: In Windows Media Player 2 start a DivX movie decompressing with the FFDSHOW codec. Click on File - Properties - advanced - ffdshow MPG4 decoder - Visualiztions - Show motion vectors. You can then see vectors in every tile which show the direction of movement.