📜  ffmpeg python 获取总帧数 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:21.638000             🧑  作者: Mango

代码示例1
import ffmpeg

probe = ffmpeg.probe(path_to_video)
video_info = next(s for s in probe['streams'] if s['codec_type'] == 'video')
num_frames= int(video_info['nb_frames'])