以编程方式逐像素生成视频
我想以编程方式逐像素生成动画。最好是高清、Python 或 Ruby。我想过用PIL制作每一帧,然后将帧转换成视频。有更好的方法吗?
编辑:澄清一下,这是二维的,我需要像素精确。
编辑:
像这样的东西:
frame = Frame()
frame.draw(0, 0, 'red')
frame.draw(0, 1, 'blue')
...
frame = Frame()
...
会很棒。
I'd like to generate an animation pixel by pixel programmatically. Preferably in Hi-Def, in Python or in Ruby. I thought about using PIL to make each frame and then convert the frames into video. Is there a better way to do this?
EDIT: Clarification, this is 2D and I need the pixels to be precise.
EDITEDIT:
Something like this:
frame = Frame()
frame.draw(0, 0, 'red')
frame.draw(0, 1, 'blue')
...
frame = Frame()
...
Would be awesome.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
查看 VPython。它非常简单,并且可以满足您的需求。
checkout VPython. Its pretty easy and can do what you are looking for.
rcairo - 开罗图像库的 ruby 绑定.
https://github.com/rcairo/rcairo
rcairo - ruby bindings for Cairo image library.
https://github.com/rcairo/rcairo
您可以使用 ffmpeg,向其传递 rowvideo(帧),并将其转换为压缩视频格式,如 mp4
You can use ffmpeg, passe to it a rowvideo (frames), and converte it to a compressed video format like mp4