📜  python ffmpeg 获取视频 fps - Python 代码示例

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

代码示例1
import ffmpeg

probe = ffmpeg.probe(filename_video)
video_info = next(s for s in probe['streams'] if s['codec_type'] == 'video')
fps = int(video_info['r_frame_rate'].split('/')[0])