python图像帧到视频 [英] python image frames to video
问题描述
我正在编写一个python / django应用程序,它需要进行图像处理,然后将图像组合成一个视频(每个图像都是一个帧)。图像处理很容易。我正在使用PIL,但是为了转换为视频部分,我被卡住了。我发现pyffmpeg但似乎只是将视频解码为帧,而不是相反。虽然我可能错过了什么。我也听说pythonMagick(imagemagick包装器)可以做到这一点,但我似乎无法在文档中找到有关编码的任何内容。
I am writing a python/django application and it needs to do image manipulation and then combine the images into a video (each image is a frame). Image manipulation is easy. I'm using PIL, but for the convert to video part, I'm stuck. I've found pyffmpeg but that just seems to do decoding of videos to frames, not the other way around. Although I may have missed something. I've also heard that pythonMagick (imagemagick wrapper) can do this, but I can't seem to find anything about encoding in the docs.
这是在linux服务器上运行的,必须是python(因为那是应用程序所在的)。
This is running on a linux server and must be python (since that is what the application is in).
我应该使用什么?
推荐答案
使用OpenCV和python绑定。有 cv.WriteFrame
函数。 类似的问题和答案
Use OpenCV and python binding. There is cv.WriteFrame
function. Similar question and answer
这篇关于python图像帧到视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!