如何用视频中的image / numpy数组替换帧?

时间:2014-11-07 12:00:41

标签: python video ffmpeg

我试过了:

写视频

command = [ FFMPEG_BIN,
            '-y', # (optional) overwrite output file if it exists
            '-f', 'rawvideo',
            '-vcodec','rawvideo',
            '-s', 'hd720', # size of one frame
            '-pix_fmt', 'rgb24',
            '-r', '15', # frames per second
            '-i', '-', # The input comes from a pipe
            '-an', # Tells FFMPEG not to expect any audio
        '-vcodec', 'mpeg',              
            'vidfl_test.mp4' ]
pipe = sp.Popen( command, stdin=sp.PIPE, stderr=sp.PIPE)
pipe.stdin.write(image.tostring())

但它没有用。

0 个答案:

没有答案