I-Frame and I-Frame Interval are two terms that create confusion when doing the security camera system settings. What are these terms and what do they mean in the CCTV context?
To understand these terms, you need to know how video frames are created. At their basic level, a video clip is made up of a series of frames. Usually denoted as FPS (frames per second), each frame is a still image that when played in sequence creates a moving picture.
A video that has 30 frames per second, means that there are 30 “still images” that will play for every second of the video. When these images/frames are played sequentially and fast, they create what we call video.
If we take 30 consecutive frames and spread them out they will see a lot of elements that are pretty much identical.
Let’s take an example, someone is talking while standing in front of a wall. It’s unlikely that the frame’s information regarding that wall will change. As a result, a lot of these 30 frames will be wasted bandwidth used to transmit information that something hasn’t changed at all (in our case, the wall).
Obviously, there was developed a video compression technique that divides frames into blocks and then looks for redundancies between blocks. So, if the wall in our example is not going to change, why not just keep using the same blocks in subsequent frames to reduce the space or bandwidth? Here’s where comes into play the so-called I-frame and I-frame interval.
What is I-Frame in Security Camera Systems?
The I-frame is the full frame of the image in a video and is coded without reference to other frames. Subsequent frames (called delta frames), only contain the information that has changed.
The video compression is achieved by comparing frames following the I-frame (the keyframe) and only sending the changes until the next I-frame generated. Many security systems allow the user to select how often this I-frame is generated.
In other words, the I-frame is the frame that is used as the primary reference point which is compared to the other frames in the stream. This technique is meant to reduce bandwidth by only sending a full image initial (I-frame) once, then partial frames (called p-frames) which contain only the changes in the scene since the initial I-frame.
This method allows for frames that are much smaller in size because they are only pulling the changes in reference to the original I-frame. By doing this, the system can save space and bandwidth.
What is I-Frame Interval in Security CCTV Systems?
The number of interval frames between two I-frames. As we explained above, I-frames (also called keyframes) are used to record information about the entire image. The larger the value of the I-frame interval, the smaller the storage space occupied by the compressed video.
When you select H.264+ or H.265+ on the camera’s encoding setting, the I-frame interval setting is greyed out because it is set and managed automatically and you can’t change it. In other codecs such as H.264H or H.265, you can actually modify the value of the I-frame interval.
Most manufacturers today will allow you to control the I-frame interval which by the way it’s named differently depending on the manufacturer. By default, most security systems use 1 I-frame every 30 images. You can lower this down and there are some tradeoffs in doing so. Keep in mind these tips when modifying the I-frame or the I-frame interval of your camera system:
- Increasing the number of I-frames improves the video quality, but uses more bandwidth. You’ll have fewer recorded days on your camera system.
- The lower the number on the I-frame interval, the smaller the interval between I-frames (the keyframes), and the better the overall quality. But, it will use more bandwidth and reduce and take more space on the hard drive.
Most of the time there’s no need to change the default value of the I-frame and the I-frame interval. However, if you think that your picture quality is not good enough, then you can access the encoding settings and play with these settings until you’re happy with the result. Below we’ve listed the optimized I-frame settings for a few manufacturers.
Recommended I-frame interval settings for Hikvision and their OEMs. The I-frame interval value is recommended to be 50. However, you can try 30 or even 60 and see if you’re okay with the picture.
Recommended I-frame interval settings for Dahua and their OEMs is 60. You can try higher as well to check if you notice any difference. Most likely, there’s no need to modify the default values.
Recommended I-frame interval settings for Axis camera systems. In this case, they call it GOP length which stands for “group of pictures”.Recommended I-frame interval settings for Foscam cameras and their systems. Here it is called “Key Frame Interval”. As we mentioned, the term varies between manufacturers.
The I-frame interval values recommended above offer a stable stream and a good picture quality. However, you can modify them accordingly to match your situation. Keep in mind, the more I-frames and the shorter the I-frame intervals the more bandwidth will be used and less space on the hard drive. You may need to keep it balanced.
From our experience, it’s okay if you use the default values that the camera comes with. The difference varies on the light conditions and sometimes can be minuscule. If necessary, increase the I-frame value only on cameras that are deemed important on your setup.