简体   繁体   English

使用ffmpeg提取每一帧以形成可变帧率视频

[英]Extract every frame form a variable-frame-rate video with ffmpeg

I'm trying to extract all the frames on several videos. 我正在尝试提取几个视频上的所有帧。 Those videos were captured on a camera that saves the output with a variable frame rate , thus, some frames are closer together in time than others (from ~27 to ~30 fps according to mediainfo ) 这些视频是在摄像机上捕获的,该摄像机以可变的帧频保存输出,因此,某些帧在时间上比其他帧靠得更近(根据mediainfo ,从〜27〜30 fps)

This frames are to be synchronized with some metadata, so I not only need to extract them but also keep the information of the [relative] time each frame of the video has been shot. 该帧将与某些元数据同步,因此,我不仅需要提取它们,而且还保留视频的每个帧拍摄后的[相对]时间信息。

I've been using ffmpeg to extract video frames, the challenge comes when the video frame rate is not constant any more. 我一直在使用ffmpeg提取视频帧,当视频帧速率不再恒定时,挑战就来了。 Any other method or program different than ffmpeg is ok as far as it can get the job done. 只要可以完成工作,任何其他与ffmpeg不同的方法或程序都可以。

您可以使用ffprobe显示每个“数据包”的演示时间戳(PTS)

ffprobe -show_entries packet=pts_time,duration_time,stream_index file.mp4

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM