Answers.Body: <p><code>pts_time=6.506000</code> means an absolute presentation timestamp of 6.506 seconds. It's relative presentation time depends on the start_time of the file, for which use <code>-show_entries format=start_time</code>.</p>
  
  <p>ffprobe seeks to keyframes, so it will seek to the nearest KF <em>at or before</em> the specified time and then print info for the stated number of packets.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-11T10:49:44.927Z
Answers.Text: IIRC, flags=k means key frame, right? I ran the command again with -read_intervals 10%+#6. There are key frames with pts_time=6.548, 6.571...Which is closer to 10 sec. or am I mistaken, flags=k doesn't mean key frame? I can upload the result of the command if you need.
Answers.UserDisplayName: helming
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-11T10:51:04.463Z
Answers.Text: Don't consider audio packets.
Answers.UserDisplayName: Gyan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-11T10:59:29.957Z
Answers.Text: You're right, those are audio packets. so is it safe to guess that pts_time represents seconds, regardless of tbn value?
Answers.UserDisplayName: helming
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-11T11:04:39.003Z
Answers.Text: Yes. pts_time is always in seconds; pts always in multiples of time base.
Answers.UserDisplayName: Gyan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-11T10:03:47.830Z
Answers.LastActivityDate: 2020-01-11T10:03:47.830Z
Answers.UserDisplayName: Gyan
Body: <p>I have been learning ffmepg for a couple of days.
  I'm struggling to understand how pts or dts works.</p>
  
  <p>This is the command I entered</p>
  
  <blockquote>
    <p>ffprobe -show_entries packet -read_intervals 10%+#3 Input</p>
  </blockquote>
  
  <pre><code>   Stream #0:0: Video: h264 (High 10), yuv420p10le(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
  Metadata:
    DURATION        : 00:02:00.203000000
  Stream #0:1: Audio: flac, 48000 Hz, stereo, s16 (default)
  Metadata:
    DURATION        : 00:02:00.062000000
  [PACKET]
  codec_type=video
  stream_index=0
  pts=6506
  pts_time=6.506000
  dts=N/A
  dts_time=N/A
  duration=41
  duration_time=0.041000
  convergence_duration=N/A
  convergence_duration_time=N/A
  size=205369
  pos=9510964
  flags=K_
  [/PACKET]
  </code></pre>
  
  <p>I guess duration_time 0.041000 means the frame last(show) for 0.041 second.</p>
  
  <p>I don't know how to interpret this 'pts_time' as normal time like minutes and seconds( e.g 1 min 3 second )</p>
  
  <p>I set the intervals 10%+=3, which means 3 packets after 10 seconds. I can't find the relation between 10 second and pts_time=6.506000</p>
  
Tags: <ffmpeg>
Title: Interpreting pts_time in FFmpeg
UserDisplayName: helming
ThreadText: # Interpreting pts_time in FFmpeg
  
  (Asked by: username_0 on 2020-01-11)
  
  I have been learning ffmepg for a couple of days.
  I'm struggling to understand how pts or dts works.
  
  This is the command I entered
  
  > ffprobe -show\_entries packet -read\_intervals 10%+#3 Input
  
  ```
     Stream #0:0: Video: h264 (High 10), yuv420p10le(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
  Metadata:
    DURATION        : 00:02:00.203000000
  Stream #0:1: Audio: flac, 48000 Hz, stereo, s16 (default)
  Metadata:
    DURATION        : 00:02:00.062000000
  [PACKET]
  codec_type=video
  stream_index=0
  pts=6506
  pts_time=6.506000
  dts=N/A
  dts_time=N/A
  duration=41
  duration_time=0.041000
  convergence_duration=N/A
  convergence_duration_time=N/A
  size=205369
  pos=9510964
  flags=K_
  [/PACKET]
  
  ```
  
  I guess duration\_time 0.041000 means the frame last(show) for 0.041 second.
  
  I don't know how to interpret this 'pts\_time' as normal time like minutes and seconds( e.g 1 min 3 second )
  
  I set the intervals 10%+=3, which means 3 packets after 10 seconds. I can't find the relation between 10 second and pts\_time=6.506000
  
  **Tags:** ffmpeg
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2020-01-11. Score: 3 | Accepted answer
  
  `pts_time=6.506000` means an absolute presentation timestamp of 6.506 seconds. It's relative presentation time depends on the start\_time of the file, for which use `-show_entries format=start_time`.
  
  ffprobe seeks to keyframes, so it will seek to the nearest KF *at or before* the specified time and then print info for the stated number of packets.
  
  > **Comments:**
  > **username_0**: IIRC, flags=k means key frame, right? I ran the command again with -read_intervals 10%+#6. There are key frames with pts_time=6.548, 6.571...Which is closer to 10 sec. or am I mistaken, flags=k doesn't mean key frame? I can upload the result of the command if you need.  
  > **username_1**: Don't consider audio packets.  
  > **username_0**: You're right, those are audio packets. so is it safe to guess that pts_time represents seconds, regardless of tbn value?  
  > **username_1**: Yes. pts_time is always in seconds; pts always in multiples of time base.  
  
  ---
  
  