Feature request — IDR-only keyframe navigation for HEVC editing

Started by nonlinearize, August 07, 2026, 03:12:12 AM

Previous topic - Next topic

nonlinearize


However, I've been using Avidemux to edit HEVC (H.265) sources and ran into the "non-IDR recovery points" warning when cutting at what the keyframe navigation buttons identified as a keyframe. As I understand it, HEVC allows CRA/recovery-point frames that look like keyframes but aren't true IDR frames, and Avidemux's next/previous-keyframe navigation doesn't currently distinguish between the two — so it's easy to land on a non-IDR point without realizing it, risking corrupted frame reordering in copy-mode cuts.

It would be a great addition to have an option (even a toggle) for keyframe navigation to jump specifically to true IDR frames for HEVC sources, rather than any I-frame-type frame. This would make it much easier to choose safe, reliably cuttable points without needing to cross-reference external tools first.

Thanks for all the work on Avidemux — it's been a genuinely useful tool for years. Avidemux rules!


eumagga0x2a

I am not optimistic about a chance to get this implemented as FFmpeg libraries libavcodec and libavutil Avidemux uses to decode HEVC (and most other video codecs) don't pass the distinction keyframe vs IDR to decoded pictures.

The "non-IDR recovery points" warning is just a warning to reflect poor guesswork in libavcodec when dealing with POC discontinuities, i.e. if the target video player is not FFmpeg-based, the chances are high that it will play such streams just fine.

The presence of IDR frames in an open-GOP H.264 or HEVC stream is not guaranteed at all, and even if present, they may be very far apart (minutes or even hours apart).

Calling in the script console

ed = Editor()
for frame in range(0, 1000):
    ed.printFrameInfo(frame)

will dump raw info from the demuxer about the first 1000 (replace 0 and 1000 with different integer values if desired) frames to Avidemux log (admlog.txt in %localappdata%\avidemux on Windows). Search the log for occurences of the "Flags 0110" string that identifies an IDR frame and for "Flags 0010" that identifies merely a keyframe to get an impression of the frequency of IDR frames in the stream.