接上篇 ffmpeg-python库的使用翻译(一) 原文:https://github.com/kkroening/ffmpeg-python/tree/master/examples#assemble-video-from-sequence-of-frames 例子 获取视频信息(ffprobe) probe = ffmpeg.probe(args.in_filename) video_stream = next((stream for stream in probe['streams'] if stream['codec_type'] == 'video'), None) width = int(video_stream['width']) height = int(video_stream['height']) 生成视频缩略图 ( ffmpeg .input(in_filename, ss=time) .filter('scale', width, -1) .output(out_filename, vframes=1) .run() ) 将视频转换为numpy数组 out, _ = ( ffmpeg .input('in.mp4') .output('pipe:', format='rawvideo', pix_