Wednesday 15 July 2015

python - How to replace frames with image/numpy array in a video? -



python - How to replace frames with image/numpy array in a video? -

i tried this:

write video command = [ ffmpeg_bin, '-y', # (optional) overwrite output file if exists '-f', 'rawvideo', '-vcodec','rawvideo', '-s', 'hd720', # size of 1 frame '-pix_fmt', 'rgb24', '-r', '15', # frames per sec '-i', '-', # input comes pipe '-an', # tells ffmpeg not expect sound '-vcodec', 'mpeg', 'vidfl_test.mp4' ] pipe = sp.popen( command, stdin=sp.pipe, stderr=sp.pipe) pipe.stdin.write(image.tostring())

but didn't work.

python video ffmpeg

No comments:

Post a Comment