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

**URL:** <https://boards.straightdope.com/t/video-dvd-frames-how-can-you-start-in-the-middle/211025>\
**Category:** Factual Questions\
**Created:** [November 2, 2003, 8:36pm UTC](https://boards.straightdope.com/t/video-dvd-frames-how-can-you-start-in-the-middle/211025 "2003-11-02T20:36:05Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![TJdude825](https://avatars.discourse-cdn.com/v4/letter/t/dec6dc/32.png) [@TJdude825](https://boards.straightdope.com/u/TJdude825)\
**Post date:** [November 2, 2003, 8:36pm UTC](https://boards.straightdope.com/t/video-dvd-frames-how-can-you-start-in-the-middle/211025/1 "2003-11-02T20:36:05Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Herge](https://avatars.discourse-cdn.com/v4/letter/h/a183cd/32.png) [@Herge](https://boards.straightdope.com/u/Herge)\
**Post date:** [November 2, 2003, 8:46pm UTC](https://boards.straightdope.com/t/video-dvd-frames-how-can-you-start-in-the-middle/211025/2 "2003-11-02T20:46:26Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Musicat](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/musicat/32/20189_2.png) [@Musicat](https://boards.straightdope.com/u/Musicat)\
**Post date:** [November 2, 2003, 8:52pm UTC](https://boards.straightdope.com/t/video-dvd-frames-how-can-you-start-in-the-middle/211025/3 "2003-11-02T20:52:27Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![TJdude825](https://avatars.discourse-cdn.com/v4/letter/t/dec6dc/32.png) [@TJdude825](https://boards.straightdope.com/u/TJdude825)\
**Post date:** [November 2, 2003, 10:29pm UTC](https://boards.straightdope.com/t/video-dvd-frames-how-can-you-start-in-the-middle/211025/4 "2003-11-02T22:29:37Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Kinthalis](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/kinthalis/32/16084_2.png) [@Kinthalis](https://boards.straightdope.com/u/Kinthalis)\
**Post date:** [November 2, 2003, 11:48pm UTC](https://boards.straightdope.com/t/video-dvd-frames-how-can-you-start-in-the-middle/211025/5 "2003-11-02T23:48:30Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Kinthalis](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/kinthalis/32/16084_2.png) [@Kinthalis](https://boards.straightdope.com/u/Kinthalis)\
**Post date:** [November 3, 2003, 12:10am UTC](https://boards.straightdope.com/t/video-dvd-frames-how-can-you-start-in-the-middle/211025/6 "2003-11-03T00:10:31Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![zztzed](https://avatars.discourse-cdn.com/v4/letter/z/eb9ed0/32.png) [@zztzed](https://boards.straightdope.com/u/zztzed)\
**Post date:** [November 3, 2003, 1:12am UTC](https://boards.straightdope.com/t/video-dvd-frames-how-can-you-start-in-the-middle/211025/7 "2003-11-03T01:12:27Z")

</div>

> [@](#):
>
> \*Originally posted by Kinthalis \*  
> \*\*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.

---

<div class="post-metadata">

**Author:** ![sailor](https://avatars.discourse-cdn.com/v4/letter/s/a587f6/32.png) [@sailor](https://boards.straightdope.com/u/sailor)\
**Post date:** [November 3, 2003, 6:35am UTC](https://boards.straightdope.com/t/video-dvd-frames-how-can-you-start-in-the-middle/211025/8 "2003-11-03T06:35:50Z")

</div>

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.

> [@](#):
>
> [http://www.divx.com/support/divx/guide\_mac.php](http://www.divx.com/support/divx/guide_mac.php)
> 
> MPEG-4 Tools  
> B-frames/Bi-directional encoding  
> There are three types of frames that are possible within a DivX video stream. These frames are called “I-frames” (Intra), “P-frames” (Predicted) and “B-frames” (Bi-directional). Prior to DivX 5.0 the only frame types were I and P. I-frames are encoded only using information from within its own frame. It does not use any information from other frames (temporal compression). An I-frame is similar in concept to encoding a single frame using JPEG. P-frames (Predicted) are forward predicted and may refer to either an I-frame or P-frame. They are encoded from the frame that precedes it. In any video sequence a group of frames will have many of the same images. For example, if you were to watch a news anchorperson you’ll notice they barely move and the background would stay almost identical for every frame. (Remember that there are commonly up to 30 frames in a single second). So instead of encoding each one of those 30 frames independently as you would in an image file such as a JPEG you can exploit the redundancy of each frame by the use of P-frames. Essentially a P-frame is a future frame that determines where a block in the previous frame has moved to in it’s current P-frame. So instead of spatially encoding (JPEG) the frame the P-frame just says "Hey the block in the previous frame has moved to location (X,Y) which requires much less data then encoding each frame spatially. Essentially we transmit the difference between frames which is more efficient than transmitting the original I-frame.
> 
> DivX Pro 5.0 introduces the ability to also use “B-frames”. B-frames allow the DivX codec to predict frames from the future, choosing the best prediction match among 2 prediction frames instead of only one. B-frames are not only codec by using forward predicted frames but also from backward predicted frames which can be an I or P frame. Using B-frames reduces the amount of data needed to code a frame and improves quality more specifically in areas where moving objects reveal hidden areas.

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

---

<div class="post-metadata">

**Author:** ![sailor](https://avatars.discourse-cdn.com/v4/letter/s/a587f6/32.png) [@sailor](https://boards.straightdope.com/u/sailor)\
**Post date:** [November 3, 2003, 6:53am UTC](https://boards.straightdope.com/t/video-dvd-frames-how-can-you-start-in-the-middle/211025/9 "2003-11-03T06:53:15Z")

</div>

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.
