<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>

CC BY-SA 4.0
2020-01-11T10:49:44.927Z
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.
helming
CC BY-SA 4.0
2020-01-11T10:51:04.463Z
Don't consider audio packets.
Gyan
CC BY-SA 4.0
2020-01-11T10:59:29.957Z
You're right, those are audio packets. so is it safe to guess that pts_time represents seconds, regardless of tbn value?
helming
CC BY-SA 4.0
2020-01-11T11:04:39.003Z
Yes. pts_time is always in seconds; pts always in multiples of time base.
Gyan
CC BY-SA 4.0
2020-01-11T10:03:47.830Z
2020-01-11T10:03:47.830Z
Gyan
<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>

<ffmpeg>
Interpreting pts_time in FFmpeg
helming
# 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.  

---

