Body: <p>It's a mov file. We use FFmpeg/FFprobe to process this file. There is a frame which is shown 'keyframe' (flags=K) in this file, but we found this frame is a non-IDR frame (only is I frame) using 264 stream analysis tool. Is it a bug of ffmpeg? How could we ensure the IDR frame? </p>
  
  <p>3450 is that frame.
  <a href="https://i.sstatic.net/hmAGB.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/hmAGB.png" alt="enter image description here"></a>
  <a href="https://i.sstatic.net/R21Bj.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/R21Bj.jpg" alt="enter image description here"></a></p>
  
  <p>This is a brief info from ffprobe.</p>
  
  <blockquote>
    <p><code>Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '***.mov':
      Metadata:
        major_brand     : qt
        minor_version   : 537199360
        compatible_brands: qt
        creation_time   : 2015-08-05 14:23:07
      Duration: 00:07:36.69, start: 0.000000, bitrate: 6400 kb/s
        Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080p [SAR 1:1 DAR 16:9], 6009 kb/s, 29.97 fps (default)
        Metadata:
          handler_name    : Apple Alias Data Handler
          encoder         : H.264
        Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 192 kb/s (default)
        Metadata:
          handler_name    : Apple Alias Data Handler
        Stream #0:2(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 192 kb/s (default)
        Metadata:
          handler_name    : Apple Alias Data Handler</code></p>
  </blockquote>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-08-26T09:48:18.133Z
Comments.Text: What did the analyser report? It could be a recovery point. Can you share the file?
Comments.UserDisplayName: Gyan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-08-26T09:56:07.490Z
Comments.Text: Hi, I add two pictures from stream analyser.
Comments.UserDisplayName: Chen Liu
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-08-26T15:21:00.507Z
Comments.Text: Can you share the file?
Comments.UserDisplayName: Gyan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-08-26T15:38:40.690Z
Comments.Text: What do you mean by “ensure” the frame? To what end? Why is this a problem? Can you just parse the nal header?
Comments.UserDisplayName: SlimSCSI
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-08-29T07:14:31.127Z
Comments.Text: Hi, SlimSCSI. Because I'd like to use '-ss' parameter. FFmpeg seeks to this frame which is I frame not IDR frame, and try to decode from this frame. But obviously, FFmpeg can't decode from this frame.
Comments.UserDisplayName: Chen Liu
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-08-29T07:16:53.353Z
Comments.Text: Hi, Gyan. Sorry, I can't share this file because of license.
Comments.UserDisplayName: Chen Liu
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-09-07T12:22:58.220Z
Comments.Text: It is probably a bug, I have reported the issue and found the cause:
  https://trac.ffmpeg.org/ticket/9523
Comments.UserDisplayName: TurboLed
Tags: <ffmpeg><keyframes>
Title: FFmpeg identify non-IDR frame (I frame) as keyframe
UserDisplayName: Chen Liu
ThreadText: # FFmpeg identify non-IDR frame (I frame) as keyframe
  
  (Asked by: username_0 on 2019-08-26)
  
  It's a mov file. We use FFmpeg/FFprobe to process this file. There is a frame which is shown 'keyframe' (flags=K) in this file, but we found this frame is a non-IDR frame (only is I frame) using 264 stream analysis tool. Is it a bug of ffmpeg? How could we ensure the IDR frame?
  
  3450 is that frame.
  [![enter image description here](https://i.sstatic.net/hmAGB.png)](https://i.sstatic.net/hmAGB.png)
  [![enter image description here](https://i.sstatic.net/R21Bj.jpg)](https://i.sstatic.net/R21Bj.jpg)
  
  This is a brief info from ffprobe.
  
  > `Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '***.mov':
  > Metadata:
  > major_brand : qt
  > minor_version : 537199360
  > compatible_brands: qt
  > creation_time : 2015-08-05 14:23:07
  > Duration: 00:07:36.69, start: 0.000000, bitrate: 6400 kb/s
  > Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080p [SAR 1:1 DAR 16:9], 6009 kb/s, 29.97 fps (default)
  > Metadata:
  > handler_name : Apple Alias Data Handler
  > encoder : H.264
  > Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 192 kb/s (default)
  > Metadata:
  > handler_name : Apple Alias Data Handler
  > Stream #0:2(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 192 kb/s (default)
  > Metadata:
  > handler_name : Apple Alias Data Handler`
  
  **Tags:** ffmpeg, keyframes
  
  > **Comments:**
  > **username_1**: What did the analyser report? It could be a recovery point. Can you share the file?  
  > **username_0**: Hi, I add two pictures from stream analyser.  
  > **username_1**: Can you share the file?  
  > **username_2**: What do you mean by “ensure” the frame? To what end? Why is this a problem? Can you just parse the nal header?  
  > **username_0**: Hi, username_2. Because I'd like to use '-ss' parameter. FFmpeg seeks to this frame which is I frame not IDR frame, and try to decode from this frame. But obviously, FFmpeg can't decode from this frame.  
  > **username_0**: Hi, username_1. Sorry, I can't share this file because of license.  
  > **username_3**: It is probably a bug, I have reported the issue and found the cause: https://trac.ffmpeg.org/ticket/9523  
  
  ---
  
  ## 0 answers
  
  