Depending upon your encoding tool, you may have access to a checkbox or number box that controls something called IDR frames. What are these creatures and what is their significance? More imporantantly, what’s the optimal setting? Well, let’s just say that if you’re seeing anything like the random blockiness in the picture below when you drag the playhead back and forth in the video window, you’re probably using the wrong value.

IDR-ugly.jpg

Read on and I’ll tell you why and identify the correct value.

What’s An IDR Frame?

Here’s the definition of IDR frame from Iain E. G. Richardson’s excellent H.264 and MPEG-4 Video Compression book.

An encoder sends an IDR (Instantaneous Decoder Refresh) coded picture (made up of I- or SI-slices) to clear the contents of the reference picture buffer. On receiving an IDR coded picture, the decoder marks all pictures in the reference buffer as ‘unused for reference’. All subsequent transmitted slices can be decoded without reference to any frame decoded prior to the IDR picture. The first picture in a coded video sequence is always an IDR picture.

For less-technical audiences, here’s another definition from a Harmonic White Paper entitled Advanced H.264 Encoding with Carbon Coder.

An IDR frame is a special type of I-frame in H.264. An IDR frame specifies that no frame after the IDR frame can reference any frame before it. This makes seeking the H.264 file easier and more responsive in the player.

There’s some confusion in the marketplace about the difference between I-frames and IDR frames. The short answer is that every IDR frame is an I-frame, but not vice versa, so there can be I-frames that aren’t IDR frames. When you’re producing for streaming, that’s when you can run into problems.

Simply stated, if all I-frames are not IDR frames, you can see the distortion shown in the figure above if you drag back and forth in the file. As an example, I produced the video file immediately below with no IDR frames. If you drag back and forth enough times, you’ll see distortion like that shown in the frame grab above.

No-IDR

Sign up for our newsletter
We hate spam as much as you do!