使用ffmpeg获取视频帧信息

14

我该如何使用ffmpeg或其他工具从视频中检索有关每个帧开始的字节号的信息?

1个回答

27

你可以尝试使用 ffprobe

$ ffprobe -show_frames input.mkv
...
[FRAME]
media_type=video
key_frame=0
pkt_pts=3240
pkt_pts_time=3.240000
pkt_dts=N/A
pkt_dts_time=N/A
best_effort_timestamp=3240
best_effort_timestamp_time=3.240000
pkt_duration=40
pkt_duration_time=0.040000
pkt_pos=18009
pkt_size=480
width=320
height=240
pix_fmt=yuv444p
sample_aspect_ratio=1:1
pict_type=P
coded_picture_number=76
display_picture_number=0
interlaced_frame=0
top_field_first=0
repeat_pict=0
[/FRAME]

-select_streams v:0 will filter to the first video stream in the stream. To filter so all video streams (if there are more than 1) are returned use -select_streams v - Trisped

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接