1

I want to extract the timestamps of keyframes from a video using ffmpeg. I found this thread that explains pretty much how to do it.

However, it appears that my video does not have the pkt_pts_time parameter. Instead, it has a pkt_dts_time parameter and I'm wondering if this is the same thing or am I missing something? Do I need to use pts_time instead?

For reference, here is the full frame metadata:

[FRAME]
media_type=video
stream_index=0
key_frame=1
pts=131683050
pts_time=1463.145000
pkt_dts=N/A
pkt_dts_time=N/A
best_effort_timestamp=131683050
best_effort_timestamp_time=1463.145000
pkt_duration=3600
pkt_duration_time=0.040000
duration=3600
duration_time=0.040000
pkt_pos=215576461
pkt_size=18186
width=720
height=576
crop_top=0
crop_bottom=0
crop_left=0
crop_right=0
pix_fmt=yuv420p
sample_aspect_ratio=16:15
pict_type=I
coded_picture_number=431
display_picture_number=0
interlaced_frame=0
top_field_first=0
repeat_pict=0
color_range=tv
color_space=bt470bg
color_primaries=bt470bg
color_transfer=bt470bg
chroma_location=left
[/FRAME]

This is the command I'm using: ffprobe -i input.mp4 -select_streams v -skip_frame nokey -show_frames -show_entries "frame=pkt_pts_time".

K G
  • 111

0 Answers0