Answers.Body: <p>I can't say with authority, but it's likely that 'pos' is the byte offset into the file where the frame begins. IOW these aren't frame numbers. In the listing you show the sequence is monotonic, it just doesn't increase by single units. If it is byte offset, it wouldn't start at 0 because there are headers in the file before actual frame data.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-06-25T12:33:03.517Z
Answers.Text: that does seem to make sense . I was looking at the problem with my art hat and not my programmer hat .
Answers.UserDisplayName: James Andino
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-10-19T20:48:17.020Z
Answers.Text: https://ffmpeg.org/doxygen/3.2/ffplay_8c_source.html#l00160 supports this guess.
Answers.UserDisplayName: Camille Goudeseune
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-06-25T11:45:28.230Z
Answers.LastActivityDate: 2014-06-25T11:45:28.230Z
Answers.UserDisplayName: Jim Mack
Body: <p>Sample output </p>
  
  <pre><code>[Parsed_showinfo_0 @ 0x7f9a3b600000] n:0 pts:0 pts_time:0 pos:194408 fmt:yuvj420p sar:0/1 s:1920x1080 i:P iskey:1 type:I checksum:072007CF plane_checksum:[AAFB805D 153EE2B8 65C9A49C]
  [Parsed_showinfo_0 @ 0x7f9a3b600000] n:1 pts:1001 pts_time:0.0417083 pos:366248 fmt:yuvj420p sar:0/1 s:1920x1080 i:P iskey:0 type:P checksum:C9D358B5 plane_checksum:[54D0A047 7C40CC7B 60D3EBD5]
  [Parsed_showinfo_0 @ 0x7f9a3b600000] n:2 pts:2002 pts_time:0.0834167 pos:594116 fmt:yuvj420p sar:0/1 s:1920x1080 i:P iskey:0 type:P checksum:A05675B2 plane_checksum:[556FF30D 8CD9462B 0F3E3C6B]
  [Parsed_showinfo_0 @ 0x7f9a3b600000] n:3 pts:3003 pts_time:0.125125 pos:779876 fmt:yuvj420p sar:0/1 s:1920x1080 i:P iskey:0 type:P checksum:B17CC362 plane_checksum:[AE090A39 337190E2 B6E52847]
  [Parsed_showinfo_0 @ 0x7f9a3b600000] n:4 pts:4004 pts_time:0.166833 pos:952520 fmt:yuvj420p sar:0/1 s:1920x1080 i:P iskey:0 type:P checksum:F7C5D531 plane_checksum:[EA3F8FAF E109630D A582E266]
  [Parsed_showinfo_0 @ 0x7f9a3b600000] n:5 pts:5005 pts_time:0.208542 pos:1107392 fmt:yuvj420p sar:0/1 s:1920x1080 i:P iskey:0 type:P checksum:CF48BDB1 plane_checksum:[C87B1176 03581F2B 70EC8D10]
  </code></pre>
  
  <p>The documents for the showinfo filter define position as</p>
  
  <blockquote>
    <p>‘pos’ The position of the frame in the input stream, or -1 if this
    information is unavailable and/or meaningless (for example in case of
    synthetic video).</p>
  </blockquote>
  
  <p>Why does position not start at 0 ?
  Why are the positions not sequential 1,2,3,4 etc </p>
  
  <p>When I decompile videos into frames I am trying to label the resulting frames in an order that represents their position in the video to allow me to do things like take different sections of the video at different times but maintain their natural ordering . </p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-02-25T00:01:35.917Z
Comments.Text: The first field (`n`) is the frame number counter.
Comments.UserDisplayName: Peter Cordes
Tags: <ffmpeg>
Title: FFmpeg clarification "position of frame"
UserDisplayName: James Andino
ThreadText: # FFmpeg clarification "position of frame"
  
  (Asked by: username_0 on 2014-06-25)
  
  Sample output
  
  ```
  [Parsed_showinfo_0 @ 0x7f9a3b600000] n:0 pts:0 pts_time:0 pos:194408 fmt:yuvj420p sar:0/1 s:1920x1080 i:P iskey:1 type:I checksum:072007CF plane_checksum:[AAFB805D 153EE2B8 65C9A49C]
  [Parsed_showinfo_0 @ 0x7f9a3b600000] n:1 pts:1001 pts_time:0.0417083 pos:366248 fmt:yuvj420p sar:0/1 s:1920x1080 i:P iskey:0 type:P checksum:C9D358B5 plane_checksum:[54D0A047 7C40CC7B 60D3EBD5]
  [Parsed_showinfo_0 @ 0x7f9a3b600000] n:2 pts:2002 pts_time:0.0834167 pos:594116 fmt:yuvj420p sar:0/1 s:1920x1080 i:P iskey:0 type:P checksum:A05675B2 plane_checksum:[556FF30D 8CD9462B 0F3E3C6B]
  [Parsed_showinfo_0 @ 0x7f9a3b600000] n:3 pts:3003 pts_time:0.125125 pos:779876 fmt:yuvj420p sar:0/1 s:1920x1080 i:P iskey:0 type:P checksum:B17CC362 plane_checksum:[AE090A39 337190E2 B6E52847]
  [Parsed_showinfo_0 @ 0x7f9a3b600000] n:4 pts:4004 pts_time:0.166833 pos:952520 fmt:yuvj420p sar:0/1 s:1920x1080 i:P iskey:0 type:P checksum:F7C5D531 plane_checksum:[EA3F8FAF E109630D A582E266]
  [Parsed_showinfo_0 @ 0x7f9a3b600000] n:5 pts:5005 pts_time:0.208542 pos:1107392 fmt:yuvj420p sar:0/1 s:1920x1080 i:P iskey:0 type:P checksum:CF48BDB1 plane_checksum:[C87B1176 03581F2B 70EC8D10]
  
  ```
  
  The documents for the showinfo filter define position as
  
  > ‘pos’ The position of the frame in the input stream, or -1 if this
  > information is unavailable and/or meaningless (for example in case of
  > synthetic video).
  
  Why does position not start at 0 ?
  Why are the positions not sequential 1,2,3,4 etc
  
  When I decompile videos into frames I am trying to label the resulting frames in an order that represents their position in the video to allow me to do things like take different sections of the video at different times but maintain their natural ordering .
  
  **Tags:** ffmpeg
  
  > **Comments:**
  > **username_1**: The first field (`n`) is the frame number counter.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2014-06-25. Score: 4
  
  I can't say with authority, but it's likely that 'pos' is the byte offset into the file where the frame begins. IOW these aren't frame numbers. In the listing you show the sequence is monotonic, it just doesn't increase by single units. If it is byte offset, it wouldn't start at 0 because there are headers in the file before actual frame data.
  
  > **Comments:**
  > **username_0**: that does seem to make sense . I was looking at the problem with my art hat and not my programmer hat .  
  > **username_3**: https://ffmpeg.org/doxygen/3.2/ffplay_8c_source.html#l00160 supports this guess.  
  
  ---
  
  