使用Python从原始帧创建MPEG4视频文件 [英] Creating MPEG4 video file with Python from raw frames
问题描述
Python中有哪些工具和库可用于这样的任务?最好我想有一个API,我可以输入文件名,然后单独的帧作为24位原始图像。
使用OpenCV和相应的Python绑定,您可以使用类似函数 cv.WriteFrame
的功能。您也可以使用pyffmpeg,但这更适合于从视频文件访问单个帧。
I have a raw video frame source which I can access in Python. I'd like to create a MPEG4 video out of this, with MP3 background music.
What kind of tools and libraries are available in Python for such a task? Preferably I'd like to have an API for which I can feed output filename and then individual frames as 24 bit raw images.
With OpenCV and the corresponding Python binding, you could use something like the function cv.WriteFrame
. You could also use pyffmpeg, but that is geared more towards accessing individual frames from a video file.
这篇关于使用Python从原始帧创建MPEG4视频文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!