<p>Videos usually are described by a set of parameters including: <code>bit rate</code>, <code>frame rate</code>, <code>width &amp; height</code>.</p>

<p>But I came to realize that there are more parameters including <code>B-frames</code> and <code>I frames</code> (or I guess they are the KEY-FRAMES).</p>

<p>Now I noticed that they exist when I was working on a custom video capturing technique in which I have the ability to control how often they appear in terms of seconds, so they are either 1 sec away from each other or 2 sec away or 3.....</p>

<p>But some weird things happened when I tried to change the appearance of these frames.</p>

<p><strong>First case:</strong></p>

<p>When I encoded a video with (2 sec or 1 between I Frames) I got a video that doesn't seek well.</p>

<p>Now If I try to merge the encoded video with an equal length audio file for some reason when I seek forward or backward I see black screen before I seek to the requested frame.</p>

<p><strong>Second case:</strong></p>

<p>When I encoded a video with (0 sec between I frames) I got a video that seeks fine, but for some reason the size increased.</p>

<p>Now if I try to merge the encoded video with audio of equal length I get a video mixed with audio that works well and seeks well with no black screen on seeking.</p>

<p><strong>Question:</strong></p>

<p>What are I frames?</p>

<p>Why do they affect seek behavior?</p>

<p>Why do they affect the merging of video with audio?</p>

<p>Why do they affect the size of the video?</p>

<p>Thanks.</p>

<video><keyframes>
Video: What are I-frames and why do they affect the size of the video?
database
# Video: What are I-frames and why do they affect the size of the video?

(Asked by: username_0 on 2018-05-17)

Videos usually are described by a set of parameters including: `bit rate`, `frame rate`, `width & height`.

But I came to realize that there are more parameters including `B-frames` and `I frames` (or I guess they are the KEY-FRAMES).

Now I noticed that they exist when I was working on a custom video capturing technique in which I have the ability to control how often they appear in terms of seconds, so they are either 1 sec away from each other or 2 sec away or 3.....

But some weird things happened when I tried to change the appearance of these frames.

**First case:**

When I encoded a video with (2 sec or 1 between I Frames) I got a video that doesn't seek well.

Now If I try to merge the encoded video with an equal length audio file for some reason when I seek forward or backward I see black screen before I seek to the requested frame.

**Second case:**

When I encoded a video with (0 sec between I frames) I got a video that seeks fine, but for some reason the size increased.

Now if I try to merge the encoded video with audio of equal length I get a video mixed with audio that works well and seeks well with no black screen on seeking.

**Question:**

What are I frames?

Why do they affect seek behavior?

Why do they affect the merging of video with audio?

Why do they affect the size of the video?

Thanks.

**Tags:** video, keyframes


---

## 0 answers

