Help Center

What is an IDR interval, and why is it sometimes "too large"?



When adding a video clip to a project in KineMaster, you may occasionally see a warning that the "IDR interval" is too large.  In most cases, you can ignore this warning without any serious problems.  In this article, we will explain what the IDR interval is (it's quite technical, so bear with us), what kind of problems can be caused by having too large an IDR interval, and (in the rare case that you experience such problems) what you can do to solve them.

What is the IDR Interval?

In KineMaster, the IDR interval is the average time between IDR frames in a video clip.  (Want to know exactly what an IDR frame is?  See below for more details.)

What do I do when I see this message?

In a nutshell: If you don't experience any inconvenience when editing, you can ignore this message.

What kind of problems can it cause?

For exporting and sharing a video, you will never have any problems from an IDR interval that's too large.

There are two issues you might experience while editing, however:

  • You may have problems trimming or splitting a clip.  On some devices and at certain resolutions, clips can only be trimmed or split within 4 seconds of an IDR frame, so you might find some places in the video where the "split" or "trim" options are not available (they appear dimmed in the app UI and cannot be selected).

  • When previewing the video (before sharing it), it is possible that clips without enough IDR frames may not have good performance when previewing (you may see the previous clip's final frame "frozen" briefly while the clip without enough IDR frames is being prepared for preview, or you may see some "skipping" during playback.  This does not affect the final result when sharing, however.

If you don't experience either of these issues, you may safely ignore the IDR frame warning message.

How big should the IDR interval be?

For the best editing experience, the average IDR interval should be 4 seconds or less.  Most phones record video with an IDR interval of 1 second; well within KineMaster's 4-second recommended limit.  However, video recorded in other apps, on other devices, or downloaded from the internet may have different IDR intervals. 

How do I check the IDR frame interval?

If you select a clip to trim it, you'll notice some small yellow tick marks at the top of the clip (they look like part of the selection border). Those tick marks indicate where the IDR frames are.

What do I do if the IDR interval is too big and it's causing editing problems?

If you have the option of re-encoding the video from the original source (for example, if you created it in another app and can change the encoding settings), the best way is to adjust the settings.  In most apps, there are two related settings:  I-frame interval (which should be set to about 1 second) and usually an option to make every I frame an IDR frame, which should be turned on if it's available. 

If that's not an option (if you don't have the ability to re-encode from source material) there is one other work around.  Before trying this work-around, see if you can edit the clip normally. If you don't have any problems editing it, you can ignore the warning. (Again, it doesn't affect export).  If the problem is so severe that you cannot comfortably edit without solving the IDR frame problem, try this:  Create an empty KineMaster project, add the problematic clip to it, and export the project. The exported clip will have a normal IDR interval and can be edited without any difficulty.  Of course, the video quality will be reduced because it's been re-encoded twice (so you might want to set the bit rate higher to compensate).

What exactly is an IDR frame?

This has to do with how H.264 video is encoded. H.264 is one of the most common encodings currently used for video, especially on mobile devices.  Usually H.264 video is stored inside an .mp4, .mov or .3gp container.  You may also see it referred to as AVC or MPEG-4 AVC.

When encoding H.264 video, a given video frame can be stored in two different ways:
- As the difference (changes) from the another frame (usually the preceding frame, but not always)
- As a new fully encoded frame (IDR frame)

As you might guess, storing the difference from another frame takes a lot less space.

On the other hand, if you want to start playing from someplace that's not the beginning of the video, you need to start from a full frame (an IDR frame) and work forward to the point you want to play from.

The frequency of IDR frames is up to the encoder. Typically, for video recorded on your cell phone, IDR frames occur every 1~2 seconds (so every 30th or 60th frame is an IDR frame).

But as you can imagine, it's technically possible to have a single IDR frame at the beginning of a video. Imagine an hour-long video clip with a single IDR frame at the beginning. If you want to play from the 30-minute point, all the video up to that point has to be decoded. Let's say the decoder can decode video at 8x the playback rate (some can only do 1x, it depends on a lot of factors). At 8x, that means it's going to take 4 minutes to start playing video. You can sometimes see this in PC players: You try to seek to the middle of a video clip, and it takes a really long time to start playing.

From testing, we've determined that nearly all devices can decode video quickly enough to support realtime preview of video with IDR frame intervals as high as 4 seconds (even when using video layers). But over 4 seconds, things get dicey. It really depends on the video resolution and the device. Some high-end devices can handle 1080p content with an IDR interval of 6 or even 10 seconds.

But to be safe, if the IDR interval is over 4 seconds, we show a warning to let you know there may be some inconveniences while editing it.



Have more questions? Submit a request