Get video frames information with ffmpeg

五迷三道 提交于 2021-02-05 20:34:15

问题


How can I retrieve information from video about byte number from which every frame starts, with using ffmpeg or something else?


回答1:


You can try 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]
  • pkt_pos may be what you're looking for.
  • If you only want info from the video stream add -select_streams v:0.
  • See FFprobe Documentation and FFmpeg Wiki: FFprobe Tips for more examples.


来源:https://stackoverflow.com/questions/27529930/get-video-frames-information-with-ffmpeg

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!