IDR Intervals

by kmmtinc
0 comment

What is an IDR interval, and why is it sometimes “too large”?
Sometimes when adding a video clip in KineMaster, you may see a warning that the “IDR interval” is too large.  In most cases, you can ignore this warning without any serious problems. It can be helpful to understand what the IDR interval is. It’s good to know what kind of problems happen with large an IDR intervals, and what you can do to solve this issue.

With screen recordings KineMaster may often not display this warning. However, the consequences will be the same. Are you having problems editing a screen recordings from iOS’s built-in screen recorder or any 3rd party app? The solution to fixing IDR issues will apply to you, too.

What do I do if the IDR interval is too big and it’s causing editing problems?
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. Be sure to export this clip at the exact same settings it was recorded with, at the highest possible bitrate.

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 show where the IDR frames are.

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.  Video recorded in other apps, devices, or downloaded from the internet may have different IDR intervals. 

What exactly is an IDR frame?
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.

Sometimes you want to start playing from someplace that’s not the beginning of the video. To do that, 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.

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. This includes when using video layers. But over 4 seconds, things get dicey. It 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.

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

0 comment

You may also like

Community.KineMaster uses cookies to improve your viewing experience. You can opt-out if you wish. Learn more. Accept Read More