【发布时间】:2017-03-02 17:24:36
【问题描述】:
我正在尝试使用
在一些图像之间进行混合blend = Popen(['convert', 'test_images/*.jpg', '-delay', '10', '-morph', '10', '-'], stdout=PIPE)
并将输出通过管道传输到 ffmpeg 以从图像序列中写入视频
video = Popen(['ffmpeg', '-i', '-', '-f', 'image2pipe', '-r', '30', '-c:v', 'libx264', '-pix_fmt', 'yuv420p', 'test.mp4'], stdin=PIPE)
for _ in range(15):
video.stdin.write(blend.stdout.read())
video.stdin.close()
我试图在内存中完成所有操作,而不是写入磁盘。我目前得到的只是一个 50kb 的 mpeg4 文件,它没有打开。
【问题讨论】:
标签: python ffmpeg imagemagick subprocess pipe