📜  来自图像的 ffmpeg python 视频 - Python 代码示例

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

代码示例1
def read_frame_as_jpg(in_filename, frame_num):
    out, err = (
        ffmpeg
        .input(in_filename)
        .filter_('select', 'gte(n,{})'.format(frame_num))
        .output('pipe:', vframes=1, format='image2', vcodec='mjpeg')
        .run(capture_stdout=True)
    )
    return out