how to decode JPEG's and encode video in python?

ぐ巨炮叔叔 提交于 2020-01-06 18:05:31

问题


Basically, I'm trying to create a stop-motion film making application, due to the absence of any decent free versions that work on the internet, by taking images (JPEG preferably, but any format will do) and encode them into a video (any format is good enough)

I've managed so far to decode a JPEG data into a string and save that to a .txt file, and I've re-encoded another JPEG using the bytes decrypted. I've tried PyMedia and Pyglet, neither of which installed due to having Python 3.3 >:(

So, what I'm asking is: How do I encode video in Python, using the JPEG bytes that I've just decrypted?


回答1:


I would suggest to leave image/video conversion to specialised tools like FFMPEG (there is a nice recipe for your task on that link) and call it from your script.



来源:https://stackoverflow.com/questions/17352023/how-to-decode-jpegs-and-encode-video-in-python

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!