title: Extract keyframe info and byte offset from video ffmpeg/ffprobe
body: <p>How can I retrieve each keyframe information from the video using ffmpeg/ffprobe.</p>
  
  <p>I have read a lot stackoverflow questions and answers regarding this but the command only returns the keyframe duration.</p>
  
  <p>I have used this command to extract the keyframe duration</p>
  
  <pre><code>ffprobe -loglevel error -skip_frame nokey -select_streams v:0 -show_entries frame=pkt_pts_time -of csv "/var/www/html/YoutubeTesting/1080p.mp4"
  </code></pre>
  
  <p><strong>But the info which I need from each keyframe are</strong></p>
  
  <p>1- Byte offset from video byte size</p>
  
  <p>2- Duration of keyframe</p>
  
  <p>Thanks!</p>